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

Bug 317095

Summary: sys-apps/openrc-0.6.1-r1: strange reaction to unexpected filesystem inconsistency
Product: Gentoo Linux Reporter: Alexander E. Patrakov <patrakov>
Component: [OLD] baselayoutAssignee: OpenRC Team <openrc>
Status: RESOLVED INVALID    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: screenshot (1/2) taken with rc_parallel="YES"
screenshot (2/2) taken with rc_parallel="YES"
screenshot (1/2) taken with rc_parallel="NO"
screenshot (2/2) taken with rc_parallel="NO"

Description Alexander E. Patrakov 2010-04-25 10:24:31 UTC
If a filesystem has unexpected inconsietency, then the failed filesystem gets checked twice. If the parallel startup is enabled, then other services are attempted to be started after fsck failure. I think that the issue is best illustrated with screenshots. I will attach them to this bug report.

In both cases (enabled and disabled parallel startup), the system ends up with the root filesystem mounted read-only, the failed filesystem not mounted, and getties running on virtual consoles. Root can log in via those getties and run fsck manually. However, I am not sure that it is indeed the desired outcome. Other distros in the case of fsck failure fall back to single-user mode (via sulogin), not to runlevel 3 with getties.

Reproducible: Always

Steps to Reproduce:
1. Boot the system with a bad error on /dev/sda5 (or simulate this failure by editing the fsck bootscript)

Actual Results:  
fsck runs twice, additional services are attempted to be started if rc_parallel="YES", the screen is filled with red errors, the system boots to getties

Expected Results:  
fsck runs once, additional services are not started (if possible), exactly one red error on the screen (about fsck), and maybe /sbin/sulogin instead of getties

I use the multilib overlay.

aep@home ~ $ egrep -v '^($|#)' /etc/rc.conf 
rc_parallel="YES"
rc_interactive="YES"
rc_shell=/sbin/sulogin
unicode="YES"
net_fs_list="afs cifs coda davfs fuse fuse.sshfs gfs glusterfs lustre ncpfs nfs nfs4 ocfs2 shfs smbfs"
rc_tty_number=12

aep@home ~ $ /sbin/rc-update 
                fcron |                                default        
             net.ppp0 |                                default        
               sysctl |                           boot                
       udev-postmount |                                default        
             mount-ro |                  shutdown                     
              urandom |                           boot                
             hostname |                           boot                
                 nscd |                           boot                
             bootmisc |                           boot                
                 dbus |                                default        
            killprocs |                  shutdown                     
              keymaps |                           boot                
             net.eth0 |                                default        
               net.lo |                           boot                
                 udev |                                        sysinit
               procfs |                           boot                
              rsyslog |                           boot                
              dnsmasq |                                default        
                 fsck |                           boot                
           consolekit |                                default        
                dmesg |                                        sysinit
          consolefont |                           boot                
                 root |                           boot                
                devfs |                                        sysinit
           localmount |                           boot                
            savecache |                  shutdown                     
                cupsd |                                default        
                acpid |                                default        
            alsasound |                           boot                
                 swap |                           boot                
             net.tap0 |                                default        
                local |        nonetwork               default        
              hwclock |                           boot                
             iptables |                                default        
                 ntpd |                                default        
         termencoding |                           boot                
              modules |                           boot                
                 mtab |                           boot                

aep@home ~ $ emerge --info
Portage 2.2_rc67-r4 (default/linux/amd64/10.0/desktop, gcc-4.4.3, glibc-2.11-r1, 2.6.33-gentoo-r1 x86_64)
=================================================================
System uname: Linux-2.6.33-gentoo-r1-x86_64-Intel-R-_Core-TM-2_CPU_6420_@_2.13GHz-with-gentoo-2.0.1
Timestamp of tree: Sat, 24 Apr 2010 02:45:01 +0000
app-shells/bash:     4.1_p5
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.5-r1, 3.1.2-r2
dev-util/cmake:      2.8.1-r1
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1
sys-devel/gcc:       4.4.3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.33
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -fomit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=core2 -fomit-frame-pointer -pipe"
DISTDIR="/home/distfiles"
FEATURES="assume-digests buildpkg distlocks fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="ru_RU.UTF-8"
LDFLAGS="-Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/home/packages/amd64"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/home/build"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/multilib /var/lib/layman/java-overlay /var/lib/layman/lxde"
SYNC="rsync://mirror.yandex.ru/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 amr applet archive artworkextra automount bash-completion berkdb bidi bluetooth bzip2 cairo caps cdda cddb cdr cjk cli consolekit cracklib crypt css cups cxx dbus dirac djvu dri dts dvb dvd dvdr emboss encode exif faac faad fastcgi ffmpeg firefox flac fontconfig fortran fuse gcj gdbm gif gimp glibc-omitfp gnuplot gphoto2 gsm gtk iconv icq idn ieee1394 ipod ipv6 jabber jack jbig jingle jpeg jpeg2k ladspa lame lash latex lcms ldap libsamplerate lirc mad mikmod mmx mmxext mng modules mozilla mp3 mp4 mpeg mplayer mudflap multilib musepack ncurses nls nocd nptl nptlonly nsplugin ogg opengl openmp pam pango pch pcre pdf perl png policykit ppds pppd python qt3support raw rdesktop readline reflection samba scanner schroedinger sdl seamonkey session shorten smp speex spell spl sse sse2 sse3 ssl ssse3 startup-notification svg symlink sysfs tcl tcpd theora threads tiff tk truetype unicode usb v4l2 videos vim-syntax vnc vorbis wifi winbind wmf x264 xattr xcb xcomposite xinerama xml xmp xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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 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" CAMERAS="ptp2" DVB_CARDS="tda10046lifeview" ELIBC="glibc" INPUT_DEVICES="evdev synaptics keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIRC_DEVICES="devinput audio_alsa inputlirc" RUBY_TARGETS="ruby18" SANE_BACKENDS="gt68xx" USERLAND="GNU" VIDEO_CARDS="intel" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Alexander E. Patrakov 2010-04-25 10:32:29 UTC
Created attachment 229069 [details]
screenshot (1/2) taken with rc_parallel="YES"

As you can see, fsck checks /dev/sda5 again, and vde is attempted to be started
Comment 2 Alexander E. Patrakov 2010-04-25 10:34:09 UTC
Created attachment 229071 [details]
screenshot (2/2) taken with rc_parallel="YES"

The end result is a getty. The "lx" entry in my inittab is about lxdm.
Comment 3 Alexander E. Patrakov 2010-04-25 10:35:45 UTC
Created attachment 229073 [details]
screenshot (1/2) taken with rc_parallel="NO"

with rc_parallel="NO", there are less red errors, but a second (redundant) fsck still takes place
Comment 4 Alexander E. Patrakov 2010-04-25 10:37:16 UTC
Created attachment 229075 [details]
screenshot (2/2) taken with rc_parallel="NO"

With rc_parallel="NO", vde is not attempted to be started, good! The getty is behind the error message about "lx".
Comment 5 Roy Marples 2010-04-29 17:46:35 UTC
The fact it's checked twice is not a bug as such. It's marked as failed in the boot phase. This flag is cleaned (by design) when rc is run again in the default phase.

To resolve this, simply remove the boot runlevel from /etc/inittab - OpenRC will still start services in the correct order.
Comment 6 William Hubbs gentoo-dev 2011-03-27 22:27:32 UTC
(In reply to comment #5)
> The fact it's checked twice is not a bug as such. It's marked as failed in the
> boot phase. This flag is cleaned (by design) when rc is run again in the
> default phase.
> To resolve this, simply remove the boot runlevel from /etc/inittab - OpenRC
> will still start services in the correct order.

I haven't seen any activity on this bug in almost a year, and due to the explanation of why the filesystem is checked twice, I do not see that anything needs to be done here, so I am closing this as invalid.