Bug 450540

Summary: broker occasionally leaves lock file in data dir
Product: Red Hat Enterprise MRG Reporter: Rafael H. Schloming <rafaels>
Component: qpid-cppAssignee: Alan Conway <aconway>
Status: CLOSED NOTABUG QA Contact: Kim van der Riet <kim.vdriet>
Severity: low Docs Contact:
Priority: low    
Version: betaCC: tross
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-17 14:43:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rafael H. Schloming 2008-06-09 13:37:30 UTC
Description of problem:

I ran the java tests in a loop over the weekend. After 200+ runs I had only two
failures. In both cases the test aborted because the broker failed to start due
to a lock file. In both cases the Java logs show the broker exiting normally
prior to this. The two Java test cases are unrelated.

How reproducible:

It took about 100,000 broker starts/stops to hit this issue.

Additional info:

The data dir was on nfs, and the broker was running without the store.

Comment 1 Alan Conway 2008-06-09 14:17:51 UTC
This also happens with a local directory, I got it in 200 iterations of:

while ./qpidd -d -p 8888 --data-dir /tmp/qpidd && ./qpidd -q -p 8888 ; do echo
-n .; done

Comment 2 Alan Conway 2008-06-16 15:08:03 UTC
I've also seen this occasionally in testing where there was no loop, broker was
killed normally. Using flock(3) or lockf(3) on the brokers data dir might be
more reliable than a simple existence test.

Comment 3 Alan Conway 2008-06-16 15:08:54 UTC
NB: in fixing this we should use common code for both the PID file and the lock
file.

Comment 4 Alan Conway 2009-02-17 14:43:09 UTC
No longer a problem.