Modify

Opened 9 years ago

Closed 8 years ago

Last modified 3 years ago

#5162 closed defect (fixed)

opkg set lock in flash instead of ram

Reported by: mat Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version:
Keywords: Cc:

Description

# mount /jffs/ -o ro,remount
#/tmp/usr/sbin/strace -f opkg update
open("/usr/lib/opkg/lock", O_WRONLY|O_CREAT|O_TRUNC, 0640) = -1 EROFS (Read-only file system)
fcntl(-1, F_SETLK, {type=F_WRLCK, whence=SEEK_CUR, start=0, len=0}) = -1 EBADF (Bad file descriptor)
write(1, "Collected errors:\n", 18Collected errors:
) = 18
write(1, " * Could not obtain administrati"..., 40 * Could not obtain administrative lock
) = 40

I think there no need to do file operation in flash if it is not necessary. This even allow installion in ram without touching flash.

Doing "ln -s /tmp/lock/opkg /usr/lib/opkg/lock" fix the problem

PS : there is a simalar problem with "/usr/lib/opkg/status" for ram install. It try to open it rw, even if not needed.

Attachments (0)

Change History (4)

comment:1 Changed 9 years ago by thomas@…

I also have this problem. Also, if /usr/lib/opkg/lock exists in squashfs, but not in jffs, there seems to be some race condition! Once you run an opkg operation that is trying to lock, all processes trying to access /usr/lib/opkg will hang indefinitely until a reboot.

comment:2 Changed 8 years ago by jow

  • Resolution set to fixed
  • Status changed from new to closed

fixed with r19061

comment:3 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

comment:4 Changed 3 years ago by anonymous

I found the same problem.." collected error; could not obtain administrative lock". I tried to update opkg or otherwise install package. Does anyone have any idea??

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.