Red Hat Bugzilla – Bug 39543
ppp-watch does not detect the UP status of the ppp interface
Last modified: 2014-03-16 22:20:42 EDT
Description of Problem:
ppp-watch does not correctly detect the status of the ppp0 interface
after a successful connection. The most visible effect is that rp3
will never close the "Waiting" window, even after the connection has
I found out that SIGIO comes too fast (before ppp0 is marked as "up").
The interfaceIsUp() function returns false and the program never returns.
The workaround (patch below) was to add a loop that checks for the
interface status 15 times, with a 1 second interval between checks. This
will hopefully cause to program to diagnose the interface condition
correctly upon connection.
Steps to Reproduce:
1. You need kernel 2.4.4 (stock) + initscripts-5.83-1
2. Add an ISP using rp3-config (I use AT&T worldnet in "dumb" mode)
3. verify that this was added as ifcfg-ppp0
4. type (as root) ppp-watch ppp0
The program never exits
The program should exit and release the parent ppp-watch.
I do not know if this happens with any ISP, since I only have one account.
PPP is currently negotiating DNS addresses and doing the
authentication. The problem did not seem to happen with kernel 2.4.2.
Created attachment 17646 [details]
Context diff with the workaround
I think this may be the same thing as Bug 37716
I found (what I assume is) a mistake in
/etc/sysconfig/network-scripts/network-functions which meant that
files in /var/run/netreport were being deleted even if the kill -SIGIO
succeeded. Thinking back, I didn't have the problem after first installing
(which would have been kernel 2.4.2) so possibly the problem is deeper than
this. However, with the change to network-functions, ppp-watch now works
as expected on my setup.
Created attachment 18046 [details]
diff for do_netreports() in network-functions
I think this is also a duplicate of bug
*** Bug 39230 has been marked as a duplicate of this bug. ***
After poking around a bit, my guess is that the problem must be with pppd or
the ppp driver in the kernel since do_netreports is called indirectly
by /etc/ppp/ip-up which should be called by pppd only when the link is up and
running. For some reason, sometimes pppd is calling it before the link is up.
But I run ipcheck (to update my dyndns account) from /etc/ppp/ip-up.local and
it always succeds, so the problem bust be happening after do_netreports is
called in ifup-post and /etc/ppp/ip-up.local is called. There must be a race
Or maybe I'm just plain wrong.
So the network-functions change (which is completely correct, BTW), does not
always work for you?
It seems to be working, but, since I only see the problem happening about 10%
of the times I try to connect and I didn't use it much since I patched
initscripts (with the network-functions patch because with the 15 retries one
it is working), I haven't yet reached the conclusion that it is fixed. Anyway,
reading the comment I interpreted it as the files being deleted always, and
with me they aren't getting deleted. With me the problem happens so rarely
that I haven't figured out a pattern for it, nor have I been able to reproduce
it on purpose.
I'm now as certain as I can be that the network-functions patch works. For me
the problem is solved.
OK, marking as resolved. The fix will be in initscripts-5.88-1.