Bug 982711 - mgetty locking fails with lockdev patch
Summary: mgetty locking fails with lockdev patch
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mgetty
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Sekletar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-09 16:11 UTC by Sarantis Paskalis
Modified: 2013-07-23 01:08 UTC (History)
1 user (show)

Fixed In Version: mgetty-1.1.36-22.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-23 01:08:20 UTC


Attachments (Terms of Use)

Description Sarantis Paskalis 2013-07-09 16:11:39 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Sarantis Paskalis 2013-07-09 16:20:28 UTC
(Sorry for the empty comment)

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

Version-Release number of selected component (if applicable):
mgetty-1.1.36-21.fc19

How reproducible:
Always

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 09:39:54 UTC
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 16:09:07 UTC
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 12:37:52 UTC
I confirm that the build in comment #3  fixed the locking issue I reported.

Please release an update for Fedora 19 as well.

Thanks

Comment 5 Fedora Update System 2013-07-12 13:58:48 UTC
mgetty-1.1.36-22.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mgetty-1.1.36-22.fc19

Comment 6 Michal Sekletar 2013-07-12 14:00:25 UTC
Would be great if you could test F19 update and leave karma. Thanks.

Comment 7 Fedora Update System 2013-07-13 01:50:39 UTC
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:
https://admin.fedoraproject.org/updates/FEDORA-2013-12883/mgetty-1.1.36-22.fc19
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2013-07-23 01:08:20 UTC
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.