[gentoo-user] sleep dies with SIGUSR1 sometimes
this email correspondents to gentoo bug #79325. they told me do discuss the issue here. so heres the report: i am running sys-apps/coreutils-5.2.1 this contains /bin/sleep i am running the following shellscript: #!/bin/bash set -e PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin PIDFILE=/var/local/run/proedruckd.pid if [ -e $PIDFILE ]; then logger 'proedruckd: not starting because pidfile already exists' exit 1 fi function cleanup() { logger 'proedruckd: exiting' rm -f $PIDFILE } trap cleanup EXIT echo $$ $PIDFILE logger 'proedruckd: started' cd /Druckjobs/working while true; do for job in *; do if ! [ $job = '*' ]; then logger proedruckd: job=x${job}x NUMC=$(echo $job|sed 's/^.*C//') logger proedruckd: job $job processing set +e X=$(proehpgldruck $job $NUMC 12 /dev/null) if ! [ $? = 0 ]; then X=proehpgldruck fehlgeschlagen. $X fi set -e if ! [ $X = ]; then mail -s proedruckd [EMAIL PROTECTED] EOF proedruckd hat Probleme mit dem job $job Die Meldung des proehpgldruck Programmes ist $X EOF fi logger proedruckd: erasing job rm -f $job fi done sleep 2 done you see in the second last line the command 'sleep 2'. in my former debian installation this shell script daemon ran forever. after porting it to gentoo i am experiencing the problem that occasionally it just dies. after starting it in a xterm i could see the message making it die: roy root # /usr/local/sbin/proedruckd /usr/local/sbin/proedruckd: line 48: 2327 User defined signal 1 sleep 2 roy root # line 48 is the line after the sleep call. the problem comes sometimes every two days, sometimes 2 times a day. i don't have a single clue why this sometimes happens. i am relativly sure that there is no other program running (at least not written by me!!!) that does something like a killall of all sleep processes with a SIGUSR1. i am confused and i don't know how to debug any further. for now i continue running that daemon from console so that i can restart it once it crashes in the sleep call. but of course that sucks :) cya! erik Reproducible: Always Steps to Reproduce: Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.4.26-gentoo-r9 i686) = System uname: 2.4.26-gentoo-r9 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz Gentoo Base System version 1.4.16 ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.90.0.1.1-r3 Headers: sys-kernel/linux-headers-2.4.21-r1 Libtools: sys-devel/libtool-1.5.2-r7 ACCEPT_KEYWORDS=x86 AUTOCLEAN=yes CFLAGS=-O2 -march=pentium4 -pipe -fomit-frame-pointer CHOST=i686-pc-linux-gnu COMPILER= CONFIG_PROTECT=/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control CONFIG_PROTECT_MASK=/etc/gconf /etc/terminfo /etc/env.d CXXFLAGS=-O2 -march=pentium4 -pipe -fomit-frame-pointer DISTDIR=/usr/portage/distfiles FEATURES=autoaddcvs autoconfig ccache distlocks nostrip sandbox sfperms GENTOO_MIRRORS=http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo; MAKEOPTS=-j3 PKGDIR=/usr/portage/packages PORTAGE_TMPDIR=/var/tmp PORTDIR=/usr/portage PORTDIR_OVERLAY= SYNC=rsync://rsync.gentoo.org/gentoo-portage USE=X apm arts avi berkdb bitmap-fonts crypt cups doc emacs encode esd f77 fam foomaticdb fortran freetds gdbm gif gimpprint gnome gpm gtk gtk2 imagemagick imlib java jpeg kde ldap libg++ libwww mad mikmod mmx mng motif mpeg mssql ncurses nls odbc oggvorbis opengl oss pam pdflib perl png postgres ppds python qt quicktime readline samba sdl slang spell sse ssl tcpd tetex tiff truetype unicode usb wmf x86 xml2 xmms xv zlib linguas_de --- Additional Comment #1 From SpanKY 2005-01-25 06:46 PST --- please try debugging this on the forums and/or gentoo-user mailing list cu erik -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] sleep dies with SIGUSR1 sometimes
Erik Thiele ha scritto: this email correspondents to gentoo bug #79325. they told me do discuss the issue here. so heres the report: i am running sys-apps/coreutils-5.2.1 this contains /bin/sleep i am running the following shellscript: #!/bin/bash set -e PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin PIDFILE=/var/local/run/proedruckd.pid if [ -e $PIDFILE ]; then logger 'proedruckd: not starting because pidfile already exists' exit 1 fi function cleanup() { logger 'proedruckd: exiting' rm -f $PIDFILE } trap cleanup EXIT echo $$ $PIDFILE logger 'proedruckd: started' cd /Druckjobs/working while true; do for job in *; do if ! [ $job = '*' ]; then logger proedruckd: job=x${job}x NUMC=$(echo $job|sed 's/^.*C//') logger proedruckd: job $job processing set +e X=$(proehpgldruck $job $NUMC 12 /dev/null) if ! [ $? = 0 ]; then X=proehpgldruck fehlgeschlagen. $X fi set -e if ! [ $X = ]; then mail -s proedruckd [EMAIL PROTECTED] EOF proedruckd hat Probleme mit dem job $job Die Meldung des proehpgldruck Programmes ist $X EOF fi logger proedruckd: erasing job rm -f $job fi done sleep 2 done you see in the second last line the command 'sleep 2'. in my former debian installation this shell script daemon ran forever. after porting it to gentoo i am experiencing the problem that occasionally it just dies. after starting it in a xterm i could see the message making it die: roy root # /usr/local/sbin/proedruckd /usr/local/sbin/proedruckd: line 48: 2327 User defined signal 1 sleep 2 roy root # line 48 is the line after the sleep call. the problem comes sometimes every two days, sometimes 2 times a day. i don't have a single clue why this sometimes happens. i am relativly sure that there is no other program running (at least not written by me!!!) that does something like a killall of all sleep processes with a SIGUSR1. i am confused and i don't know how to debug any further. for now i continue running that daemon from console so that i can restart it once it crashes in the sleep call. but of course that sucks :) cya! erik Reproducible: Always Steps to Reproduce: Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.4.26-gentoo-r9 i686) = System uname: 2.4.26-gentoo-r9 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz Gentoo Base System version 1.4.16 ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.90.0.1.1-r3 Headers: sys-kernel/linux-headers-2.4.21-r1 Libtools: sys-devel/libtool-1.5.2-r7 ACCEPT_KEYWORDS=x86 AUTOCLEAN=yes CFLAGS=-O2 -march=pentium4 -pipe -fomit-frame-pointer CHOST=i686-pc-linux-gnu COMPILER= CONFIG_PROTECT=/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control CONFIG_PROTECT_MASK=/etc/gconf /etc/terminfo /etc/env.d CXXFLAGS=-O2 -march=pentium4 -pipe -fomit-frame-pointer DISTDIR=/usr/portage/distfiles FEATURES=autoaddcvs autoconfig ccache distlocks nostrip sandbox sfperms GENTOO_MIRRORS=http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo; MAKEOPTS=-j3 PKGDIR=/usr/portage/packages PORTAGE_TMPDIR=/var/tmp PORTDIR=/usr/portage PORTDIR_OVERLAY= SYNC=rsync://rsync.gentoo.org/gentoo-portage USE=X apm arts avi berkdb bitmap-fonts crypt cups doc emacs encode esd f77 fam foomaticdb fortran freetds gdbm gif gimpprint gnome gpm gtk gtk2 imagemagick imlib java jpeg kde ldap libg++ libwww mad mikmod mmx mng motif mpeg mssql ncurses nls odbc oggvorbis opengl oss pam pdflib perl png postgres ppds python qt quicktime readline samba sdl slang spell sse ssl tcpd tetex tiff truetype unicode usb wmf x86 xml2 xmms xv zlib linguas_de --- Additional Comment #1 From SpanKY 2005-01-25 06:46 PST --- please try debugging this on the forums and/or gentoo-user mailing list cu erik I can send the version of /bin/sleep compiled on my systems for x86 or amd64 but you may want to try sys-apps/daemontools to replace your script for (( i=0 ; $i20 ; i=$i+1 )) ; do /bin/sleep 1 ; echo '.' ; done tomorrow we will see if it has been terminated -- gentoo-user@gentoo.org mailing list
RE: [gentoo-user] sleep dies with SIGUSR1 sometimes
-Original Message- i am running sys-apps/coreutils-5.2.1 Well, I'm not sure exactly what might be causing sleep to be issuing a SIGUSR1 signal, but here's a few suggestions: 1. coreutils-5.3 is available from ftp://ftp.gnu.org/gnu/coreutils/coreutils-5.3.tar.gz so you might want to download it, build it, and install into /usr/local. It might be a resolved issue... 2. coreutils-5.2.1 appears to have new ebuilds available (r1 through r4). Emerging one of these may fix the problem. 3. I unpacked coreutils and did a brief walkthrough of the code but could not find that it was referencing SIGUSR1 at all. I noticed that your script simply calls 'sleep'. Calling sleep by name may not be calling /bin/sleep, it might be referencing a different sleep in your path or an alternate shell function. You could try replacing the simple 'sleep 2' with '/bin/sleep 2' to see if it has any effect. Dave -- gentoo-user@gentoo.org mailing list