Summary: | "/etc/init.d/rp-pppoe stop" causes pppd to go into an inifinite loop | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Patrick McLean <chutzpah> |
Component: | [OLD] Unspecified | Assignee: | Gentoo Dialup Developers <net-dialup> |
Status: | RESOLVED DUPLICATE | ||
Severity: | critical | CC: | agriffis, lanius, XL |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
fixes the problem by ignoring new signals in the SIGTERM and SIGHUP signal handlers
The patch for this issue from the pppd developers "unediting" the 2.4.2 patch that "went in" (quoting Paul Mackerras) |
Description
Patrick McLean
2004-05-23 19:39:00 UTC
Created attachment 31919 [details, diff]
fixes the problem by ignoring new signals in the SIGTERM and SIGHUP signal handlers
Looking at the pppd source code, it calls term() on SIGTERM then proceeds to
send SIGTERM to all processses in it's group, to kill all the children. It
recieves this SIGTERM and does it again, etc. It does a similar thing for
SIGHUP. This patch makes it ignore new SIGTERM signals recieved while killing
the group, I tested it and it works fine with this patch.
Created attachment 32020 [details, diff]
The patch for this issue from the pppd developers
This is the patch that the ppp developers put in for this issue.
Interesting! I think this is the same problem, I am struggling with at the moment, though I am not ussing ppp/pppoe but ppp/pptp to set up an on-demand vpn tunnel to a watchguard firebox (tricky enough :-). I had to patch the kernel (MPPE_MPPC-patch) and emerge an "~x86" ebuild of ppp to get things "almost running". Configuration is now: * kernel: linux-2.4.26-gentoo-r5 * kernel-patch: linux-2.4.26-mppe-mppc-1.0.patch.gz * ppp-ebuild: ppp-2.4.2-r2 (~x86) * pptpclient-ebuild: pptpclient-1.3.1 same problem with pptpclient-1.4.0 (~x86) "Almost Running" because of the problem/result you have posted Hundreds of messages like this in logs: "[pppd] Terminating on signal 15." ByTheWay: On my gentoo box ppp finally "terminates" (with a segmentation fault) * The problem does NOT occur if pptp has not been forked yet. * The problem does NOT occur if the child process pptp is killed instead of pppd. So far I haven't found an exact match of my problem on the internet only some (maybe) close related info and a patch that addresses "hundreds of '[pppd] Terminating on signal 2' messages" when stopping pppd my pressing ^C (SIGINT) before detaching from controlling tty. Smells a lot like "incorrect signal handling" to me. I will check out both patches (yours/the ppp-developer's and the SIGINT) and recapitulate what Richard Stevens wrote about signal handling... :-) Greets and thank you Patrick for your infos and the patch! Axel -- "You will never walk alone..." Created attachment 36001 [details, diff] "unediting" the 2.4.2 patch that "went in" (quoting Paul Mackerras) Following the "known cause"-link on http://pptpclient.sourceforge.net/howto-diagnosis.phtml#endless_signal_2 I found a posting from Paul Mackerras to the "linux-ppp" mailing list (on 2004-01-24) that states that a patch was committed to 2.4.2 that should not have been checked in. The funny thing is that nobody has removed it until today... Removing this patch by "unediting" main.c (kill_my_pg) like proposed by Paul produces the patch I have attached (same as Patrick's) and fixes the problem. Fixing the "ppp-2.4.2-r2.ebuild" requires the following steps: 1. add "ppp-2.4.2-signal-handler.patch" to "net-dialup/ppp/files/2.4.2/" 2. add "epatch ${FILESDIR}/${PV}/ppp-2.4.2-signal-handler.patch" to "ppp-2.4.2-r2.ebuild" [src_unpack()] or create a new release, i. e. "ppp-2.4.2-r3.ebuild" 3. Either set the timeout in "/etc/init.d/net.ppp0" or rather "net-dialup/ppp/files/2.4.2/net.ppp0" from "sleep 1" to "sleep 5" or delete the stuff after "# Try to kill pppd repeatedly ..." Somebody who runs a 2.6-kernel (I'm running 2.4) should check if this "patch of a patch" is also valid there. (I read something about a changed signal handling for SIGTRAP...) Greets, Axel (XL) I just found a duplicate of this bug (#57238) |