Description of problem: It seems there is a race condition in ppp-watch. I wanted to configure GPRS over bluetooth connection, but kept getting error "The serial port could not be locked." However, if I added "set -x" to the ifup-ppp script (trying to debug the script), everything would work fine. After looking through sources and tracing the executable, I found out that the parent ppp-watch gets the signal from the background logger process which gets executed from the background shell in turn execute from the ifup-ppp script. This signal is then interpreted as if the pppd itself is exiting, which causes the parent to kill it. Since I didn't understand why is this particular logger started in the background, from a background shell no less, I fixed it with inserting sleep 1 before starting pppd. Why would anyone want to do this triple forking is beyond my imagination. Version-Release number of selected component (if applicable): initscripts-8.76.2-1.i386 How reproducible: It is a race condition, so it is hard to intentionally reproduce, but it always happens for me. Steps to Reproduce: 1. ifup <PPP_INTERFACE> 2. 3. Actual results: No connection with error message: Device <PPP_INTERFACE>: The serial port could not be locked. Expected results: Connection established. Additional info:
Hi, is this problem unsolved yet? I'm want to keep alive this bug. Thanks for any reply. -- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers
Unfortunately, since I switched my laptop, I don't have any way to test ppp right now. However, ifup-ppp still executes logger in double external shell background (line 144): (/usr/bin/logger -p daemon.info -t ifup-ppp \ $"pppd started for ${DEVNAME} on ${MODEMPORT} at ${LINESPEED}" &)& This causes pppd to receive SIGCHLD and misinterprets it. I still question the logic of this particular line, it is just logging, why is it necessary to put it in external shell, and then background both the shell and logger process?!?!
(In reply to comment #2) > (/usr/bin/logger -p daemon.info -t ifup-ppp \ > $"pppd started for ${DEVNAME} on ${MODEMPORT} at ${LINESPEED}" &)& > This causes pppd to receive SIGCHLD and misinterprets it. I still question the > logic of this particular line, it is just logging, why is it necessary to put > it in external shell, and then background both the shell and logger process?!?! So... 1) it's been there since the initial revision in the SCM (at least 11+ years ago!) 2) I can't test PPP at the moment either When it was initially added, we did not exec pppd. So the race couldn't hit there. Now we conditionally do, so it can. Honestly, the simplest fix I would think is to just not background it at all - it's logger, it's not going to take forever. http://git.fedorahosted.org/git/?p=initscripts.git;a=commitdiff;h=502b5569efec0a10c9eb04ad4e59b96ca6d03caf Will add it to rawhide and watch for responses.