update-committed-patches should only allow one instance
Bug #1203980 reported by
Philip Colmer
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro patch metrics |
Invalid
|
Undecided
|
Unassigned |
Bug Description
There is currently a problem, reported by Ben, where update-
The script needs to ensure that only one instance of the script is running at a time in order to ensure that a long-running instance doesn't get trampled on by another newer instance.
To post a comment you must log in.
On Tue, Jul 23, 2013 at 8:54 AM, Philip Colmer <email address hidden> wrote:
>
> There is currently a problem, reported by Ben, where update-committed-
> patches is locking up. Unfortunately, along comes a second instance and
> that starts chewing up CPU as well as the first one.
>
> The script needs to ensure that only one instance of the script is
> running at a time in order to ensure that a long-running instance
> doesn't get trampled on by another newer instance.
The script (update- committed- patches) is doing, or at least should be
doing, that already.
This is the code snippet taken from the script:
lock = FileLock( '/var/lock/ update- committed- patches' ) acquire( timeout= 10) stderr. write(" Failed to acquire lock: %s\n" % e) stderr. write(
lock.release( )
try:
lock.
except LockFailed, e:
sys.
except LockTimeout, e:
sys.
"Another process seems to be running; can't acquire lock")
else:
try:
main()
finally:
It is probably worth investigating what is happening there.
--
Milo Casagrande | Automation Engineer
Linaro.org <www.linaro.org> │ Open source software for ARM SoCs