Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 572138 - sys-apps/openrc causes bad boots localmount fails to run
Summary: sys-apps/openrc causes bad boots localmount fails to run
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: AMD64 Linux
: Normal major (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-16 22:24 UTC by John Cox
Modified: 2016-01-19 19:52 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
/etc/fstab from my system. (fstab,1.93 KB, text/plain)
2016-01-17 14:01 UTC, John Cox
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Cox 2016-01-16 22:24:20 UTC
sys-apps/openrc versions 0.18.4 through versions 0.20.2 cause my gentoo linux system to fail to start correctly. The symptom is that localmount fails to start leaving the network and many other services inoperable. Versions 0.16.4 and versions 0.17 (at least) do operate correctly.

Reproducible: Always




emerge --info on openrc follows:

jc@bopper /etc/portage $ emerge --info =sys-app/openrc-0.18.2

emerge: there are no ebuilds to satisfy "=sys-app/openrc-0.18.2".

emerge: searching for similar names...
emerge: Maybe you meant any of these: sys-apps/openrc, sys-apps/prctl, sys-apps/nca?
jc@bopper /etc/portage $ emerge --info =sys-apps/openrc-0.18.2
Portage 2.2.26 (python 2.7.10-final-0, default/linux/amd64/13.0/desktop, gcc-4.9.3, glibc-2.21-r1, 4.1.12-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.1.12-gentoo-x86_64-AMD_Phenom-tm-_II_X4_970_Processor-with-gentoo-2.2
KiB Mem:    16429456 total,  11973080 free
KiB Swap:    1021948 total,   1021948 free
Timestamp of repository gentoo: Sat, 16 Jan 2016 02:30:01 +0000
sh bash 4.3_p42-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r1::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.3.5-r2::gentoo, 3.4.3-r1::gentoo
dev-util/cmake:           3.3.1-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.17::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.10.3-r1::gentoo, 1.11.6-r1::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r1::gentoo                                                                                
Repositories:                                                                                                            
                                                                                                                         
gentoo                                                                                                                   
    location: /usr/portage                                                                                               
    sync-type: rsync                                                                                                     
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage                                                                    
    priority: -1000                                                                                                      
                                                                                                                         
x-portage                                                                                                                
    location: /usr/local/portage                                                                                         
    masters: gentoo                                                                                                      
    priority: 0                                                                                                          
                                                                                                                         
ACCEPT_KEYWORDS="amd64"                                                                                                  
ACCEPT_LICENSE="* -@EULA"                                                                                                
CBUILD="x86_64-pc-linux-gnu"                                                                                             
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/php/cli-php5.6/ext-active/ /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 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="3dnow X Xaw3d a52 aac aalib acl acpi aim alsa amd64 ao apache2 apm audiofile avahi berkdb bidi blas bluetooth branding bzip2 cairo calendar caps cdda cddb cdinstall cdparanoia cdr cgi clamav cli consolekit cracklib crypt css ctype cups curl cvs cxx dbi dbm dbus dbx dga directfb dri dts dv dvb dvd dvdr emboss encode enscript evo examples exif expat fam fastcgi fbcon firefox flac fontconfig foomaticdb fortran freetype ftp gcj gdbm gif gimp glamor glu gmp gnuplot gnutls gphoto2 gpm graphviz gsl gsm gstreamer guile gzip hal handbook hddtemp httpd iconv icq icu idn ieee1394 imagemagick imlib innodb introspection iodbc ipv6 jabber java java6 javascript jbig jingle jpeg jpeg2k kde kontact lapack lcms ldap libcaca libedit libgda libnotify libwww lm_sensors lua lzma lzo mad maildir matroska mikmod milter mime mmap mmx mmxext mng modules motif mozilla mp3 mp4 mpeg mpi mplayer msn multilib musepac mysql mysqli nas ncurses networkmanager nls nntp nptl nsplugin odbc offensive ofx ogg oggvorbis opengl openmp osc oscar oss pam pango pch pcntl pcre pdf perl php plasma plotutils png policykit portaudio posix postgres ppds pulseaudio python qt3support qt4 quicktime raw rdesktop readline rss ruby samba sasl sdl seccomp semantic-desktop session sharedext sharedmem simplexml smp sndfile snmp soap sockets socks5 speex spell sqlite sqlite3 sse sse2 ssl startup-notification stream subversion suid svg symlink syslog sysvipc szip tcl tcpd theora threads tidy tiff timiditytk tokenizer truetype udev udisks unicode upower usb v4l v4l2 vcd vlm vorbis win32codecs wmf wxwidgets x264 xattr xcb xcomposite xft xine xinerama xinetd xml xnlrpc xosd xv xvid yahoo zeroconf zlib" ABI_X86="64" 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" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" 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 ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="nvidia nouveau" XFCE_PLUGINS="brightness menu trash" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

jc@bopper /etc/portage $
Comment 1 William Hubbs gentoo-dev 2016-01-17 03:47:37 UTC
There was a news item published with OpenRC-0.18.x that explained a
change in the behaviour of localmount and netmount [1].

In the past, they were always successful. This is inaccurate however,
because filesystems could fail to mount and we would ignore this.

If you have filesystems listed in fstab that should not automount at
boot, add noauto to the mount options for these file systems.

If you do not understand what I'm suggesting,  or if you have more
questions, let me know.

Thanks,

William



[1]
https://gitweb.gentoo.org/data/gentoo-news.git/plain/2015-10-07-openrc-0-18-localmount-and-netmount-changes/2015-10-07-openrc-0-18-localmount-and-netmount-changes.en.txt
Comment 2 John Cox 2016-01-17 04:46:42 UTC
Is this news item still available? If so, doesn't failing to produce a usable system a serious punishment?

This is my fstab. I'd appreciate your comments:

jc@bopper /etc $ cat fstab
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't 
# needed; notail increases performance of ReiserFS (at the expense of storage 
# efficiency).  It's safe to drop the noatime options if you want and to 
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
UUID=dfbd92d1-ef3f-4496-bc71-97aacf0fd096 /boot    ext4            nofail,noatime,nodiratime,discard 0 1
/dev/mapper/pdc_dcgidcdjbp6 /gentoo     ext4            nofail,user_xattr,errors=remount-ro 0 1
/dev/mapper/pdc_dcgidcdjbp7 none        swap    sw              0       0
/dev/mapper/pdc_dcgidcdjbp2 /windows    ntfs-3g         noauto,user     1 3
/dev/cdrom              /mnt/cdrom      auto            noauto,user     0 0
/dev/mapper/pdc_dcgidcdjbp5 /kubuntu    ext4    nofail,errors=remount-ro      1 3
/dev/mapper/pdc_dcgidcdjbp3 /boot2      ext4           nofail,defaults        1 4
#UUID=dfbd92d1-ef3f-4496-bc71-97aacf0fd096 /ssdboot    ext4            nofail,noatime,nodiratime,discard 0 1

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for 
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0

/tmp       tmpfs   defaults,noatime,mode=1777   0  0
/var/spool tmpfs   defaults,noatime,mode=1777   0  0
/var/tmp   tmpfs   defaults,noatime,mode=1777   0  0
/var/log   tmpfs   defaults,noatime,mode=0755   0  0
#/dev/mapper/pdc_dcgidcdjbp6 / ext4 errors=remount-ro,user_xattr 0 1
UUID=ce12cbd3-e132-49fd-9076-4a444316c489 /  ext4   nofail,noatime,nodiratime,discard,user_xattr,errors=remount-ro 0 1

jc@bopper /etc $
Comment 3 William Hubbs gentoo-dev 2016-01-17 07:38:43 UTC
Because of the way bugzilla wraps comments to 80 characters, it is
difficult to read your fstab in the above comment. Please attach the
file instead of pasting it inline.

Also, I need to see the messages that are showing up when you run
localmount. It should be giving you some error messages about what is
failing to mount.
Comment 4 John Cox 2016-01-17 13:59:03 UTC
I will recreate the error and wrote down the errors if you can suggest a way to make it happen. I can't see the errors during startup and haven't found a file that lists everything. I have tried to start localmount after the system boots and get a bunch of failures.
Comment 5 John Cox 2016-01-17 13:59:57 UTC
I will recreate the error and wrote down the errors if you can suggest a way to make it happen. I can't see the errors during startup and haven't found a file that lists everything. I have tried to start localmount after the system boots and get a bunch of failures.
Comment 6 John Cox 2016-01-17 14:01:10 UTC
Created attachment 423162 [details]
/etc/fstab from my system.
Comment 7 William Hubbs gentoo-dev 2016-01-17 18:16:19 UTC
The following lines appear to be the problem.

/tmp       tmpfs   defaults,noatime,mode=1777   0  0
/var/spool tmpfs   defaults,noatime,mode=1777   0  0
/var/tmp   tmpfs   defaults,noatime,mode=1777   0  0
/var/log   tmpfs   defaults,noatime,mode=0755   0  0

These have probably been causing issues before now, you just haven't
noticed it because the old localmount always succeeded.

I do not recommend using tmpfs for /var/log, /var/spool or /var/tmp.
All files in these directories should survive a reboot, and they will
not if they are on tmpfs.

If you would like /tmp to be mounted on a tmpfs, you need to change the
line for /tmp to read like this:

tmpfs   /tmp       tmpfs   defaults,noatime,mode=1777   0  0

tmpfs file systems do not have a device, but you still need something
in the first position on the lines for them in fstab.

After you make these changes, let me know if things work.

Thanks much,

William
Comment 8 John Cox 2016-01-18 00:28:52 UTC
I took your advice and  replaced the /tmp line as you suggested, and commented out the lines for /var/spool, /var/tmp and /var/log and openrc-0.20.2 worked fine. 

Thank you for your help!

I still think that it is better practice not to be the cause of a system not restarting unless it is impossible to continue. Especially in situations like this where the problem is difficult to troubleshoot.
Comment 9 William Hubbs gentoo-dev 2016-01-19 19:52:43 UTC
https://github.com/openrc/openrc/commit/cd7883d

makes it possible for you to turn off this behaviour by setting 

ignore_mount_errors="YES"

in /etc/conf.d/localmount.
The serious down side is that "mount -a" also fails on syntax errors in
fstab, so you can boot with a bad fstab if you turn this on; that is why
it is off by default.

This will be in openrc-0.20.3 and 0.21.