Bug 982711 - mgetty locking fails with lockdev patch
mgetty locking fails with lockdev patch
Product: Fedora
Classification: Fedora
Component: mgetty (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Michal Sekletar
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-07-09 12:11 EDT by Sarantis Paskalis
Modified: 2013-07-22 21:08 EDT (History)
1 user (show)

See Also:
Fixed In Version: mgetty-1.1.36-22.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-22 21:08:20 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Sarantis Paskalis 2013-07-09 12:11:39 EDT
Description of problem:

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

How reproducible:

Steps to Reproduce:

Actual results:

Expected results:

Additional info:
Comment 1 Sarantis Paskalis 2013-07-09 12:20:28 EDT
(Sorry for the empty comment)

Description of problem:
mgetty fails after upgrading to F19 from F18

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

How reproducible:

Relevant log lines:

07/09 08:58:00  opening voice modem device
07/09 08:58:00   voice open 'ttyACM0'
07/09 08:58:00   makelock(ttyACM0) called
07/09 08:58:00  lock not made: dev_lock() failed: Success
07/09 08:58:05  opening voice modem device
07/09 08:58:05   voice open 'ttyACM0'
07/09 08:58:05   makelock(ttyACM0) called
07/09 08:58:05  lock not made: dev_lock() failed: Success
07/09 08:58:10  opening voice modem device
07/09 08:58:10   voice open 'ttyACM0'
07/09 08:58:10   makelock(ttyACM0) called
07/09 08:58:10  lock not made: dev_lock() failed: Success

Log with mgetty rebuilt without the lockdev patch:

07/09 19:03:10  opening voice modem device
07/09 19:03:10   voice open 'ttyACM0'
07/09 19:03:10   makelock(ttyACM0) called
07/09 19:03:10   do_makelock: lock='/var/lock/LCK..ttyACM0'
07/09 19:03:10   lock made
07/09 19:03:10  opened voice modem device /dev/ttyACM0

Other notes: 
"lockdev -l ttyACM0" and "lockdev -u ttyACM0" work from the commandline.

I have not built the source with the patch, but glancing it, it seems that it does not initialize the device_name parameter (see the log line "lock not made: dev_lock() failed: Success")
Comment 2 Michal Sekletar 2013-07-10 05:39:54 EDT
Thank you for the report. While implementing this functionality I had issues with not initialized devname parameter, however I put code into the main function which always initializes devname passed later on to lockdev API.

I will double check the patch, anyway thanks for the report. Will get back to you shortly.
Comment 3 Michal Sekletar 2013-07-11 12:09:07 EDT
I tried to reproduce the issue but mgetty locked device just fine. I started mgetty on ttyS0, connected to it and tried to run minicom on ttyS0 as well. Minicom refused to run and printed 'Device /dev/ttyS0 is locked.'

That being said, I think I know what is the issue here. I modified the patch in way which should work now for all tools (not only mgetty) which are using affected module (locks.c). I built new version for rawhide in koji. See [1] and find attached builds. Could you please verify that it works for you? Thanks.

[1] http://koji.fedoraproject.org/koji/buildinfo?buildID=432842
Comment 4 Sarantis Paskalis 2013-07-12 08:37:52 EDT
I confirm that the build in comment #3  fixed the locking issue I reported.

Please release an update for Fedora 19 as well.

Comment 5 Fedora Update System 2013-07-12 09:58:48 EDT
mgetty-1.1.36-22.fc19 has been submitted as an update for Fedora 19.
Comment 6 Michal Sekletar 2013-07-12 10:00:25 EDT
Would be great if you could test F19 update and leave karma. Thanks.
Comment 7 Fedora Update System 2013-07-12 21:50:39 EDT
Package mgetty-1.1.36-22.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mgetty-1.1.36-22.fc19'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 8 Fedora Update System 2013-07-22 21:08:20 EDT
mgetty-1.1.36-22.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.