Lock File Error Exiting
to Milestone apt-mirror (Ubuntu) Edit Fix Released Medium Brandon Holtsclaw Edit You need to log in to change this bug's status. Affecting: apt-mirror (Ubuntu) Filed here by: JuRiJ When: 2009-09-04 Confirmed: 2009-10-13 Assigned: 2010-05-19 Started work: 2012-01-28 Completed: 2012-01-28 Target Distribution Baltix BOSS Juju Charms Collection Elbuntu Guadalinex Guadalinex Edu Kiwi Linux nUbuntu PLD Linux Tilix tuXlab Ubuntu Ubuntu Linaro Evaluation Build Ubuntu RTM Package (Find…) Project (Find…) Status Importance Fix Released Medium Assigned to Me Brandon Holtsclaw (imbrandon) Comment on this change (optional) Email me about changes to this bug report Karmic Won't Fix Medium Unassigned Edit You need to log in to change this bug's status. Affecting: apt-mirror (Ubuntu Karmic) Filed here by: Benjamin Drung When: 2010-04-27 Completed: 2011-09-11 Package (Find…) Status Importance Won't Fix Medium Assigned to Nobody Me Comment on this change (optional) Email me about changes to this bug report Also affects project (?) Also affects distribution/package Nominate for series Bug Description Binary package hint: apt-mirror affected package: apt-mirror 0.4.6-0ubuntu2 use case: install apt-mirror run as root: su - apt-mirror -c apt-mirror hit "Ctrl + c" to abort the command run again: su - apt-mirror -c apt-mirror and you get this output: apt-mirror is already running, exiting at /usr/bin/apt-mirror line 187. the case for this error message is that file: /var/spool/apt-mirror/var/apt-mirror.lock was not deleted on apt-mirror exit. If you delete apt-mirror.lock file, then apt-mirror will run OK, but you have to delete the file every time apt-mirror finishes it's job. possible bug introduction was in apt-mirror (0.4.6-0ubuntu1) karmic, because file locking was added: * added file locking, more than one apt-mirror instance cant run at once See original description Tags: verification-needed 187 already apt-mirror karmic line running Edit Tag help Related branches lp:debian/apt-mirror lp:ubuntu/lucid/apt-mirror lp:ubuntu/karmic-proposed/apt-mirror lp:ubuntu/precise/apt-mirror JuRiJ (juraj-kvasnica) on 2009-09-04 description: updated Fernando (correiodofernando) wrote on 2009-10-13: #1 Eu tambĂ©m tive esse problema. Somente apagando manualmente o Lock o apt-mirror volta a funcionar. BORGES. Fernando (correiodofernando) on 2009-10-13 tags: added: apt-mirror karmic tags: added: 187 already line running Tony Yarusso (
A inter-process and inter-machine lockfile utility that works on a local or network file system. Installation $ npm install proper-lockfile Design There are various ways to achieve file locking. This library utilizes the mkdir strategy which works atomically on any kind of file system, even network based ones. The lockfile path is based on the file path you are trying to lock by suffixing it with .lock. When a lock is successfully acquired, the lockfile's mtime (modified time) is periodically updated to prevent staleness. This allows to effectively check if a lock is stale by checking its mtime against a stale threshold. If the update of the mtime fails several https://bugs.launchpad.net/bugs/424462 times, the lock might be compromised. The mtime is supported in almost every filesystem. Comparison This library is similar to lockfile but the later has some drawbacks: It relies on open with O_EXCL flag which has problems in network file systems. proper-lockfile uses mkdir which doesn't have this issue. O_EXCL is broken on NFS file systems; programs which rely on it for performing locking tasks will contain a race condition. The lockfile staleness https://www.npmjs.com/package/proper-lockfile check is done via ctime (creation time) which is unsuitable for long running processes. proper-lockfile constantly updates lockfiles mtime to do proper staleness check. It does not check if the lockfile was compromised which can led to undesirable situations. proper-lockfile checks the lockfile when updating the mtime. Compromised proper-lockfile does not detect cases in which: A lockfile is manually removed and someone else acquires the lock right after Different stale/update values are being used for the same file, possibly causing two locks to be acquired on the same file proper-lockfile detects cases in which: Updates to the lockfile fail Updates take longer than expected, possibly causing the lock to became stale for a certain amount of time As you see, the first two are a consequence of bad usage. Technically, it was possible to detect the first two but it would introduce complexity and eventual race conditions. Usage .lock(file, [options], [compromised], callback) Tries to acquire a lock on file. If the lock succeeds, a release function is provided that should be called when you want to release the lock. If the lock gets compromised, the compromised function will be called. The default compromised function is a simple throw err which will probably cause the process to die. Specify it to handle the way you desire. Available
all board cookies • All times are UTC Powered by phpBB Forum Software © phpBB Group Forum web-hosting by SourceForge