Bug 39543 - ppp-watch does not detect the UP status of the ppp interface
Summary: ppp-watch does not detect the UP status of the ppp interface
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 7.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: David Lawrence
URL:
Whiteboard:
: 39230 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-05-08 03:16 UTC by Marco Paganini
Modified: 2014-03-17 02:20 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2001-05-25 01:06:11 UTC
Embargoed:


Attachments (Terms of Use)
Context diff with the workaround (1.32 KB, patch)
2001-05-08 03:19 UTC, Marco Paganini
no flags Details | Diff
diff for do_netreports() in network-functions (951 bytes, patch)
2001-05-10 20:43 UTC, Need Real Name
no flags Details | Diff

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.


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