Bug 216749 - When a ppp connection is brought up ONBOOT, ppp-watch doesn't keep running.
Summary: When a ppp connection is brought up ONBOOT, ppp-watch doesn't keep running.
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-11-21 20:26 UTC by Kevin White
Modified: 2014-03-17 03:04 UTC (History)
1 user (show)

Fixed In Version: 8.50-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-01-17 17:22:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
potential patch (500 bytes, patch)
2007-01-15 15:58 UTC, Bill Nottingham
no flags Details | Diff

Description Kevin White 2006-11-21 20:26:33 UTC
Description of problem:
When a ppp connection is brought up ONBOOT, ppp-watch doesn't keep running.


Version-Release number of selected component (if applicable):
initscripts-8.45.5-1.i386.rpm

How reproducible:
Completely

Steps to Reproduce:
1.  Set up a ppp connection.  Set it to come up ONBOOT.  Test the connection to
make sure it works.  Note that ppp-watch is running.
2.  Reboot the machine.  Note that pppd is running, but ppp-watch isn't.  This
means ifdown ppp0 won't work.  You have to kill pppd by hand.
  
Actual results:
On boot, ppp0 comes up, but ppp-watch isn't running.

Expected results:
ppp-watch should be running.

Additional info:
I don't have a ppp-watch pid file in /var/run, so ppp-watch is either not making
it, or exiting nicely.  I put extra logging into ifup-ppp to see if the call
order is right, and it is...ifup-ppp does call ppp-watch, which calls ifup-ppp
again.  That's working.  Somewhere along the way, ppp-watch goes away.

Comment 1 Kevin White 2007-01-14 04:32:48 UTC
I've been staring at the ppp-watch code and found something interesting.

If you pass ppp-watch the boot parameter, it sets an alarm signal, which should
make it time-out after a configurable amount of time.  This is interesting,
because that alarm is never canceled, and there's no way to miss it.

Which means, if called on-boot, ppp-watch will always end up dying.  Even if the
pppd connection is working just fine, ppp-watch will end up going away.

Is this by design?


Comment 2 Bill Nottingham 2007-01-15 15:43:02 UTC
It's certainly always been that way; as that's been 7+ years, unsure whether
it's by design or by history.

Comment 3 Kevin White 2007-01-15 15:46:49 UTC
Does that behavior seem to be correct?  It isn't for my purposes, but I can
recompile ppp-watch to fix it.  I'm staring at the code now, trying to find the
right place to put alert(0) in if (boot) once the connection's successfully
made.  When I figure that out, I'll update the ticket here.


Comment 4 Bill Nottingham 2007-01-15 15:58:55 UTC
Created attachment 145581 [details]
potential patch

Does the attached help? Unfortunately, I'm not in a position where I can test
this at the moment.

Comment 5 Kevin White 2007-01-15 16:05:11 UTC
That's about what I was going to do.  I may wrap it in code to only run if we're
in boot mode (because that's the only way alarm could have been set).  I will
test and confirm that this works, and attach my patch (which will be the same as
yours, just with an extra if clause).

More later.

Comment 6 Bill Nottingham 2007-01-15 16:22:26 UTC
Shouldn't need the 'if' - alarm(0) is ignored if no prior alarm is set.

Comment 7 Kevin White 2007-01-15 18:33:31 UTC
OK, I applied the patch as written (without the check for boot) and it worked. 
My patched FC6 box booted with a ppp connection set up ONBOOT, and the
corresponding ppp-watch program is still running.

Great!  This allows ifdown to work much more smoothly.

Confirmed: the patch fixes the problem.

Comment 8 Bill Nottingham 2007-01-17 17:22:40 UTC
Added in CVS, will be in 8.50-1. May appear in a future FC6 update.


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