Summary: | sys-apps/baselayout-1.11.12-r4: halt.sh stops during "Remounting remaining filesystems readonly" | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | [OLD] baselayout | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Other | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 99413 |
Description
Toralf Förster
![]() 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 |