Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 275865 - net-misc/iaxmodem-1.1.1 init script can't stop daemon
Summary: net-misc/iaxmodem-1.1.1 init script can't stop daemon
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: NeedPatch
Depends on:
Blocks:
 
Reported: 2009-06-29 19:43 UTC by Christophe PEREZ
Modified: 2016-08-09 08:25 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe PEREZ 2009-06-29 19:43:27 UTC
I suppose there is an bug in the init script, because (modified to debug) :
# grep "^stop" -A 15 /etc/init.d/iaxmodem
stop() {
        local childs=""
        ebegin "Stopping ${description}"
        # start-stop-daemon doesn't kill childs reliable, so we
        # use a combination of pgrep + start-stop-daemon + kill
        [ -s "${pidfile}" ] && childs=$(pgrep -P $(cat "${pidfile}"))
echo "pidfile : $pidfile"
echo "childs : $childs"
        start-stop-daemon --stop --quiet --pidfile "${pidfile}" --retry TERM/10/KILL/5
        if eend ${?}; then
echo "stopping error"
                # if there're still childs running, kill them!
                [ -n "${childs}" ] && kill -KILL ${childs} 2>/dev/null
                return 0
        fi
}

# /etc/init.d/iaxmodem start
 * Caching service dependencies ...                                                                                              [ ok ]
 * Starting IAXmodem ...                                                                                                         [ ok ]

# ps faux | grep iaxmodem
root      6758  0.0  0.0  12048   856 pts/1    S+   15:41   0:00              |   \_ grep --colour=auto iaxmodem
root      6744  0.0  0.0  22112   644 ?        Ss   15:41   0:00 /usr/sbin/iaxmodem
uucp      6746  0.0  0.0  24212  1128 ?        S    15:41   0:00  \_ /usr/sbin/iaxmodem


# /etc/init.d/iaxmodem stop
 * Stopping IAXmodem ...
pidfile : /var/run/iaxmodem.pid
childs : 6746                                                                                                                    [ !! ]


# ps faux | grep iaxmodem
root      6881  0.0  0.0  12048   860 pts/1    S+   15:42   0:00              |   \_ grep --colour=auto iaxmodem
root      6744  0.0  0.0  22112   644 ?        Ss   15:41   0:00 /usr/sbin/iaxmodem
uucp      6746  0.0  0.0  24212  1160 ?        S    15:41   0:00  \_ /usr/sbin/iaxmodem

start-stop-daemon doesn't stop iaxmodem, but, it never goes in next "if" to kill childs.
Comment 1 Lars Wendler (Polynomial-C) gentoo-dev 2009-07-04 18:42:21 UTC
Please post your "emerge --info". IIRC the --retry option is handled differently between baselayout-1's start-stop-daemon and the one from openrc...
Comment 2 Christophe PEREZ 2009-07-05 19:17:12 UTC
# emerge --info
Portage 2.1.6.13 (default/linux/amd64/2008.0/server, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.27-openvz-briullov.1-r1 x86_64)
=================================================================
System uname: Linux-2.6.27-openvz-briullov.1-r1-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E8400_@_3.00GHz-with-glibc2.2.5
Timestamp of tree: Sat, 04 Jul 2009 23:25:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [enabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.5.4-r2
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/fax /var/bind /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /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/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/other/download/Linux/gentoo/portage"
EMERGE_DEFAULT_OPTS="--with-bdeps y --keep-going"
FEATURES="buildsyspkg ccache distcc distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo ftp://mirror.datapipe.net/gentoo http://mirror.jamit.de/gentoo/"
LANG="fr_FR@euro"
LC_ALL="fr_FR@euro"
LDFLAGS="-Wl,-O1"
LINGUAS="fr"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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"
PORTDIR_OVERLAY="/usr/local/portage/layman/voip /usr/local/portage"
SYNC="rsync://serveur1.novazur.fr/gentoo-portage"
USE="a52 aac acl acpi alsa amd64 apache2 audiofile bash-completion berkdb bzip2 caps cdb cdparanoia cdr cli cracklib crypt ctype cups dedicated dvd dvdr dvdread encode exif fam ffmpeg flac foomaticdb ftp gd geoip gif iconv icq idn imagemagick imap imlib innodb iodbc isdnlog jabber jbig jpeg lcms ldap lm_sensors mad maildir matroska mbox mcal mime mmx mng mp3 mpeg msn mudflap multilib mysql mysqli ncurses nls nptl nptlonly odbc ogg openmp oscar pam pcre perl php png posix ppds pppd prelude python readline reflection samba sasl scanner sdl session sharedext simplexml slang slp snmp speex spell spl sse sse2 ssl sysfs tcpd theora tiff truetype unicode usb v4l vhosts vorbis wmf xml xsl xvid yahoo zlib" ALSA_CARDS="snd-intel8x0" 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 authn_alias authn_anon 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 deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard" KERNEL="linux" LINGUAS="fr" USERLAND="GNU"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS