Since today my notebook does not shutdown properly and hangs at the line of halt.sh shown in Summary. I typed in the root password (which was prompted or Controld-D for normal shutdown). After an lsof I killed manually the process of sadc: n22 ~ # ps -efla | grep sadc | fgrep -v grep 4 S root 22180 27835 0 76 0 - 434 - 16:48 pts/1 00:00:00 /usr/lib/sa/sadc -F -L 300 2 /var/log/sa/sa09 and could then type in halt again followed by poweroff. This problem did never appear before I updated baselayout today from version 1.9.4-r6. BTW I am starting sadc (package app-admin/sysstat-5.0.5-r1) via crontab: n22 ~ # crontab -l | grep sa1 0-59/15 * * * * /usr/lib/sa/sa1 300 3 & Reproducible: Sometimes Steps to Reproduce: 1. 2. 3. Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.11-hardened-r13 i686) ================================================================= System uname: 2.6.11-hardened-r13 i686 Intel(R) Pentium(R) M processor 1700MHz Gentoo Base System version 1.6.12 Python: dev-lang/python-2.3.5 [2.3.5 (#1, May 6 2005, 16:34:26)] ccache version 2.3 [enabled] dev-lang/python: 2.3.5 sys-apps/sandbox: [Not Present] sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.16 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /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/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="ftp://pandemonium.tiscali.de/pub/gentoo/ ftp://mirror.nutsmaas.nl/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ ftp://mir1.ovh.net/gentoo-distfiles/" LINGUAS="de en" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="x86 X acpi aim alsa apache2 arts avi berkdb bitmap-fonts blas cardbus cddb cdparanoia cdr crypt cups curl dvd dvdr dvdread emboss encode esd ethereal fam font-server foomaticdb fortran gd gdbm gif gpm gtk gtk2 imagemagick imlib innodb ipv6 jai java javascript jimi jpeg junit kde libg++ libwww live mad mbox mikmod mmx mmxext mng motif mp3 mpeg mysql nagios-dns nagios-ntp nagios-ping nagios-s ncurses network nls no-old-linux ogg oggvorbis opengl oss pam pcmcia pdflib perl png python qt quicktime readline real samba sasl scanner sdl slp smime snmp spell sse sse2 ssl subversion svg svga tcltk tcpd tiff truetype truetype-fonts type1-fonts usb userlocales vorbis webdav wifi xanim xfs xine xml2 xmms xv zlib linguas_de linguas_en userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
halt.sh uses `killall5` to kill off remaining processes ... when you login, does running `killall5 -9` kill the sadc command ?
Unfortunately no, but after a 'kill -9 <pid>' I could type 'exit' at the command prompt and then the system halted.
Is it really necessary to remount /dev readonly ?!? I added 'set -x' to halt.sh: # Since we use `mount` in mount_readonly(), but we parse /proc/mounts, we # have to make sure our /etc/mtab and /proc/mounts agree cp /proc/mounts /etc/mtab &>/dev/null set -x ebegin "Remounting remaining filesystems readonly" Hier is the output (cat /dev/vcs1): ... ++ [[ u == \u ]] ++ umount -r -r /dev umount: udev busy - remounted read-only Segmentation fault ++ retval=8 ++ for x in '$(awk '\''$1 != "none" { print $2 }'\'' /proc/mounts | sort -r)' ... BTW a normal 'kill <pid>' to sadc did also the job.
could you try downgrading to sysvinit-2.85-r1 and see if that works correctly ?
The old sysvinit works definitly better. I made the following changes : n22 ~ # diff -u halt.sh.orig /etc/init.d/halt.sh --- halt.sh.orig 2005-06-16 10:37:40.000000000 +0200 +++ /etc/init.d/halt.sh 2005-06-17 13:30:36.000000000 +0200 @@ -188,18 +188,24 @@ local x= local retval=0 local cmd=$1 + local ec=0 # Get better results with a sync and sleep sync; sync sleep 1 - for x in $(awk '$1 != "none" { print $2 }' /proc/mounts | sort -r) ; do + for x in $(awk '$1 != "none" && $2 != "/dev" { print $2 }' /proc/mounts | sort -ur) ; do x=${x//\\040/ } + ec=0 if [[ ${cmd} == "u" ]]; then umount -r -r "${x}" + ec=$? + [[ $ec != 0 ]] && ( echo " failed -r -r : $x" ; ps -efla | grep sa ) else mount -n -o remount,ro "${x}" &>/dev/null + ec=$? + [[ $ec != 0 ]] && ( echo " failed remount,ro : $x" ; ps -efla | grep sa ) fi - retval=$((${retval} + $?)) + retval=$((${retval} + $ec)) done [[ ${retval} -ne 0 ]] && killall5 -9 &>/dev/null return ${retval} and saw during shutdown/halt sometimes the line " failed remount,ro : / ..." followed by the greped process line (but only one time and only for the root file system the first remount readonly failed)
This bug seems to be related to sys-kernel/hardened-sources-2.6.11-r14, with sys-kernel/gentoo-sources-2.6.11-r11 I have no problems with ssys-apps/ysvinit-2.86
hmm, could you try it with the hardened kernel and when it asks you to login, run `killall5 -9 -v` and see if that has anything helpful ?
(In reply to comment #7) > run `killall5 -9 -v` and see if that has anything helpful ? '-v' is not accepted, only a signal number BTW yesterday I logged in at the console during shutdown but only the /dev file system was mounted beside /, all others were already unmounted so because there were no /proc I could not use lsof or so to gather more information about what's wrong.
sys-apps/baselayout-1.11.14-r8 works