On my server, if have the problem that I cannot stop sshd using the init script because start-stop-daemon fails to find the process. A short example that shows the problem: pollux ~ # p | grep sshd root 14320 0.0 0.0 3756 1020 ? Ss Sep01 0:00 /usr/sbin/sshd root 30364 0.0 0.0 6584 2124 ? Ss 19:30 0:00 sshd: chris [priv] chris 30366 0.0 0.0 6748 1432 ? S 19:30 0:00 sshd: chris@ttyp1 root 24051 0.0 0.0 1480 456 ttyp1 S+ 23:05 0:00 grep --colour=auto sshd pollux ~ # /etc/init.d/sshd stop * Stopping sshd ... [ !! ] pollux ~ # start-stop-daemon --stop --exec /usr/sbin/sshd --pidfile /var/run/sshd.pid No /usr/sbin/sshd found running; none killed. Other services work fine as far as I can tell but maybe I just did not see the problem with them. The problem does not happen immediately after starting the service, i.e. I kill sshd by hand now, zap the init script and restart the service, I could stop sshd gracefully using the init script. But if I wait some days, it is very likely that the problem occurs. Reproducible: Sometimes Steps to Reproduce: 1. Let sshd run some time (days or weeks). 2. Try to stop it either via init script or by hand. 3. Error. Actual Results: * Stopping sshd ... [ !! ] Expected Results: * Stopping sshd ... [ OK ] This is no normal server which is why I filed this bug with Hardware Platform set to "Other". It is a vServer virtualized using Virtuozzo and hosted at my German provider 1 & 1. Gentoo is not officially supported (it was quite a task to get it running at all). Maybe that is somehow related to the problem although I cannot see how it could. Output from emerge --info: Portage 2.1.2.12 (default-linux/x86/vserver, gcc-3.4.5, glibc-2.3.5-r3, 2.6.9-023stab044.4-smp i686) ================================================================= System uname: 2.6.9-023stab044.4-smp i686 Dual Core AMD Opteron(tm) Processor 175 Gentoo Base System version 1.6.14 Timestamp of tree: Fri, 07 Sep 2007 16:00:01 +0000 app-shells/bash: 3.2_p17 dev-lang/python: 2.4.4-r4 dev-python/pycrypto: 2.0.1-r6 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.17 sys-devel/gcc-config: 1.3.16 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.21 ACCEPT_KEYWORDS="x86" CBUILD="i386-pc-linux-gnu" CFLAGS="-O2 -mtune=opteron -pipe" CHOST="i386-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-O2 -mtune=opteron -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://pandemonium.tiscali.de/pub/gentoo/" MAKEOPTS="-j1" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="apache2 berkdb bitmap-fonts bzip2 cli cracklib crypt ctype dri fortran gd iconv ipv6 isdnlog mbox midi mudflap mysql ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection sasl session spl ssl tcpd truetype-fonts type1-fonts x86 xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY Strace: execve("/sbin/start-stop-daemon", ["start-stop-daemon", "--stop", "--exec", "/usr/sbin/sshd", "--pidfile", "/var/run/sshd.pid"], [/* 27 vars */]) = 0 uname({sys="Linux", node="pollux", ...}) = 0 brk(0) = 0x804d000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=12097, ...}) = 0 mmap2(NULL, 12097, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fea000 close(3) = 0 open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300T\1"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1200352, ...}) = 0 mmap2(NULL, 1142068, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7ed3000 mmap2(0xb7fe4000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x111) = 0xb7fe4000 mmap2(0xb7fe8000, 7476, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7fe8000 close(3) = 0 mprotect(0xb7fe4000, 4096, PROT_READ) = 0 mprotect(0xb8000000, 4096, PROT_READ) = 0 munmap(0xb7fea000, 12097) = 0 open("/dev/urandom", O_RDONLY) = 3 read(3, "I\272\231n", 4) = 4 close(3) = 0 stat64("/usr/sbin/sshd", {st_mode=S_IFREG|0755, st_size=312688, ...}) = 0 brk(0) = 0x804d000 brk(0x806e000) = 0x806e000 open("/var/run/sshd.pid", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=6, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fec000 read(3, "14320\n", 4096) = 6 stat64("/proc/14320/exe", {st_mode=S_IFREG|0755, st_size=307588, ...}) = 0 close(3) = 0 munmap(0xb7fec000, 4096) = 0 fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(3, 1), ...}) = 0 ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fec000 write(1, "No /usr/sbin/sshd found running;"..., 46No /usr/sbin/sshd found running; none killed. ) = 46 munmap(0xb7fec000, 4096) = 0 exit_group(1) = ? Process 28624 detached Ltrace: __libc_start_main(0x80498b0, 6, 0xbfffd694, 0x804a870, 0x804a8d0 <unfinished ...> getopt_long(6, 0xbfffd694, "HKSV:a:n:op:qr:s:tu:vx:c:N:bmR:g"..., 0x804c220, NULL) = 75 getopt_long(6, 0xbfffd694, "HKSV:a:n:op:qr:s:tu:vx:c:N:bmR:g"..., 0x804c220, NULL) = 120 getopt_long(6, 0xbfffd694, "HKSV:a:n:op:qr:s:tu:vx:c:N:bmR:g"..., 0x804c220, NULL) = 112 getopt_long(6, 0xbfffd694, "HKSV:a:n:op:qr:s:tu:vx:c:N:bmR:g"..., 0x804c220, NULL) = -1 __xstat(3, "/usr/sbin/sshd", 0x804c820) = 0 strncpy(0x804c420, "/usr/sbin/sshd", 1024) = 0x804c420 fopen("/var/run/sshd.pid", "r") = 0x804d050 fscanf(0x804d050, 0x804acf6, 0xbfffd53c, 0x80487e8, 0xb7edad2c) = 1 sprintf("/proc/14320/exe", "/proc/%d/exe", 14320) = 15 __xstat(3, "/proc/14320/exe", 0xbfffd4a0) = 0 fclose(0x804d050) = 0 printf("No %s found running; none killed"..., "/usr/sbin/sshd"No /usr/sbin/sshd found running; none killed. ) = 46 exit(1 <unfinished ...> +++ exited (status 1) +++ If you need any kind of additional information, feel free to ask.
Okay, now I expierenced the problem with Apache. Seems like it does affect all services using start-stop-daemon potentially. Killall [service] + zap + start helps.
This is not limited to virtual servers, I've just run into the problem of not being able to stop sshd on my non-virtual server as well: chani ~ # ps aux | grep /sshd | grep -v grep root 3959 0.0 0.1 4012 1052 ? Ss Aug28 0:04 /usr/sbin/sshd chani ~ # cat /var/run/sshd.pid 3959 chani ~ # /etc/init.d/sshd stop * Stopping sshd ... [ !! ] chani ~ # start-stop-daemon --stop --exec /usr/sbin/sshd --pidfile /var/run/sshd.pid No /usr/sbin/sshd found running; none killed. chani ~ # emerge --info Portage 2.1.3.9 (default-linux/x86/2006.1, gcc-4.1.2, glibc-2.6.1-r0, 2.6.21-gentoo i686) ================================================================= System uname: 2.6.21-gentoo i686 AMD Athlon(tm) XP 2600+ Timestamp of tree: Wed, 12 Sep 2007 02:50:01 +0000 app-shells/bash: 3.2_p17-r1 dev-java/java-config: 1.3.7, 2.0.33-r1 dev-lang/python: 2.4.4-r4, 2.5.1-r2 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 1.12.10-r4 sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.18.50.0.1 sys-devel/gcc-config: 1.4.0-r2 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.22-r2 ACCEPT_KEYWORDS="x86 ~x86" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ANT_HOME="/usr/share/ant-core" ARCH="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CCACHE_SIZE="250M" CFLAGS="-O2 -march=athlon-xp -pipe -mno-tls-direct-seg-refs" CHOST="i686-pc-linux-gnu" CLASSPATH="." CLEAN_DELAY="5" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CVS_RSH="ssh" CXXFLAGS="-O2 -march=athlon-xp -pipe -mno-tls-direct-seg-refs" DISTDIR="/usr/portage/distfiles" EDITOR="/bin/nano" ELIBC="glibc" EMERGE_DEFAULT_OPTS="--ask --verbose" EMERGE_WARNING_DELAY="10" FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox" FETCHCOMMAND="/usr/bin/wget -t 5 -T 60 --passive-ftp -O ${DISTDIR}/${FILE} ${URI}" GCC_SPECS="" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" G_BROKEN_FILENAMES="1" G_FILENAME_ENCODING="UTF-8" HOME="/root" INFOPATH="/usr/share/info:/usr/share/binutils-data/i686-pc-linux-gnu/2.17/info:/usr/share/gcc-data/i686-pc-linux-gnu/4.1.2/info" INPUT_DEVICES="keyboard mouse evdev" JAVAC="/etc/java-config-2/current-system-vm/bin/javac" JAVA_HOME="/etc/java-config-2/current-system-vm" JDK_HOME="/etc/java-config-2/current-system-vm" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LESS="-R -M --shift 5" LESSOPEN="|lesspipe.sh %s" LINGUAS="en de" LOGNAME="root" LS_COLORS="no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:" MAKEOPTS="-j2" MANPATH="/etc/java-config-2/current-system-vm/man:/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/i686-pc-linux-gnu/2.17/man:/usr/share/gcc-data/i686-pc-linux-gnu/4.1.2/man:/etc/java-config/system-vm/man/:/usr/lib/php5/man/" PAGER="/usr/bin/less" PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.1.1:/usr/i686-pc-linux-gnu/gcc-bin/4.1.2" PKGDIR="/usr/portage/packages" PORTAGE_ARCHLIST="ppc s390 amd64 x86 ppc64 x86-fbsd m68k arm sparc sh mips ia64 alpha ppc-macos hppa sparc-fbsd" PORTAGE_BINHOST_CHUNKSIZE="3000" PORTAGE_BIN_PATH="/usr/lib/portage/bin" PORTAGE_CONFIGROOT="/" PORTAGE_DEBUG="0" PORTAGE_DEPCACHEDIR="/var/cache/edb/dep" PORTAGE_ELOG_CLASSES="warn error log" PORTAGE_ELOG_MAILFROM="***don't want this spammed***" PORTAGE_ELOG_MAILSUBJECT="Portage ${HOST}: ${PACKAGE}" PORTAGE_ELOG_MAILURI="***don't want this spammed*** localhost" PORTAGE_ELOG_SYSTEM="save_summary mail_summary" PORTAGE_GID="250" PORTAGE_INST_GID="0" PORTAGE_INST_UID="0" PORTAGE_NICENESS="3" PORTAGE_PYM_PATH="/usr/lib/portage/pym" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_RSYNC_RETRIES="3" PORTAGE_TMPDIR="/var/tmp" PORTAGE_WORKDIR_MODE="0700" PORTDIR="/usr/portage" PWD="/root" PYTHONPATH="/usr/lib/portage/pym" RESUMECOMMAND="/usr/bin/wget -c -t 5 -T 60 --passive-ftp -O ${DISTDIR}/${FILE} ${URI}" ROOT="/" ROOTPATH="/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.1.1:/usr/i686-pc-linux-gnu/gcc-bin/4.1.2" RPMDIR="/usr/portage/rpm" RUBYOPT="-rauto_gem" SHELL="/bin/bash" SHLVL="1" STAGE1_USE="nptl nptlonly unicode" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" TERM="screen" USE="apache2 bash-completion berkdb bitmap-fonts cli cracklib crypt cups dri fortran gdbm iconv isdnlog jabber midi mudflap ncurses nls nptl nptlonly offensive openmp oscar pam pcre perl pic ppds pppd python readline reflection session spl ssl tcpd truetype-fonts type1-fonts unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo" USER="root" USERLAND="GNU" USE_EXPAND="ALSA_CARDS ALSA_PCM_PLUGINS CAMERAS CROSSCOMPILE_OPTS DVB_CARDS ELIBC FCDSL_CARDS FOO2ZJS_DEVICES FRITZCAPI_CARDS INPUT_DEVICES KERNEL LCD_DEVICES LINGUAS LIRC_DEVICES MISDN_CARDS USERLAND VIDEO_CARDS" USE_EXPAND_HIDDEN="CROSSCOMPILE_OPTS ELIBC KERNEL USERLAND" USE_ORDER="env:pkg:conf:defaults:pkginternal:env.d" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo" XARGS="xargs -r" _="/usr/bin/emerge"
no idea, please report is this is still an issue with baselayout-2*
This just happened to me again (on baselayout-1.12.11.1 though). Here's what I did: 1. emerge -1va openssl (there's a new GLSA out) 2. /etc/init.d/openssh restart (worked) 3. emerge -1va portage (update available) 4. emerge -DNuva world (while I'm at it...) 5. dispatch-conf 6. python-updater (2.4 to 2.5, nothing rebuilt) 7. revdep-rebuild (rebuilt ImageMagick) 8. emerge -1va openssh (just to make sure the OpenSSL update is applied) 9. /etc/init.d/openssh restart (did not work) Now, what does "did not work" mean? host ~ # /etc/init.d/sshd restart * Caching service dependencies ... [ ok ] * Stopping sshd ... [ !! ] Now /var/run/sshd.pid contains the correct PID (31357), but calling start-stop-daemon --stop --exec /usr/sbin/sshd --pidfile /var/run/sshd.pid results in No /usr/sbin/sshd found running; none killed. But: host ~ # ps aux | grep -f /var/run/sshd.pid root 31357 0.0 0.0 33484 1100 ? Ss 10:15 0:00 /usr/sbin/sshd Probably this is a problem of start-stop-daemon, no idea. Just wanted to let you know that this problem still exists. Also, this is _not_ a virtual server, so the bug should probably be reassigned.
i think the problem is caused by the sshd init script, at least i have encountered it as well recently, and fixed it by killing sshd manually (take care to not kill your active ssh session!) and running /etc/init.d/sshd zap start
Same issue. Very annoying because I can't update my sshd_conf... openssh: 5.2_p1-r1 baselayout: 1.12.11.1
(In reply to comment #6) > Same issue. Very annoying because I can't update my sshd_conf... please se my suggestion above > baselayout: 1.12.11.1 please upgrade to openrc asap, baselaout-1 is not supported inside vservers