Summary: | sys-apps/baselayout-1.12.4-r4 = infinite net.ppp0 restart when pptp is killed | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sergey Belyashov <Sergey.Belyashov> |
Component: | [OLD] baselayout | Assignee: | Gentoo Dialup Developers <net-dialup> |
Status: | RESOLVED CANTFIX | ||
Severity: | normal | CC: | uberlord |
Priority: | High | ||
Version: | 2006.0 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 143988 | ||
Attachments: |
/var/log/messages
log when pppd_ppp0 with debug option |
Description
Sergey Belyashov
2006-08-14 12:07:29 UTC
*** Bug 143916 has been marked as a duplicate of this bug. *** You misunderstood the functionality. When IN_BACKGROUND is set to true, "/etc/init.d/net.ppp0 start" command performs the inactive->started transition, while the stop operation performs the reverse transition. The link continues to come up because pppd is launched with "persist" option activated, which means it will continue to start the link until user stop it by running /etc/init.d/net.ppp0 stop. This is not a bug, it is the way we designed PPP baselayout support in the first place. I see that net.ppp0 service change their status to inactive. But why my /var/log/messages fills by many messages that ppp link up/down? In my previous post I copy only 2 cycles of these messages. I can post my full log. It contain much more same messages. Created attachment 94304 [details]
/var/log/messages
This is my actions:
Aug 14 22:03:19 - I stop previous version of pppd...
Aug 14 22:03:56 - I start new version with new config (net.ppp0 start)
Aug 14 22:04:40 - I kill pptp
Aug 14 22:05:49 - I run /etc/init.d/net.ppp0 stop
Aug 14 22:07:15 - I start net.ppp0 again
Aug 14 22:07:53 - And run kill -9 pptp
Aug 14 22:08:50 - I stop net.ppp0
Aug 14 22:09:04 - And start again
Aug 14 22:10:57 - Final restart.
I don't know why your connection gets restarted so often, but did you tried without --sync? I try to remove '--sync' from pptp options and 'sync' from pppd options. This does not fix problem. 1. First I try to comment start & stop lines in /etc/init.d/net.lo (for example, in start() and stop() functions I comment calls to run function). But It does not solve my problem. 2. Then I try to comment line #36 ('net.$1 --quiet stop') of /etc/ppp/ip-down: But it does not solve problem too. 3. I comment line #35 ('if /etc/init.d/net.$1 --quiet status ; then') and line #37 ('fi'). It solve problem. 4. I rewrite line #35 to 'if [ -e /var/lib/init.d/started/net.$1 ]; then ' and decomment line #36. Problem arives back. some lines from ip-down script: 34:if [ -x /etc/init.d/net.$1 ]; then 35: if /etc/init.d/net.$1 --quiet status ; then 36: export IN_BACKGROUND="true" 37: /etc/init.d/net.$1 --quiet stop 38: fi 39:fi I try to run '/etc/init.d/net.ppp0 --quiet status' manually (when net.ppp0 were started). But no destructive effects. I think that problem is causes when /etc/init.d/net.ppp0 called from ip-down script only. May be good way is to build special function which inactivates this service? I'm sorry. My post have misstakes in line numbers: 33:if [ -x /etc/init.d/net.$1 ]; then 34: if /etc/init.d/net.$1 --quiet status ; then 35: export IN_BACKGROUND="true" 36: /etc/init.d/net.$1 --quiet stop 37: fi 38:fi 2. I comment line #36 3. I comment lines #34 & #37 4. I rewrite line #34, decomment lines #36 & #37 Please add "debug" to pppd_ppp0, in case you didn't had it in /etc/ppp/options. Roy, do you have any idea? Created attachment 94329 [details]
log when pppd_ppp0 with debug option
Aug 15 19:32:06 : I kill pptp when my CPU used for compile qt-4.1.4. As result pppd restore connection and do not abort it. But it were not works.
Aug 15 19:34:10 : I pause compilation (Ctrl-Z) and kill pptp again. You can see that pppd use cyclic reconnections.
Does it work when you don't kill the pptp process? Why exactly do you kill it anyway? Yes. It work properly. Also I try to remove ethernet cable from network card. pppd restarts link properly (without loopping). I use kill pptp method to check script because it is more possible than physical influence on remote server. ;-) On previous net.ppp0 script it works as need... Wouldn't it be better to kill -HUP pppd instead? may be. But what is if pptp killed by segfault? I want to check all variants and pessimistic too. With ppp started, whats the contents of /var/lib/init.d/daemons/net.ppp0? $ cat /var/lib/init.d/daemons/net.ppp0 RC_DAEMONS[0]="/usr/sbin/pppd" RC_PIDFILES[0]="/var/run/ppp-ppp0.pid" Right then /etc/init.d/net.ppp0 --quiet status also checks the daemons started and if any have been stopped then it calls stop on itself if we are root as some of the daemons "crashed". I think that killing pptp is either killing pppd or at least causing pppd to use a different PID which I think is what we are seeing here. Solutions - don't call status and just do a start/stop or document this as a known issue. I don't care either way really, but FWIW other re-entrant net.foo programs such as ifplugd,netplug,wpa_supplicant don't check status either - they just call start/stop respectively. (In reply to comment #16) > Solutions - don't call status and just do a start/stop or document this as a > known issue. I don't care either way really, but FWIW other re-entrant net.foo > programs such as ifplugd,netplug,wpa_supplicant don't check status either - > they just call start/stop respectively. See my comments #6 and #7. I try to remove call to status. But no effect. Also I try to check your version about pid changing. Result: pppd pid IS NOT CHANGING after killing pptp. You can see it in my logs. ;-) OK, document the issue then. I can see no other solution. Back with you Alin :) closing it as CANTFIX |