Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 430318

Summary: sys-apps/openrc-0.10.5 fails to remounts reiserfs root file system read only on reboot: failed because we are using /
Product: Gentoo Hosted Projects Reporter: Thorsten Kampe <thorsten>
Component: OpenRCAssignee: OpenRC Team <openrc>
Status: UNCONFIRMED ---    
Severity: normal CC: hu
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Thorsten Kampe 2012-08-07 12:27:14 UTC
Last lines on reboot before "restarting system" indicate unclean unmount of /:

[green]* Remounting remaining filesystems read-only ... [ok]
[green]*   Remounting / read only ...
[red]  *   failed because we are using /                [ok]

On boot, transactions are replayed

REISERFS (device hda2): found reiserfs format "3.6" with standard journal
REISERFS (device hda2): using ordered data mode
reiserfs: using flush barriers
REISERFS (device hda2): journal params: device hda2, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
REISERFS (device hda2): checking transaction log (hda2)
REISERFS (device hda2): replayed 66 transactions in 2 seconds

This looks pretty similar to Bug 168977 which was solved in 2007. I don't know since when I have the issue (one year?) but definitely not since 2007.

emerge --info output:
Portage 2.1.11.9 (default/linux/x86/10.0/desktop/kde, gcc-4.6.3, unavailable, 3.5.0-gentoo i686)
=================================================================
System uname: Linux-3.5.0-gentoo-i686-Intel-R-_Core-TM-_i5-2520M_CPU_@_2.50GHz-with-gentoo-2.1
Timestamp of tree: Tue, 07 Aug 2012 07:45:01 +0000
ccache version 3.1.7 [enabled]
app-shells/bash:          4.2_p29
dev-java/java-config:     2.1.12
dev-lang/python:          2.7.2-r3, 3.2.3
dev-util/ccache:          3.1.7
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.10.5
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.4 (virtual/os-headers)
sys-libs/glibc:           2.15-r1
Repositories: gentoo rion roslin
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=core2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/redmine/config"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /var/lib/redmine/config/locales /var/lib/redmine/config/settings.yml"
CXXFLAGS="-O3 -march=core2 -pipe"
DISTDIR="/mnt/smb/distfiles"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles news notitles parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en cs de fr pl"
MAKEOPTS="--jobs=1 --load-average=1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/rion /var/lib/layman/roslin"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif gnome gpm gtk hal handbook iconv ipv6 jpeg kde kerberos kipi lcms ldap libnotify mad mng modules mp3 mp4 mpeg mudflap ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds pppd python qt3support qt4 readline samba sasl sdl semantic-desktop session slang slp spell sqlite sqlite3 ssl startup-notification svg syslog tcpd threads tiff tk truetype udev udisks unicode upower usb vnc vorbis webdav wxwidgets x264 x86 xcb xcomposite xinerama xinetd xml xscreensaver xv xvid 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 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard vmmouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en cs de fr pl" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="vmware" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 megabaks 2012-10-09 21:11:42 UTC
prelink -amfR: bug exist
else: no bug
fs reiserfs OR  lvm OR soft raid...
Comment 2 megabaks 2012-10-13 23:27:19 UTC
(In reply to comment #0)
just add
telinit u
after
sync; sync
in the /etc/init.d/mount-ro
enjoy
Comment 3 Thorsten Kampe 2012-10-16 09:43:02 UTC
I'm sorry for the late reply; neither prelink nor adding "telinit u" in the init script made a difference.

As far as I can see you suspect that some process is still having a handle open on the / mount. Wouldn't it make sense to do some kind of logging or debugging to see which one?
Comment 4 Thorsten Kampe 2012-10-16 10:28:33 UTC
I've added now a simple "ps -ef f > /ps.log" to /lib/rc/sh/rc-mount.sh (right before the "failed because we are using" line). This is what I get:
UID        PID  PPID  C STIME TTY      STAT   TIME CMD
root         2     0  0 12:17 ?        S      0:00 [kthreadd]
root         3     2  0 12:17 ?        S      0:00  \_ [ksoftirqd/0]
root         4     2  0 12:17 ?        S      0:00  \_ [kworker/0:0]
root         5     2  0 12:17 ?        S<     0:00  \_ [kworker/0:0H]
root         6     2  0 12:17 ?        S      0:00  \_ [kworker/u:0]
root         7     2  0 12:17 ?        S<     0:00  \_ [kworker/u:0H]
root         8     2  0 12:17 ?        S<     0:00  \_ [khelper]
root         9     2  0 12:17 ?        S      0:00  \_ [kdevtmpfs]
root       209     2  0 12:17 ?        S      0:00  \_ [bdi-default]
root       211     2  0 12:17 ?        S<     0:00  \_ [kblockd]
root       296     2  0 12:17 ?        S      0:00  \_ [khubd]
root       402     2  0 12:17 ?        S<     0:00  \_ [rpciod]
root       403     2  0 12:17 ?        S      0:00  \_ [kworker/0:1]
root       415     2  0 12:17 ?        S      0:00  \_ [kswapd0]
root       416     2  0 12:17 ?        SN     0:00  \_ [khugepaged]
root       417     2  0 12:17 ?        S      0:00  \_ [fsnotify_mark]
root       424     2  0 12:17 ?        S<     0:00  \_ [nfsiod]
root       425     2  0 12:17 ?        S<     0:00  \_ [cifsiod]
root       428     2  0 12:17 ?        S<     0:00  \_ [crypto]
root       974     2  0 12:17 ?        S      0:00  \_ [kworker/u:2]
root       983     2  0 12:17 ?        S<     0:00  \_ [ttm_swap]
root      1054     2  0 12:17 ?        S<     0:02  \_ [kworker/0:1H]
root      1084     2  0 12:17 ?        S      0:00  \_ [kworker/0:2]
root      1091     2  0 12:17 ?        S<     0:00  \_ [kpsmoused]
root      1151     2  0 12:17 ?        S<     0:00  \_ [deferwq]
root      1166     2  0 12:17 ?        S<     0:00  \_ [reiserfs]
root      1383     2  0 12:17 ?        S<     0:00  \_ [mpt_poll_0]
root      1384     2  0 12:17 ?        S<     0:00  \_ [mpt/0]
root      1387     2  0 12:17 ?        S      0:00  \_ [scsi_eh_0]
root      2141     2  0 12:17 ?        S      0:00  \_ [flush-3:0]
root      3409     2  0 12:18 ?        S      0:00  \_ [kworker/0:3]
root         1     0  0 12:17 ?        Ss     0:01 init [6]         
root      5342     1  0 12:21 ?        Ss     0:00 /sbin/rc reboot
root      6239  5342  0 12:22 ?        S      0:00  \_ /sbin/runscript /etc/init.d/mount-ro --lockfd 48 start
root      6240  6239  0 12:22 ?        S      0:00      \_ /bin/sh /lib/rc/sh/runscript.sh /etc/init.d/mount-ro start
root      6261  6240  0 12:22 ?        R      0:00          \_ ps -ef f
Comment 5 William Hubbs gentoo-dev 2012-10-16 17:46:35 UTC
(In reply to comment #4)
> I've added now a simple "ps -ef f > /ps.log" to /lib/rc/sh/rc-mount.sh
> (right before the "failed because we are using" line). This is what I get:

Which version of linux-utils are you running?

Add this command in place of your ps command; I think it will give better information about which processes are using the file system.

fuser -v $f_opts "$mnt" > /fuser.log 2>&1

What does that output look like?
Comment 6 Thorsten Kampe 2012-10-18 10:27:50 UTC
(In reply to comment #5)
> (In reply to comment #4)
> Which version of linux-utils are you running?

util-linux-2.22.1

> Add this command in place of your ps command; I think it will give better
> information about which processes are using the file system.
> 
> fuser -v $f_opts "$mnt" > /fuser.log 2>&1
> 
> What does that output look like?

                     USER        PID ACCESS COMMAND
/:                   root     kernel mount /
                     root          1 .rce. init
                     root          2 .rc.. kthreadd
                     root          3 .rc.. ksoftirqd/0
                     root          5 .rc.. kworker/0:0H
                     root          6 .rc.. kworker/u:0
                     root          7 .rc.. kworker/u:0H
                     root          8 .rc.. khelper
                     root          9 .rc.. kdevtmpfs
                     root         10 .rc.. kworker/u:1
                     root        209 .rc.. bdi-default
                     root        211 .rc.. kblockd
                     root        296 .rc.. khubd
                     root        402 .rc.. rpciod
                     root        403 .rc.. kworker/0:1
                     root        415 .rc.. kswapd0
                     root        416 .rc.. khugepaged
                     root        417 .rc.. fsnotify_mark
                     root        424 .rc.. nfsiod
                     root        425 .rc.. cifsiod
                     root        428 .rc.. crypto
                     root        983 .rc.. ttm_swap
                     root       1054 .rc.. kworker/0:1H
                     root       1090 .rc.. kpsmoused
                     root       1092 .rc.. kworker/0:2
                     root       1151 .rc.. deferwq
                     root       1166 .rc.. reiserfs
                     root       1384 .rc.. mpt_poll_0
                     root       1385 .rc.. mpt/0
                     root       1387 .rc.. scsi_eh_0
                     root       2154 .rc.. flush-3:0
                     root       7370 .rc.. kworker/0:0
                     root       7466 .rc.. kworker/0:3
                     root       8649 .rce. rc
                     root       9573 .rce. mount-ro
                     root       9574 frce. runscript.sh
Comment 7 Yun Zheng Hu 2012-11-07 11:40:33 UTC
I have the same problem with openrc-0.9.8.4 when using PXE boot in combination with NFS share for the squashfs image.

My fuser output looks about the same:

livecd ~ # cat /fuser.log 
                     USER        PID ACCESS COMMAND
/:                   root     kernel mount /
                     root          1 .rc.. init
                     root          2 .rc.. kthreadd
                     root          3 .rc.. ksoftirqd/0
                     root          5 .rc.. kworker/u:0
                     root          6 .rc.. migration/0
                     root          7 .rc.. cpuset
                     root          8 .rc.. khelper
                     root          9 .rc.. kdevtmpfs
                     root         10 .rc.. netns
                     root         11 .rc.. kworker/u:1
                     root        117 .rc.. sync_supers
                     root        119 .rc.. bdi-default
                     root        121 .rc.. kblockd
                     root        283 .rc.. md
                     root        406 .rc.. kswapd0
                     root        407 .rc.. fsnotify_mark
                     root        408 .rc.. xfs_mru_cache
                     root        409 .rc.. xfslogd
                     root        410 .rc.. xfsdatad
                     root        411 .rc.. xfsconvertd
                     root        412 .rc.. ocfs2_wq
                     root        413 .rc.. user_dlm
                     root        415 .rc.. glock_workqueue
                     root        416 .rc.. delete_workqueu
                     root        417 .rc.. gfs_recovery
                     root        418 .rc.. crypto
                     root        569 .rc.. iscsi_eh
                     root        571 .rc.. bnx2i_thread/0
                     root        576 .rc.. cnic_wq
                     root        577 .rc.. bnx2x
                     root        591 .rc.. kpsmoused
                     root        602 .rc.. kworker/0:2
                     root       1792 .rc.. ata_sff
                     root       4885 .rc.. scsi_eh_0
                     root       4888 .rc.. scsi_eh_1
                     root       7203 .rc.. mpt_poll_0
                     root       7204 .rc.. mpt/0
                     root       7205 .rc.. scsi_eh_2
                     root       7965 .rc.. cciss_scan
                     root       9540 .rc.. khubd
                     root      15004 .rc.. jfsIO
                     root      15005 .rc.. jfsCommit
                     root      15006 .rc.. jfsSync
                     root      15209 .rc.. rpciod
                     root      15216 .rc.. nfsiod
                     root      16210 .rce. busybox
                     root      16219 .rc.. loop0
                     root      22345 .rc.. udevd
                     root      22713 .rc.. udevd
                     root      22714 .rc.. udevd
                     root      23143 Frc.. dhcpcd
                     root      23233 .rc.. bash
                     root      23234 .rc.. bash
                     root      23235 .rc.. bash
                     root      23236 .rc.. bash
                     root      23237 .rc.. bash
                     root      23238 .rc.. bash
                     root      23271 .rc.. kworker/0:1
                     root      23281 .rc.. sshd
                     root      23283 .rc.. bash
                     root      24909 .rc.. mount-ro
                     root      25087 .rc.. runscript.sh