Bug 1159377

Summary: timeout is too short (10 seconds)
Product: [Fedora] Fedora Reporter: Zing <zing>
Component: liblockfileAssignee: Matthias Runge <mrunge>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 20CC: bugs.michael, lnie, mrunge, thozza
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: liblockfile-1.09-1.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-27 03:05:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
timeout fix none

Description Zing 2014-10-31 17:41:03 UTC
Created attachment 952564 [details]
timeout fix

Description of problem:
lockfile_check() returns a lockfile invalid/stale after only 10 seconds.

This should be 5 mins.  Any programs depending on this are broken.

Version-Release number of selected component (if applicable):
liblockfile-1.08-15

How reproducible:
always

Steps to Reproduce:
1. Run:
$ dotlockfile lock
$ dotlockfile lock
$ echo $?
0

Actual results:
The second lock will succeed ~10 seconds later

Expected results:
Should be failure (L_MAXTRIES) or a stale lock success after 5 mins.

Additional info:
patch attached... looks like some debugging macro code code added sometime.

Comment 1 Zing 2015-01-13 14:13:33 UTC
Broken in F21 also.

Comment 2 Matthias Runge 2015-01-14 08:49:16 UTC
Sorry, I fail to see, what's broken here. either a lock exists, or it doesn't.

Comment 3 Michael Schwendt 2015-01-14 09:25:38 UTC
Please compare with 1.09:
http://sources.debian.net/src/liblockfile/1.09-6/lockfile.c/#L445

The lockfile exists, but the check whether it is stale/valid depends on the timeout. The lockfile should not timeout so soon. Normally, a lockfile would be valid for a much longer time unless the process _removes_ the lockfile.

Comment 4 Michael Schwendt 2015-01-14 09:30:02 UTC
Oh, and since I only saw this bz mail flying by, the Changelog of 1.09 gives confirmation: http://sources.debian.net/src/liblockfile/1.09-6/Changelog/#L5

Comment 5 Fedora Update System 2015-01-15 08:30:18 UTC
liblockfile-1.09-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/liblockfile-1.09-1.fc21

Comment 6 lnie 2015-01-16 08:46:54 UTC
liblockfile-1.09-1.fc21 works

Comment 7 Fedora Update System 2015-01-17 05:41:41 UTC
Package liblockfile-1.09-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing liblockfile-1.09-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-0768/liblockfile-1.09-1.fc21
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2015-01-27 03:05:28 UTC
liblockfile-1.09-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.