Bug 39543

Summary: ppp-watch does not detect the UP status of the ppp interface
Product: [Retired] Red Hat Linux Reporter: Marco Paganini <paganini>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: cefrodrigues, rvokal, shane
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-05-25 01:06:11 UTC Type: ---
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
Context diff with the workaround
none
diff for do_netreports() in network-functions none

Description Marco Paganini 2001-05-08 03:16:58 UTC
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
been established.

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.

How Reproducible:

Often

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

Actual Results:

The program never exits

Expected Results:

The program should exit and release the parent ppp-watch.

Additional Information:
	
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.

Comment 1 Marco Paganini 2001-05-08 03:19:04 UTC
Created attachment 17646 [details]
Context diff with the workaround

Comment 2 Need Real Name 2001-05-10 20:20:48 UTC
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.

Comment 3 Need Real Name 2001-05-10 20:43:47 UTC
Created attachment 18046 [details]
diff for do_netreports() in network-functions

Comment 4 Carlos Rodrigues 2001-05-13 18:00:31 UTC
I think this is also a duplicate of bug 
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=39230.

Comment 5 Carlos Rodrigues 2001-05-13 18:10:40 UTC
*** Bug 39230 has been marked as a duplicate of this bug. ***

Comment 6 Carlos Rodrigues 2001-05-14 11:22:28 UTC
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 
condition somewhere.
Or maybe I'm just plain wrong.

Comment 7 Bill Nottingham 2001-05-17 19:57:35 UTC
So the network-functions change (which is completely correct, BTW), does not
always work for you?

Comment 8 Carlos Rodrigues 2001-05-17 23:20:46 UTC
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.

Comment 9 Carlos Rodrigues 2001-05-25 01:06:07 UTC
I'm now as certain as I can be that the network-functions patch works. For me 
the problem is solved.

Comment 10 Bill Nottingham 2001-05-25 02:51:38 UTC
OK, marking as resolved. The fix will be in initscripts-5.88-1.