Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 390645 - sys-apps/openrc: /var/log/rc.log is written before fsck/localmount
Summary: sys-apps/openrc: /var/log/rc.log is written before fsck/localmount
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: openrc-tracker
  Show dependency tree
 
Reported: 2011-11-15 19:07 UTC by Vladimir Berezhnoy
Modified: 2012-01-22 13:05 UTC (History)
11 users (show)

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


Attachments
screenshot of error and warning (readonly.png,107.19 KB, image/png)
2011-12-10 22:11 UTC, Jim Faulkner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Berezhnoy 2011-11-15 19:07:33 UTC
* About to start the service devfs
 *   1) Start the service               2) Skip the service
 *   3) Continue boot process           4) Exit to shell
 * Mounting /dev/shm ...                                                  [ ok ] * Error: fopen(/var/log/rc.log) failed: Read-only file system
 * Warning: temporary logfile left behind: /lib/rc/init.d/rc.log

At this stage / is ro and /var can be located on separate partition.

Reproducible: Always




# emerge --info
Portage 2.1.10.34 (default/linux/x86/10.0/desktop/kde, gcc-4.4.6, glibc-2.13-r4, 3.1.1-gentoo-home2 i686)
=================================================================
System uname: Linux-3.1.1-gentoo-home2-i686-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-2.1
Timestamp of tree: Tue, 15 Nov 2011 19:00:01 +0000
distcc 3.1 i686-pc-linux-gnu [disabled]
ccache version 3.1.6 [enabled]
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.1.4-r3, 3.2.2
dev-util/ccache:          3.1.6
dev-util/cmake:           2.8.6-r3
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1-r1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.2.4-r1, 4.3.6-r1, 4.4.6-r1, 4.5.3-r1
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 2.6.39 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo gamerlay-stable arcon multimedia sping sunrise swegener trinity
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -ggdb"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/hddtemp/ /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe -ggdb"
DISTDIR="/mnt/large/sys/distfiles"
FEATURES="assume-digests binpkg-logs ccache compress-build-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="ru en"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="lzma"
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="/mnt/large/sys/var_tmp_portage"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/gamerlay /var/lib/layman/arcon /var/lib/layman/multimedia /var/lib/layman/sping /var/lib/layman/sunrise /var/lib/layman/swegener /mnt/large/overlays/kde-trinity"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aacs acpi additions addressbook aften aim alsa amr ansi apm applet archive ass atm automount autoreplace bash-completion bashlogger binary-drivers bittorrent bluetooth bluray branding btrfs bzip2 cairo cdda chm cisco consolekit cracklib crypt css curl custom-optimization cxx daap dbus declarative desktopglobe dhcp djvu dlna dri dts dvd dvdr emboss emovix enca encode epiphany exif expat extensions extras faac faad fat ffmpeg flac flash fontconfig fortran ftp gd gdu geoip gif glib gnome gnome-keyring gnutls gphoto2 gpm gtk gzip hddtemp highlight history httpd iconv id3 ieee1394 imagemagick imlib inotify ithreads jabber javascript jfs jpeg kde lame lcms libass libextractor libnotify lm_sensors logrotate lvm lzma mad maps matroska mdadm mktemp mmx mmxext mng modules mouse mozilla mp3 mp4 mpeg mplayer mudflap musicbrainz mysql mysqli nautilus ncurses network network-cron nls nowlistening nptl nptlonly nsplugin ntfs ntlm obex ogg opengl openmp openntpd oscar pam pango passwordsave pcf pch pcre pdf phonon php plasma plugins png policykit ppds pppd qt3support qt4 rdesktop readline samba sasl screen sdl session sha512 simplexml slang sndfile spell sqlite sqlite3 srt srv sse sse2 ssl startup-notification statistics subtitles subversion svg swat sysfs syslog taglib tcpd theora threads threadsafe thumbnail tiff tordns tos tracker translator trayicon truetype udev unicode upnp urandom usb utempter vaapi vim-syntax vnc vorbis vpx wavpack web webkit winbind x264 x86 xcb xcomposite xfs xhtml xine xinerama xinetd xml xmlreader xmlrpc xmlwriter xorg xosd xpm xscreensaver xsl xulrunner xv xvid zeroconf zip zlib" ALSA_CARDS="hda-intel" 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 auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" CALLIGRA_FEATURES="kexi words flow plan 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 mouse ps2mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fglrx vesa" 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_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 SpanKY gentoo-dev 2011-12-01 18:56:17 UTC
does it only happen when you're doing interactive mode ?
Comment 2 Vladimir Berezhnoy 2011-12-01 20:04:28 UTC
No, in default mode also. I chose interactive mode to identify at which step the error message is shown.
Comment 3 Derk W te Bokkel 2011-12-03 11:24:54 UTC
FYI: there has been considerable discussion in this forum
http://forums.gentoo.org/viewtopic.php?p=6889054#6889054

bug is just mentioned there ..
Comment 4 Norman Back 2011-12-09 19:46:17 UTC
This error occurs at line 280 of openrc-0.9.4/src/rc/rc-logger.c

I can't see any checks for even / being mounted rw let alone /var/log, so I not sure how the code is supposed to work correctly.
Comment 5 Jim Faulkner 2011-12-10 22:11:28 UTC
Created attachment 295419 [details]
screenshot of error and warning

confirmed, see attached screenshot.

FYI, after boot has completed, /var/log/rc.log contains all boot information starting from "/proc is already mounted, skipping" all the way to "Starting local", and /lib64/rc/init.d/rc.log does not exist.  Looks like these errors are being printed for no reason.
Comment 6 Sergio 2011-12-11 12:18:48 UTC
As a marginal topic, I've a similar problem during shutdown (I want to log to a unmounted filesystem, I don't feel my case as a bug).
What could interest you is that in that case the fallback rc.log file is /lib64/rc/cache/rc.log

Regards,
Sergio
Comment 7 Eddy 2011-12-14 18:05:30 UTC
FYI,

I was facing this problem, I solved by adding localmount & mtab to sysinit

rc-update add localmount sysinit
rc-update add mtab sysinit

Best Regards,
Eddy
Comment 8 Eddy 2011-12-14 18:51:52 UTC
FYI,

I was facing this problem, I solved by adding localmount & mtab to sysinit

rc-update add localmount sysinit
rc-update add mtab sysinit

Best Regards,
Eddy
Comment 9 Sergey S. Starikoff 2011-12-15 12:12:24 UTC
(In reply to comment #5)
> Created attachment 295419 [details]
> screenshot of error and warning
> 
> confirmed, see attached screenshot.
> 
> FYI, after boot has completed, /var/log/rc.log contains all boot information
> starting from "/proc is already mounted, skipping" all the way to "Starting
> local", and /lib64/rc/init.d/rc.log does not exist.  Looks like these errors
> are being printed for no reason.

While boot process it seems to be OK.
While shutdown initialized from GUI also no warning messages.
But when I try to halt system with poweroff command I see warning message (/var/log/rc.log fopen error).
x86 stable, /var on separate device.
Comment 10 Alexander Bezrukov 2011-12-16 01:36:15 UTC
Like others I also faced this problem during shutdown. First /var is umount'ed, then a write thereto attempted. Not a big deal since a copy is saved to / anyway but is very annoying.
Comment 11 Julian W. 2011-12-17 17:56:06 UTC
Same here on shutdown.
Comment 12 Ladislav Zitka 2011-12-28 17:14:56 UTC
Same here, I will try what Eddy proposed. There are also something strange right when loading initramfs in my case:
/proc is already mounted, skipping
udev-mount   :/dev is already mounted

proc mount is also defined in my /etc/fstab
Comment 13 Ladislav Zitka 2011-12-28 17:52:35 UTC
rc-update add localmount sysinit
rc-update add mtab sysinit 

fixed situation.
Comment 14 Eddy 2011-12-28 21:17:16 UTC
(In reply to comment #13)
> rc-update add localmount sysinit
> rc-update add mtab sysinit 
> 
> fixed situation.

Glad to hear that :-)

Eddy
Comment 15 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-12-28 21:29:44 UTC
(In reply to comment #13)
> rc-update add localmount sysinit
> rc-update add mtab sysinit 
> 
> fixed situation.

That's really not good as a solution, as it will cause a lot of the boot level to be forced into sysinit instead.
Comment 16 Eddy 2011-12-28 22:06:59 UTC
(In reply to comment #15)
> (In reply to comment #13)
> > rc-update add localmount sysinit
> > rc-update add mtab sysinit 
> > 
> > fixed situation.
> 
> That's really not good as a solution, as it will cause a lot of the boot level
> to be forced into sysinit instead.

It's been a time for me using it and faced no problem.

Best Regards,
Eddy
Comment 17 Christian Ruppert (idl0r) gentoo-dev 2011-12-29 13:01:48 UTC
This has been fixed by commit ec65f181eab6289101a0c0df624c9b022f3742d0 and 49e99a739361b977b0841c602f10fc9895285197.

http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=ec65f181eab6289101a0c0df624c9b022f3742d0
http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=49e99a739361b977b0841c602f10fc9895285197