Project

General

Profile

« Previous | Next » 

Revision eb054ac1

Added by Ken McDonell almost 15 years ago

  • ID eb054ac176ab06bcd978e4b6a3d26e9e2f9c9927

pmlogger_check fix small timing window / race condition

There was a race condition that was sometimes exposed by QA test 119
where the attempt to create the lock file would fail because the lock
file already existed, but by the time the status of the lock file was
checked the lock file had been removed. Some convoluted logic
translated this into the confusing messages
Warning: removing lock file older than 30 minutes
ls: cannot access /lock: No such file or directory

Fixed by a guard to test the existence of the lock file after the
pmlock fails.

All of this is safe because it is within a loop that keeps trying to
acquire the lock, and the race condition is most unlikely to be
persistent.

  • added
  • modified
  • copied
  • renamed
  • deleted