Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 257929

Summary: on external pppd disconnect other processes are terminated and restarted
Product: Gentoo Linux Reporter: Martin <mrbscreen>
Component: [OLD] UnspecifiedAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: High    
Version: 2008.0   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Martin 2009-02-06 19:27:19 UTC
Hello,

I don't know if this is a bug, but I haven't found any information about that problem.

My ISP does a disconnect after 24h. The problem I have is that if this happens some other processes are killed by signal 15. As an example:

dnsmasq, openvpn, noip2, bacula storage daemon, cvsd, sshd and much more see the appended log.

The question is, why this happens and how to turn it off. One problem of this situation is that on every disconnect the tape of my tape drive was re-wounded.

Thank you for your advise

Greetings

==== emerge --info
mrb ~ # emerge --info
Portage 2.1.6.7 (default/linux/amd64/2008.0, gcc-4.3.3, glibc-2.9_p20081201-r1, 2.6.27-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.27-gentoo-r5-x86_64-Intel-R-_Core-TM-2_Quad_CPU_@_2.40GHz-with-glibc2.2.5
Timestamp of tree: Fri, 06 Feb 2009 15:10:03 +0000
app-shells/bash:     3.2_p48
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.5.4-r2
dev-util/cmake:      2.6.2
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.2
sys-apps/sandbox:    1.3.2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.50.0.1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.romnet.org/gentoo/ http://mirror.ovh.net/gentoo-distfiles/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/"
LDFLAGS="-Wl,-O1"
LINGUAS="de"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X Xaw3d a52 aac acl alsa amd64 amr arts automount avahi bash-completion berkdb bitmap-fonts bzip2 cdr cli cracklib crypt cups dbus desktop dhcp dri dts dv dvb dvd dvdr dvdread encode esd fax firefox flac font-server fortran gcj gdbm gif glib gphoto2 gpm graphviz gtk hal howl iconv ieee1394 imagemagick imlib ipv6 isdnlog jack java jpeg jpeg2k kde kpathsea ldap lesstif libcaca lmsensors midi mmx motif mozbranding mp3 mpeg mudflap multilib ncurses neXt network nls nptl nptlonly nsplugin nvidia oav ogg opengl openmp oss pam pch pcre perl png pppd python qt qt3 qt3support qt4 readline reflection samba scanner sdl session slp soundex speex spell spl sse sse2 ssl sysfs syslog tcl tcpd tetex theora threads tiff tk toolbar truetype truetype-fonts type1 type1-fonts unicode urandom v4l vcd vdr vorbis wavpack wifi winbind xine xinerama xml xorg xscreensaver xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CAMERAS="canon" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="nv nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

=== emerge 
mrb ~ # emerge -pv openrc ppp

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] sys-apps/openrc-0.4.2  USE="ncurses pam unicode -debug" 0 kB
[ebuild   R   ] net-dialup/ppp-2.4.4-r21  USE="dhcp gtk ipv6 pam -activefilter -atm -eap-tls -mppe-mppc -radius" 0 kB



Reproducible: Always



Expected Results:  
Nothing special should happens. pppd should reconnect and other processes shouldn't be affected.

=== /etc/conf.d/net
dns_domain_lo="xxxx"
dns_servers="127.0.0.1"
dns_search="xxxx"

bridge_br0=( "eth1 vpn0" )
config_br0=( "xxxxx/24" )
#routes_br0=( "default via xxxxx" )
#dns_servers_br0=( "xxxxx" )
depend_br0() {
        need net.eth1
        need net.vpn0
}

config_eth0=( "null" )
config_eth1=( "null" )
config_eth2=( "xxxxx/24" )

config_ppp0=( "ppp" )
link_ppp0="eth0"
plugins_ppp0=( "pppoe" )
depend_ppp0() {
        need net.eth0
}
pppd_ppp0=(
        "user \"xxxxxx\""
        "defaultroute"
        "usepeerdns"
        "default-asyncmap"
        "ipcp-accept-remote"
        "ipcp-accept-local"
        "lcp-echo-interval 15"
        "lcp-echo-failure 3"
        "persist"
        "holdoff 2"
        "maxfail 0"
        "mru 1492"
        "mtu 1492"
#       "debug"
        "lock"
)

tuntap_vpn0="tap"
config_vpn0=( "null" )
Comment 1 Martin 2009-02-06 19:27:51 UTC
=== Here is a snippet of the syslog on one disconnect:

Feb  6 19:44:44 mrb pppd[6074]: No response to 3 echo-requests                                                                                                                                                                               
Feb  6 19:44:44 mrb pppd[6074]: Serial link appears to be disconnected.                                                                                                                                                                      
Feb  6 19:44:44 mrb pppd[6074]: Connect time 1440.9 minutes.                                                                                                                                                                                 
Feb  6 19:44:44 mrb pppd[6074]: Sent 463439586 bytes, received 1699834922 bytes.                                                                                                                                                             
Feb  6 19:44:47 mrb sshd[6628]: Received signal 15; terminating.                                                                                                                                                                             
Feb  6 19:44:47 mrb nmbd[7080]: [2009/02/06 19:44:47, 0] nmbd/nmbd.c:terminate(58)                                                                                                                                                           
Feb  6 19:44:47 mrb nmbd[7080]:   Got SIGTERM: going down...                                                                                                                                                                                 
Feb  6 18:44:47 mrb openvpn[6406]: event_wait : Interrupted system call (code=4)                                                                                                                                                             
Feb  6 18:44:47 mrb openvpn[6406]: SIGTERM[hard,] received, process exiting                                                                                                                                                                  
Feb  6 19:44:47 mrb noip2[6974]: v2.1.9 daemon ended.                                                                                                                                                                                        
Feb  6 19:44:48 mrb dnsmasq[6223]: exiting on receipt of SIGTERM                                                                                                                                                                             
Feb  6 19:44:50 mrb pppd[6074]: Connection terminated.                                                                                                                                                                                       
Feb  6 19:44:50 mrb pppd[6074]: Modem hangup                                                                                                                                                                                                 
Feb  6 19:44:53 mrb pppd[6074]: PPP session is 63872                                                                                                                                                                                         
Feb  6 19:44:53 mrb pppd[6074]: Using interface ppp0                                                                                                                                                                                         
Feb  6 19:44:53 mrb pppd[6074]: Connect: ppp0 <--> eth0                                                                                                                                                                                      
Feb  6 19:45:02 mrb pppd[6074]: PAP authentication succeeded                                                                                                                                                                                 
Feb  6 19:45:02 mrb pppd[6074]: peer from calling number xx:xx:xx:xx:xx:xx authorized                                                                                                                                                        
Feb  6 19:45:02 mrb pppd[6074]: local  IP address xxx.xxx.xxx.xxx                                                                                                                                                                              
Feb  6 19:45:02 mrb pppd[6074]: remote IP address xxx.xxx.xxx.xxx                                                                                                                                                                               
Feb  6 19:45:02 mrb pppd[6074]: primary   DNS address xxx.xxx.xxx.xxx                                                                                                                                                                            
Feb  6 19:45:02 mrb pppd[6074]: secondary DNS address xxx.xxx.xxx.xxx                                                                                                                                                                           
Feb  6 19:45:02 mrb cvsd[6658]: version 1.0.16 starting                                                                                                                                                                                      
Feb  6 19:45:02 mrb cvsd[6658]: listening on 0.0.0.0 2401                                                                                                                                                                                    
Feb  6 19:45:02 mrb cvsd[6658]: bind() failed: Address already in use                                                                                                                                                                        
Feb  6 19:45:02 mrb cvsd[6658]: version 1.0.16 bailing out                                                                                                                                                                                   
Feb  6 19:45:02 mrb dnsmasq[6668]: started, version 2.46 cachesize 150                                                                                                                                                                       
Feb  6 19:45:02 mrb dnsmasq[6668]: compile time options: IPv6 GNU-getopt DBus I18N no-TFTP                                                                                                                                                   
Feb  6 19:45:02 mrb dnsmasq[6668]: using nameserver yyy.yyy.yyy.yyy#53 for domain xxxxxxxxx                                                                                                                                            
Feb  6 19:45:02 mrb dnsmasq[6668]: reading /etc/ppp/resolv.conf                                                                                                                                                                              
Feb  6 19:45:02 mrb dnsmasq[6668]: using nameserver xxx.xxx.xxx.xxx#53                                                                                                                                                                          
Feb  6 19:45:02 mrb dnsmasq[6668]: using nameserver xxx.xxx.xxx.xxx#53                                                                                                                                                                           
Feb  6 19:45:02 mrb dnsmasq[6668]: using nameserver xxx.xxx.xxx.xxx#53 for domain xxxxxxxxxxxxxx                                                                                                                                            
Feb  6 19:45:02 mrb dnsmasq[6668]: read /etc/hosts - 14 addresses                                                                                                                                                                            
Feb  6 19:45:02 mrb noip2[6708]: v2.1.9 daemon started                                                                                                                                                                                       
Feb  6 19:45:02 mrb dhcpd: WARNING: Host declarations are global.  They are not limited to the scope you declared them in.                                                                                                                   
Feb  6 19:45:03 mrb sshd[6755]: Server listening on 0.0.0.0 port 22.                                                                                                                                                                       
Feb  6 19:45:03 mrb sshd[6755]: Server listening on :: port 222.                                                                                                                                                                            
Feb  6 19:45:03 mrb dhcpd: Wrote 0 class decls to leases file.                                                                                                                                                                               
Feb  6 19:45:03 mrb dhcpd: Wrote 0 deleted host decls to leases file.                                                                                                                                                                        
Feb  6 19:45:03 mrb dhcpd: Wrote 0 new dynamic host decls to leases file.                                                                                                                                                                    
Feb  6 19:45:03 mrb dhcpd: Wrote 9 leases to leases file.                                                                                                                                                                                    
Feb  6 19:45:03 mrb openvpn[6765]: OpenVPN 2.1_rc15 x86_64-pc-linux-gnu [SSL] [LZO2] [EPOLL] built on Jan  4 2009                                                                                                                            
Feb  6 19:45:03 mrb openvpn[6765]: IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA.  OpenVPN 2.0-beta16 and earlier used 5000 as the default port.
Feb  6 19:45:03 mrb openvpn[6765]: NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Feb  6 19:45:03 mrb openvpn[6765]: Control Channel Authentication: using 'yyyyyy' as a OpenVPN static key file
Feb  6 19:45:03 mrb openvpn[6765]: TUN/TAP device vpn0 opened
Feb  6 19:45:03 mrb openvpn[6809]: chroot to '/etc/openvpn/chroot' and cd to '/' succeeded
Feb  6 19:45:03 mrb openvpn[6809]: GID set to openvpn
Feb  6 19:45:03 mrb openvpn[6809]: UID set to openvpn
Feb  6 19:45:03 mrb openvpn[6809]: UDPv4 link local (bound): [undef]:1194
Feb  6 19:45:03 mrb openvpn[6809]: UDPv4 link remote: [undef]
Feb  6 19:45:03 mrb openvpn[6809]: Initialization Sequence Completed
Feb  6 19:45:07 mrb ntpdate[6729]: step time server 81.169.136.18 offset -0.013863 sec
Feb  6 19:45:07 mrb sm-notify[7275]: Already notifying clients; Exiting!
Feb  6 19:45:07 mrb ntpd[7274]: ntpd 4.2.4p6@1.1549-o Fri Jan 23 20:52:23 UTC 2009 (1)
Feb  6 19:45:07 mrb ntpd[7280]: precision = 1.000 usec
Feb  6 19:45:07 mrb ntpd[7280]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled
Feb  6 19:45:07 mrb ntpd[7280]: Listening on interface #1 lo, 127.0.0.1#123 Enabled
Feb  6 19:45:07 mrb ntpd[7280]: Listening on interface #2 eth2, xxxxx#123 Enabled
Feb  6 19:45:07 mrb ntpd[7280]: Listening on interface #3 br0, xxxx#123 Enabled
Feb  6 19:45:07 mrb ntpd[7280]: Listening on interface #4 ppp0, 213.135.2.191#123 Enabled
Feb  6 19:45:07 mrb ntpd[7280]: kernel time sync status 0040
Feb  6 19:45:07 mrb ntpd[7280]: frequency initialized 3.079 PPM from /var/lib/ntp/ntp.drift
Feb  6 19:45:09 mrb noip2[6708]: xxxxxx was already set to yyyy.
Feb  6 19:45:09 mrb noip2[6708]: xxxxxx was already set to yyyy.
Feb  6 19:45:09 mrb noip2[6708]: xxxxxx was already set to yyyy.
Feb  6 19:45:32 mrb dhcpd: DHCPINFORM from xxxx via br0
Feb  6 19:45:32 mrb dhcpd: DHCPACK to xxxx (xxxx) via br0
Feb  6 19:45:32 mrb dhcpd: DHCPINFORM from xxxx via br0
Feb  6 19:45:32 mrb dhcpd: DHCPACK to xxxx (xxxx) via br0
Feb  6 19:46:03 mrb dhcpd: DHCPREQUEST for xxxx from xxxx via br0
Feb  6 19:46:03 mrb dhcpd: DHCPACK on xxxx to xxx via br0

Comment 2 Martin 2009-02-06 19:38:30 UTC
I forgot to say not every time all processes came back. So it could happen that I loose ssh.
Comment 3 Martin 2009-02-07 10:35:24 UTC
Ok I found the solution. Sorry for the inconvenience. 

The solution was to add the following to lines into /etc/conf.d/net:

rc_net_br0_after="net.ppp0"
# for starting the main network interface after internet connection. This avoids that ntp_client can not synchronize time in lack of the missing connection

rc_net_ppp0_provide="!net"
# Say that net.ppp0 not provides direct net services.

rc_net_vpn0_provide="!net"
#This setting have also done for the vpn0 device.

Comment 4 Martin 2009-02-07 10:36:13 UTC
Ok I found the solution. Sorry for the inconvenience. 

The solution was to add the following to lines into /etc/conf.d/net:

rc_net_br0_after="net.ppp0"
# for starting the main network interface after internet connection. This avoids that ntp_client can not synchronize time in lack of the missing connection

rc_net_ppp0_provide="!net"
# Say that net.ppp0 not provides direct net services.

rc_net_vpn0_provide="!net"
#This setting have also done for the vpn0 device.