I had a functioning Gentoo system. After "emerge -u world" (openrc 0.12 was in) I have the following issues: - runlevel command returns "unknown" - When I issue reboot or shutdown commands the warning is displayed: "Could not determine runlevel. doing soft reboot" - /tmp is not cleaned after reboot I am under impression the root cause is the "unknown" runlevel. Reproducible: Always Steps to Reproduce: 1. Update to openrc 0.12 (unmask openrc and do emerge -uvD world) 2. Reboot 3. Wait for the system to boot and issue "runlevel" command Actual Results: "unknown" is the system runlevel Expected Results: I expect to have runlevel different from unknown
emerge --info Portage 2.1.12.2 (default/linux/amd64/13.0/desktop, gcc-4.6.3, glibc-2.18, 3.10.7-gentoovit x86_64) ================================================================= System uname: Linux-3.10.7-gentoovit-x86_64-Intel-R-_Core-TM-2_Duo_CPU_U9600_@_1.60GHz-with-gentoo-2.2 KiB Mem: 3779304 total, 669032 free KiB Swap: 0 total, 0 free Timestamp of tree: Tue, 27 Aug 2013 06:30:01 +0000 ld GNU ld (GNU Binutils) 2.23.1 app-shells/bash: 4.2_p45 dev-java/java-config: 2.1.12-r1 dev-lang/python: 2.7.5-r2, 3.2.5-r2 dev-util/cmake: 2.8.10.2-r2 dev-util/pkgconfig: 0.28 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.12 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.11.6, 1.12.6 sys-devel/binutils: 2.23.1 sys-devel/gcc: 4.6.3 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.7 (virtual/os-headers) sys-libs/glibc: 2.18::OSSDL Repositories: gentoo sattvik-overlay gentoo-haskell ikelos OSSDL seden gentoo-zh x-portage ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=core2 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/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="-march=core2 -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" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/ http://distfiles.gentoo.org" LANG="ru_RU.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 --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/sattvik /var/lib/layman/haskell /var/lib/layman/ikelos /var/lib/layman/OSSDL /var/lib/layman/seden /var/lib/layman/gentoo-zh /usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fontconfig fortran gdbm gif gtk iconv jpeg lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt3support qt4 readline sdl session spell sse sse2 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="hda-intel aloop" 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" 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" 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 evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ru us fi" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="nouveau" 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, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
> > Steps to Reproduce: > 1. Update to openrc 0.12 (unmask openrc and do emerge -uvD world) > 2. Reboot > 3. Wait for the system to boot and issue "runlevel" command > > Actual Results: > "unknown" is the system runlevel > > Expected Results: > I expect to have runlevel different from unknown Runlevel may be unknown in case that utmp is not created or updated. We are creating utmp in bootmisc script do you have in boot runlevel. Do you have logs of the boot process?
This is my /var/log/rc.log (today's section): rc default logging started at Tue Aug 27 11:27:18 2013 * Starting D-BUS system messagebus ... [ ok ] * Setting hostname to vitmac ... [ ok ] * Checking your configfile (/etc/syslog-ng/syslog-ng.conf) ... [ ok ] * Starting syslog-ng ... Error creating persistent state file; filename='/var/lib/syslog-ng/syslog-ng.persist-', error='Read-only file system (30)' * start-stop-daemon: failed to start `syslog-ng' * Failed to start syslog-ng [ !! ] * ERROR: syslog-ng failed to start * Starting ConsoleKit daemon ... [ ok ] * Remounting root filesystem read/write ... [ ok ] * Remounting filesystems ... [ ok ] * Starting gpm ... [ ok ] * Setting up xdm ... [ ok ] * Restoring Mixer Levels ... [ ok ] * Bringing up interface wlan0 * Starting wpa_supplicant on wlan0 ... [ ok ] * Starting wpa_cli on wlan0 ... [ ok ] * Backgrounding ... ... * WARNING: net.wlan0 has started, but is inactive * Starting mysql ... * /var/run/mysqld: creating directory * /var/run/mysqld: correcting owner [ ok ] * WARNING: sshd is scheduled to start when net.wlan0 has started * Starting apache2 ... [ ok ] * Starting avahi-daemon ... [ ok ] * Starting bluetooth ... [ ok ] * Starting cupsd ... [ ok ] * ERROR: cannot start exim as syslog-ng would not start * Starting Icecast 2 ... [ ok ] * Setting clock via the NTP client 'ntpdate' ... [ ok ] * Running pommed daemon ... [ ok ] Starting Scratchbox: binfmt_misc, mount. * Starting vixie-cron ... [ ok ] rc default logging stopped at Tue Aug 27 11:27:38 2013 Did I expect to do something after emerging new openrc? I did etc-update and updated configuration of openrc, that's it. I also added the service "root" to the runlevel default ad after update it did not start anymore. Output of my rc-status shows that bootmisc is not there: Runlevel: default syslog-ng [ stopped ] consolekit [ started ] root [ started ] gpm [ started ] xdm [ started ] alsasound [ started ] scratchbox [ started ] icecast [ started ] ntp-client [ started ] mysql [ started ] pommed [ started ] vixie-cron [ started ] sshd [ scheduled ] apache2 [ started ] exim [ stopped ] bluetooth [ started ] cupsd [ started ] avahi-daemon [ started ] Dynamic Runlevel: hotplugged net.eth0 [ started ] net.wlan0 [ inactive ] Dynamic Runlevel: needed hostname [ started ] fsck [ started ] localmount [ started ] xdm-setup [ started ] termencoding [ started ] dbus [ started ] Dynamic Runlevel: manual
Created attachment 357156 [details] rc-status
I don't see neither boot nor sysinit runlevels in output. you can see them by calling: rc-status -a or rc-status boot If you are running on a native system, i.e. nor in container (chroot or lxc), nor in prefix, then please: 1). verify that bootmisc is in boot runlevel 2). if bootmisc is not there add it manually: rc-update add bootmisc default otherwise go to the step 4. 3). try to reproduce problem 4). report results If bootmisc was not in your runlevel and adding it will fix your system, then we will have to understand why it was not there on your system. If you running gentoo in prefix or container, please add this information to the report. Thanks.
Created attachment 357158 [details] Output for the command "rc-status boot" Output for the command "rc-status boot" (before adding service bootmisc to the ryunlevel default
(In reply to Alexander Vershilov from comment #5) > rc-status -a or rc-status boot See attachment: https://bugs.gentoo.org/attachment.cgi?id=357158 > If you are running on a native system, i.e. nor in container (chroot or > lxc), nor in prefix, then please: Yes. I run native system. > 1). verify that bootmisc is in boot runlevel It it not. > 2). if bootmisc is not there add it manually: > rc-update add bootmisc default Done immediattely after got the hint from ytou about bootmisc. Results were not that positive. It booted but to text console (xdm was not launched). Output of the command runlevel: "N 3" /root filesystem is read-only (according to the erro messages). In order to write logs I needed to issue a command "mount / -o remount,rw" Output of rc-status in this case: Runlevel: sysinit sysfs [ stopped ] udev-mount [ stopped ] tmpfiles.dev [ stopped ] dmesg [ stopped ] devfs [ stopped ] udev [ stopped ] Dynamic Runlevel: hotplugged Dynamic Runlevel: needed Dynamic Runlevel: manual When I tried to start xdm (/etc/init.d/xdm start) I got the non-stopping error messages to the console (did it before remounting root fs as rw): * You are attempting to run an openrc service on a * system which openrc did not boot. * You may be inside a chroot or you may have used * another initialization system to boot this system. * In this situation, you will get unpredictable results! * If you really want to do this, issue the following command: * touch /run/openrc/softlevel * ERROR: sysfs failed to start * You are attempting to run an openrc service on a * system which openrc did not boot.
(In reply to Vitaly A. Repin from comment #7) > (In reply to Alexander Vershilov from comment #5) > > rc-status -a or rc-status boot > See attachment: https://bugs.gentoo.org/attachment.cgi?id=357158 > > > > If you are running on a native system, i.e. nor in container (chroot or > > lxc), nor in prefix, then please: > > Yes. I run native system. > > > 1). verify that bootmisc is in boot runlevel > > It it not. > > > 2). if bootmisc is not there add it manually: > > rc-update add bootmisc default > > Done immediattely after got the hint from ytou about bootmisc. > > Results were not that positive. > > It booted but to text console (xdm was not launched). > > Output of the command runlevel: "N 3" > /root filesystem is read-only (according to the erro messages). > In order to write logs I needed to issue a command "mount / -o remount,rw" > > Output of rc-status in this case: > > Runlevel: sysinit > sysfs [ > stopped ] > udev-mount [ > stopped ] > tmpfiles.dev [ > stopped ] > dmesg [ > stopped ] > devfs [ > stopped ] > udev [ > stopped ] > Dynamic Runlevel: hotplugged > Dynamic Runlevel: needed > Dynamic Runlevel: manual > > When I tried to start xdm (/etc/init.d/xdm start) I got the non-stopping > error messages to the console (did it before remounting root fs as rw): > > * You are attempting to run an openrc service on a > * system which openrc did not boot. > * You may be inside a chroot or you may have used > * another initialization system to boot this system. > * In this situation, you will get unpredictable results! > * If you really want to do this, issue the following command: > * touch /run/openrc/softlevel > * ERROR: sysfs failed to start > * You are attempting to run an openrc service on a > * system which openrc did not boot. It seems that you are missing many required services in boot runlevel. I really have to consult on this point. At least I have: boot: hwclock, modules, lvm, fsck, root, mtab, swap, localmount, sysctl, bootmisc,termencoding, keymaps tmpfiles.setup, swapfiles, hostname, net.lo, procfs, urandom, loopback, alsasound sysinit: sysfs, udev-mount, devfs, dmesg, tmpfiles.dev, udev Btw, what was openrc version you have upgraded from?
(In reply to Alexander Vershilov from comment #8) > It seems that you are missing many required services in boot runlevel. I > really have to consult on this point. > > At least I have: > > boot: hwclock, modules, lvm, fsck, root, mtab, swap, localmount, sysctl, > bootmisc,termencoding, keymaps tmpfiles.setup, swapfiles, hostname, net.lo, > procfs, urandom, loopback, alsasound Yep. Strange that regardless of this, the system seems to be working. And I have not noticed any issues before. I started to feel the problem when in response to "reboot" command I started to see warning message about runlevel. It happened after update. > Btw, what was openrc version you have upgraded from? from emerge.log: 1377075099: >>> AUTOCLEAN: sys-apps/openrc:0 1377075099: === Unmerging... (sys-apps/openrc-0.11.8) 1377075104: >>> unmerge success: sys-apps/openrc-0.11.8 1377075109: === (10 of 11) Post-Build Cleaning (sys-apps/openrc-0.12::/usr/portage/sys-apps/openrc/openrc-0.12.ebuild) 1377075109: ::: completed emerge (10 of 11) sys-apps/openrc-0.12 to / So, should be 0.11.8.
(In reply to Vitaly A. Repin from comment #9) > (In reply to Alexander Vershilov from comment #8) > > It seems that you are missing many required services in boot runlevel. I > > really have to consult on this point. > > > > At least I have: > > > > boot: hwclock, modules, lvm, fsck, root, mtab, swap, localmount, sysctl, > > bootmisc,termencoding, keymaps tmpfiles.setup, swapfiles, hostname, net.lo, > > procfs, urandom, loopback, alsasound > > Yep. Strange that regardless of this, the system seems to be working. And I > have not noticed any issues before. > I started to feel the problem when in response to "reboot" command I started > to see warning message about runlevel. > It happened after update. Most of the scripts is required only for special cases and they are kind of a noop operations for most of the cases. So you'll not notice issues unless some part of the system will require them. If you want to have a fast solution you can check services that I listed and add onces that are applicable in your case. Plz, report if you'll do it, and this will help you. > > Btw, what was openrc version you have upgraded from? > > from emerge.log: > > 1377075099: >>> AUTOCLEAN: sys-apps/openrc:0 > 1377075099: === Unmerging... (sys-apps/openrc-0.11.8) > 1377075104: >>> unmerge success: sys-apps/openrc-0.11.8 > 1377075109: === (10 of 11) Post-Build Cleaning > (sys-apps/openrc-0.12::/usr/portage/sys-apps/openrc/openrc-0.12.ebuild) > 1377075109: ::: completed emerge (10 of 11) sys-apps/openrc-0.12 to / > > So, should be 0.11.8. Thanks, if this is a general case (not your system specific) than this is a serious problem. We will try to debug it.
(In reply to Alexander Vershilov from comment #10) > If you want to have a fast solution you can check services that I listed and > add onces that are applicable in your case. Plz, report if you'll do it, and > this will help you. Ok. Thanks. Should I add them to default runlevel, to boot runlevel or to both?
(In reply to Vitaly A. Repin from comment #11) > (In reply to Alexander Vershilov from comment #10) > > > If you want to have a fast solution you can check services that I listed and > > add onces that are applicable in your case. Plz, report if you'll do it, and > > this will help you. > > Ok. Thanks. Should I add them to default runlevel, to boot runlevel or to > both? to boot runlevel: hwclock, modules, lvm, fsck, root, mtab, swap, localmount, sysctl, bootmisc,termencoding, keymaps tmpfiles.setup, swapfiles, hostname, net.lo, procfs, urandom, loopback, alsasound. to sysinit runlevel: sysfs, udev-mount, devfs, dmesg, tmpfiles.dev, udev If some of the services are missing then you don't need them. net.lo/network is required only if you use netifrc or newnet. About root of the problem: if you system is quite old it could be inproper baselayout-2 migration, and you could had broken system even with openrc-0.11.8. Then it's explains why nobody other was hit by this problem.
(In reply to Alexander Vershilov from comment #12) > to boot runlevel: > hwclock, modules, lvm, fsck, root, mtab, swap, localmount, sysctl, > bootmisc,termencoding, keymaps tmpfiles.setup, swapfiles, hostname, net.lo, > procfs, urandom, loopback, alsasound. > > to sysinit runlevel: > sysfs, udev-mount, devfs, dmesg, tmpfiles.dev, udev Done and it helped. Now everything works as before. I am fine to close this bug as worksforme if you think this problem is specific to my setup only. > About root of the problem: if you system is quite old it could be inproper > baselayout-2 migration, and you could had broken system even with > openrc-0.11.8. Then it's explains why nobody other was hit by this problem. Could be. But I am sure that the services stopped to start only after upgrade to 0.12. My startup process became much faster after that upgrade :-) And I started to see issue with "runlevel" command. Thanks a lot for your help!
(In reply to Vitaly A. Repin from comment #13) > (In reply to Alexander Vershilov from comment #12) > > to boot runlevel: > > hwclock, modules, lvm, fsck, root, mtab, swap, localmount, sysctl, > > bootmisc,termencoding, keymaps tmpfiles.setup, swapfiles, hostname, net.lo, > > procfs, urandom, loopback, alsasound. > > > > to sysinit runlevel: > > sysfs, udev-mount, devfs, dmesg, tmpfiles.dev, udev > > Done and it helped. Now everything works as before. I am fine to close this > bug as worksforme if you think this problem is specific to my setup only. > > > About root of the problem: if you system is quite old it could be inproper > > baselayout-2 migration, and you could had broken system even with > > openrc-0.11.8. Then it's explains why nobody other was hit by this problem. > > Could be. But I am sure that the services stopped to start only after > upgrade to 0.12. My startup process became much faster after that upgrade > :-) And I started to see issue with "runlevel" command. > > Thanks a lot for your help! Great. Closing if somebody will have similar issues feel free to reopen.
Verified