Created attachment 406208 [details] emerge --info Hi, I don't know if this has to do something with the bug I'm reporting but after that I discovered errors in rc.log. What I did was to replace the graphics card (GeForce 210) by a GeForce GTX 750 and afterwards upgraded nvidia-drivers (from x11-drivers/nvidia-drivers-340.76 to x11-drivers/nvidia-drivers-352.21). Now /var/log/rc.log contains errors: /lib64/rc/sh/rc-cgroup.sh: Zeile 89: printf: Schreibfehler: Kein passendes Gerät gefunden. Which I would translate into: /lib64/rc/sh/rc-cgroup.sh: line 89: printf: write error: No matching device found. I experimented with re-compiling the kernel (without altering .conf) which gave me on the first boot: /lib64/rc/sh/rc-cgroup.sh: Zeile 89: /sys/fs/cgroup/openrc/keymaps/tasks: Datei oder Verzeichnis nicht gefunden Which I would translate into: /lib64/rc/sh/rc-cgroup.sh: line 89: /sys/fs/cgroup/openrc/keymaps/tasks: file or directory not found But it changed back to the first error ("No matching device found.") I posted this here: https://forums.gentoo.org/viewtopic-t-1021072.html and was advised to file a bug. I'd be happy to give more info about my system and configuration as needed. Greetings, Andy
Added URL to https://github.com/OpenRC/openrc/issues/33 as I was hinted that it's in relation with this bug.
Created attachment 406966 [details] emerge --info Same issue here. grep "printf" /var/log/rc.log: loopback |/lib64/rc/sh/rc-cgroup.sh: line 89: printf: write error: No such device loopback |/lib64/rc/sh/rc-cgroup.sh: line 89: printf: write error: No such device termencoding |/lib64/rc/sh/rc-cgroup.sh: line 89: printf: write error: No such device termencoding |/lib64/rc/sh/rc-cgroup.sh: line 89: printf: write error: No such device
Created attachment 410632 [details, diff] when error happens, shows the file in question This happens sporadically at boot. Last time I've seen it*, was for sshd folder: /lib64/rc/sh/rc-cgroup.sh: line 89: printf: write error: No such device (*since I applied the included patch to see the file.) the file it tried to write to was: /sys/fs/cgroup/openrc/sshd/tasks failed because that folder doesn't exist: /sys/fs/cgroup/openrc/sshd/ (even after done booting) I'm not sure what was supposed to "create" it, maybe "Mounting cgroup filesystem [ok]" which is always ok regardless. sys-apps/openrc-0.17 (/lib64/rc/sh/rc-cgroup.sh) total 0 dr-xr-xr-x 11 root root 0 30.08.2015 20:49 ./ drwxr-xr-x 11 root root 220 30.08.2015 20:46 ../ drwxr-xr-x 2 root root 0 30.08.2015 20:49 cronie/ drwxr-xr-x 2 root root 0 30.08.2015 20:49 dbus/ drwxr-xr-x 2 root root 0 30.08.2015 20:49 fail2ban/ drwxr-xr-x 2 root root 0 30.08.2015 20:49 gpm/ drwxr-xr-x 2 root root 0 30.08.2015 20:49 lvmetad/ drwxr-xr-x 2 root root 0 30.08.2015 20:49 metalog/ drwxr-xr-x 2 root root 0 30.08.2015 20:49 net.enp0s3/ drwxr-xr-x 2 root root 0 30.08.2015 20:49 udev/ drwxr-xr-x 2 root root 0 30.08.2015 20:49 virtualbox-guest-additions/ -rw-r--r-- 1 root root 0 30.08.2015 20:49 cgroup.clone_children -rw-r--r-- 1 root root 0 30.08.2015 20:49 cgroup.procs -r--r--r-- 1 root root 0 30.08.2015 20:49 cgroup.sane_behavior -rw-r--r-- 1 root root 0 30.08.2015 20:46 notify_on_release -rw-r--r-- 1 root root 0 30.08.2015 20:49 release_agent -rw-r--r-- 1 root root 0 30.08.2015 20:47 tasks and of course on next reboot it works without errors: # ls -la /sys/fs/cgroup/openrc/sshd/ total 0 drwxr-xr-x 2 root root 0 30.08.2015 20:57 ./ dr-xr-xr-x 12 root root 0 30.08.2015 20:57 ../ -rw-r--r-- 1 root root 0 30.08.2015 20:57 cgroup.clone_children -rw-r--r-- 1 root root 0 30.08.2015 20:57 cgroup.procs -rw-r--r-- 1 root root 0 30.08.2015 20:57 notify_on_release -rw-r--r-- 1 root root 0 30.08.2015 20:56 tasks
Created attachment 410634 [details] and a screenshot with the error in context Here's my emerge --info # emerge --info Portage 2.2.20.1 (python 3.4.3-final-0, hardened/linux/amd64/no-multilib, gcc-5.2.0, glibc-2.21-r1, 4.1.6-hardened-r1-g45b4b78 x86_64) ================================================================= System uname: Linux-4.1.6-hardened-r1-g45b4b78-x86_64-AMD_A6-3400M_APU_with_Radeon-tm-_HD_Graphics-with-gentoo-2.2 KiB Mem: 10809864 total, 6394948 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Sun, 30 Aug 2015 00:45:01 +0000 sh bash 4.3_p42 ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1 ccache version 3.2.3 [enabled] app-shells/bash: 4.3_p42::gentoo dev-lang/perl: 5.22.0::gentoo dev-lang/python: 2.7.10::gentoo, 3.4.3::gentoo dev-util/ccache: 3.2.3::gentoo dev-util/cmake: 3.3.1-r1::gentoo dev-util/pkgconfig: 0.28-r3::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.17::gentoo sys-apps/sandbox: 2.6-r1::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r1::gentoo sys-devel/automake: 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo sys-devel/binutils: 2.25.1-r1::gentoo sys-devel/gcc: 4.8.5::gentoo, 5.2.0::gentoo sys-devel/gcc-config: 1.8::gentoo sys-devel/libtool: 2.4.6-r1::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 4.1::gentoo (virtual/os-headers) sys-libs/glibc: 2.21-r1::gentoo Repositories: gentoo location: /usr/portage priority: -1000 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native -ggdb -fvar-tracking-assignments -fno-omit-frame-pointer -ftrack-macro-expansion=2 -fstack-protector-all -fPIC" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/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" CXXFLAGS="-O2 -pipe -march=native -ggdb -fvar-tracking-assignments -fno-omit-frame-pointer -ftrack-macro-expansion=2 -fstack-protector-all -fPIC" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs ccache cgroup collision-protect config-protect-if-modified distlocks downgrade-backup ebuild-locks fakeroot fixlafiles force-mirror installsources ipc-sandbox merge-sync multilib-strict network-sandbox news nostrip parallel-fetch parallel-install prelink-checksums preserve-libs sandbox sfperms split-elog split-log strict unknown-features-warn unmerge-backup unmerge-logs userfetch userpriv usersandbox webrsync-gpg" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://ftp.romnet.org/gentoo/ http://tux.rainside.sk/gentoo/ http://de-mirror.org/gentoo/ http://gd.tuwien.ac.at/opsys/linux/gentoo/ http://www.las.ic.unicamp.br/pub/gentoo/" INSTALL_MASK="/lib/systemd /lib32/systemd /lib64/systemd /usr/lib/systemd /usr/lib32/systemd /usr/lib64/systemd /etc/systemd" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j4" 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 3dnowext X acl amd64 berkdb bindist btrfs bzip2 cli consolekit cracklib crypt cryptsetup cscope cxx dbus device-mapper dri egl extensions gdbm git gpg gpm gtk3 hardened iconv jpeg justify lock mmx mmxext modules mosh-hardening ncurses nptl openmp pam pax_kernel pcre pie policykit pulseaudio qt4 readline seccomp session sse sse2 sse3 ssl ssp startup-notification strong-security system-icu system-jpeg system-libvpx system-sqlite urandom xattr xcomposite xtpax 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="3dnow 3dnowext mmx mmxext sse sse2 sse3" 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="keyboard virtualbox evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="virtualbox" XFCE_PLUGINS="brightness clock trash battery power" 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" USE_PYTHON="2.7" Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
seems like the same issue here: https://bugs.gentoo.org/show_bug.cgi?id=489386
From what I can tell, if there's a delay between the mkdir and the test for /tasks file, then the folder never gets created, like these: openrc_cgroup=/sys/fs/cgroup/openrc if [ -d "$openrc_cgroup" ]; then cgroup="$openrc_cgroup/$RC_SVCNAME" mkdir -p "$cgroup" sleep 1 [ -f "$cgroup/tasks" ] && printf "%d" 0 > "$cgroup/tasks" || echo "$cgroup/tasks" 1>&2 fi or openrc_cgroup=/sys/fs/cgroup/openrc if [ -d "$openrc_cgroup" ]; then cgroup="$openrc_cgroup/$RC_SVCNAME" mkdir -p "$cgroup" ls -la "$openrc_cgroup" 1>&2 [ -f "$cgroup/tasks" ] && printf "%d" 0 > "$cgroup/tasks" || echo "$cgroup/tasks" 1>&2 fi they fail for every invocation, it seems. But this works: openrc_cgroup=/sys/fs/cgroup/openrc if [ -d "$openrc_cgroup" ]; then cgroup="$openrc_cgroup/$RC_SVCNAME" mkdir -p "$cgroup" [ -f "$cgroup/tasks" ] && printf "%d" 0 > "$cgroup/tasks" || echo "$cgroup/tasks" 1>&2 ls -la "$openrc_cgroup" 1>&2 fi Maybe this is normal, but this tells me that when some delay happens (due to task switching maybe? or what not) between that mkdir and the [ -f ... ] line, then that's when the printf will fail. I don't know what/why/how cgroups work though, maybe this is "normal" ?
Created attachment 410668 [details, diff] a patch that worksforme The delay(or/and increase in process numbers?) that this patch introduces via echo&ps before that mkdir, seems to be solving the issue for me, as I am unable to reproduce this anymore (unless I'm missing something ofc). I just put this patch in /etc/portage/patches/sys-apps/openrc/ folder (created) and it gets applied on every openrc emerge (eg. # time emerge -av openrc ) >>> Preparing source in /var/tmp/portage/sys-apps/openrc-0.17/work/openrc-0.17 ... * Applying user patches from /etc/portage/patches//sys-apps/openrc ... * printf_write_error_workaround_through_delay.patch ... [ ok ] * Done with patching >>> Source prepared.
Created attachment 410670 [details, diff] fixed patch that worksforme to handle second case too when it fails it only fails with "FAIL(2)", I wonder if the printf really doesn't need a "\n" ...
I looked at this patch, and I would rather find the root cause than use delays to work around the issue. I don't know whether this is an issue in OpenRC itself, or an issue with the kernel. It seems to occur sporatically, and not on all systems. Any help tracking it down would be appreciated.
I agree with you, William. I'll experiment more.
Created attachment 410792 [details] in testing rc-cgroup.sh that doesn't have the issue for me. What I found thus far is that this(expanded): printf "%d" 0 > "/sys/fs/cgroup/openrc/tasks" needs a delay after it, or the next command: mkdir -p "/sys/fs/cgroup/openrc/cronie" (for example) will not create that folder (maybe because the effect from printf isn't done; perhaps this is the cgroups race that someone was talking about in another bug report?) Maybe someone knows what handles the openrc/ folder there? openrc(somehow)? kernel? no idea... Any other thoughts? Maybe that printf should block? until done, then the delay wouldn't be needed? Included the rc-cgroup.sh file (/lib64/rc/sh/rc-cgroup.sh that is) as it is now when line 96 (the ps afwj delay) is uncommented which makes the issue go away (for me at least), and to test when it fails just comment that line.
I have been unable to reproduce this issue with any services on my system. Also, there was a cgroups fix applied to OpenRC-0.18.3 which took care of several cgroups-related issues. Can you test with OpenRC-0.18.3 and re-open this bug if this still occurs?
worksforme, thanks for notifying! (note: I could only test this on bare metal now, not in virtualbox as I did before because I nolonger have any virtualbox machines; tested by 5 reboots)
Created attachment 414754 [details, diff] current patch to catch when it fails (no manual delays) I just got 1 fail ever since. I kept half the patch from before, to catch any regressions. I'm including it. Basically I removed my delays completely. Something got fixed for sure. Even with my patch, I've seen it fail only one time ever since. Maybe for the same reason that it failed now(only once thus far). This is the fail in context(copy/paste via gpm): * Generating a rule to create a /dev/root symlink ... calling: info [ ok ] * Populating /dev with existing devices through uevents ... calling: trigger calling: trigger [ ok ]/lib64/rc/sh/rc-cgroup.sh: line 98: /sys/fs/cgroup/openrc/hwclock/tasks: No such file or directory ------FAIL(1)----- /sys/fs/cgroup/openrc/hwclock/tasks Current: 8117 hwclock cat: /sys/fs/cgroup/openrc/hwclock/tasks: No such file or directory * Setting system clock using the hardware clock [UTC] ... [ 23.509968] grsec: time set by /sbin/hwclock[hwclock:8150] uid/euid:0/0 gid/egid:0/0, parent /lib64/rc/sh/openrc-run.sh[openrc-run.sh:8149] uid/euid:0/0 gid/egid:0/0 [ 23.511701] grsec: time set by /sbin/hwclock[hwclock:8150] uid/euid:0/0 gid/egid:0/0, parent /lib64/rc/sh/openrc-run.sh[openrc-run.sh:8149] uid/euid:0/0 gid/egid:0/0 [ 24.311517] grsec: time set by /sbin/hwclock[hwclock:8153] uid/euid:0/0 gid/egid:0/0, parent /lib64/rc/sh/openrc-run.sh[openrc-run.sh:8151] uid/euid:0/0 gid/egid:0/0 [ ok ] * Autoloaded 0 module(s) The FAIL(1) means it failed here: ... mkdir -p "$cgroup" local fail=0 if test -f "$cgroup/tasks"; then #so it passes this if if ! printf "%d" 0 > "$cgroup/tasks"; then #this is line 98 fail=1 #FAILS here! because "$cgroup/tasks" doesn't exist and yet the test -f above passed! yeah, riddle me that fi else fail=2 fi ...
(In reply to William Hubbs from comment #12) > I have been unable to reproduce this issue with any services on my > system. Also, there was a cgroups fix applied to OpenRC-0.18.3 which > took care of several cgroups-related issues. > Can you test with OpenRC-0.18.3 and re-open this bug if this still occurs? Sorry for being inconvenient but I have to report that even with OpenRC-0.18.3 it still gives me the errors I described when I opened the bug back in July. Yesterday I emerged sys-apps/openrc-0.18.3: ------------------------------------------------------------- emerge -pv openrc These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ~] sys-apps/openrc-0.18.3::gentoo USE="ncurses netifrc pam unicode -audit -debug -newnet (-prefix) (-selinux) -static-libs -tools" 0 KiB ------------------------------------------------------------- ... and on today's reboot it's this in /var/log/rc.log: ------------------------------------------------------------- rc boot logging started at Sun Oct 18 12:02:58 2015 * Setting system clock using the hardware clock [UTC] ... [ ok ] * Loading module lp ... [ ok ] * Autoloaded 1 module(s) * Checking local filesystems ... /dev/sda3: sauber, 1145036/30195712 Dateien, 60550842/120754580 Blöcke /dev/sda1: sauber, 352/28112 Dateien, 45556/112420 Blöcke [ ok ] * Remounting root filesystem read/write ... [ ok ] * Remounting filesystems ... [ ok ] /lib64/rc/sh/rc-cgroup.sh: Zeile 91: /sys/fs/cgroup/openrc/mtab/tasks: Datei oder Verzeichnis nicht gefunden * Updating /etc/mtab ... * Creating mtab symbolic link [ ok ] * Activating swap devices ... [ ok ] * Mounting local filesystems ... [ ok ] * Mounting misc binary format filesystem ... [ ok ] * Loading custom binary format handlers ... [ ok ] * Configuring kernel parameters ... [ ok ] /lib64/rc/sh/rc-cgroup.sh: Zeile 91: /sys/fs/cgroup/openrc/bootmisc/tasks: Datei oder Verzeichnis nicht gefunden * Creating user login records ... [ ok ] * Wiping /tmp directory ... [ ok ] * Setting terminal encoding [UTF-8] ... [ ok ] * Setting console font [default8x16] ... [ ok ] /lib64/rc/sh/rc-cgroup.sh: Zeile 91: printf: Schreibfehler: Kein passendes Gerät gefunden. * Setting hostname to kill-bill ... [ ok ] * Setting keyboard mode [UTF-8] ... [ ok ] * Loading key mappings [de-latin1-nodeadkeys] ... [ ok ] * Bringing up network interface lo ... [ ok ] * Bringing up interface lo * 127.0.0.1/8 ... [ ok ] * Adding routes * 127.0.0.0/8 via 127.0.0.1 ... [ ok ] * Activating additional swap space ... [ ok ] * Setting up tmpfiles.d entries ... [ ok ] * Initializing random number generator ... [ ok ] rc boot logging stopped at Sun Oct 18 12:10:11 2015 rc default logging started at Sun Oct 18 12:10:11 2015 * Checking your configfile (/etc/syslog-ng/syslog-ng.conf) ... [ ok ] * Starting syslog-ng ... [ ok ] * Starting acpid ... [ ok ] * Starting D-BUS system messagebus ... [ ok ] * Starting ConsoleKit daemon ... [ ok ] * Starting ufw ... [ ok ] * Setting clock via the NTP client 'ntpdate' ... [ ok ] /lib64/rc/sh/rc-cgroup.sh: Zeile 91: printf: Schreibfehler: Kein passendes Gerät gefunden. * Starting rpcbind ... [ ok ] * Starting NFS statd ... [ ok ] * Setting up RPC pipefs ... [ ok ] * Starting idmapd ... [ ok ] * Starting NFS sm-notify ... [ ok ] * Mounting network filesystems ... [ ok ] /lib64/rc/sh/rc-cgroup.sh: Zeile 91: printf: Schreibfehler: Kein passendes Gerät gefunden. * Starting gpm ... [ ok ] /lib64/rc/sh/rc-cgroup.sh: Zeile 91: /sys/fs/cgroup/openrc/xdm/tasks: Datei oder Verzeichnis nicht gefunden * Setting up kdm ... [ ok ] * Restoring Mixer Levels ... [ ok ] * Starting ntpd ... [ ok ] * Starting boinc ... [ ok ] * Starting cronie ... [ ok ] * Starting cupsd ... [ ok ] * Starting cups-browsed ... [ ok ] * Starting distccd ... [ ok ] /lib64/rc/sh/rc-cgroup.sh: Zeile 91: /sys/fs/cgroup/openrc/lm_sensors/tasks: Datei oder Verzeichnis nicht gefunden * Loading lm_sensors modules... * Loading it87 ... [ ok ] * Initializing sensors ... [ ok ] * Mounting nfsd filesystem in /proc ... [ ok ] * Exporting NFS directories ... [ ok ] * Starting NFS mountd ... [ ok ] * Starting NFS daemon ... [ ok ] * Starting NFS smnotify ... [ ok ] * Starting sshd ... [ ok ] * Starting local ... [ ok ] rc default logging stopped at Sun Oct 18 12:03:43 2015 -------------------------------------------------------------
*** Bug 567162 has been marked as a duplicate of this bug. ***
Hello again. Looks like this is still an issue in latest openrc: sys-apps/openrc-0.20.4 (I haven't tried the -9999 version yet, should I?) " * Bringing up network interface lo ... [ ok ]/lib64/rc/sh/rc-cgroup.sh: line 105: printf: write error: No such device ------FAIL(1)----- /sys/fs/cgroup/openrc/swapfiles/tasks Current: 8860 swapfiles cat: /sys/fs/cgroup/openrc/swapfiles/tasks: No such file or directory * Activating additional swap space ... " For explanations see: https://bugs.gentoo.org/show_bug.cgi?id=553978#c14 Here's my emerge info now(as you can see it's not hardened anymore): $ emerge --info openrc Portage 2.2.27 (python 3.4.3-final-0, default/linux/amd64/13.0/no-multilib, gcc-5.3.0, glibc-2.22-r1, 4.5.0-rc3 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-4.5.0-rc3-x86_64-AMD_A6-3400M_APU_with_Radeon-tm-_HD_Graphics-with-gentoo-2.2 KiB Mem: 15875456 total, 14621528 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Thu, 11 Feb 2016 09:30:01 +0000 sh bash 4.3_p42-r2 ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1 ccache version 3.2.4 [enabled] app-shells/bash: 4.3_p42-r2::gentoo dev-lang/perl: 5.22.1::gentoo dev-lang/python: 2.7.11-r2::gentoo, 3.4.3-r7::gentoo dev-util/ccache: 3.2.4::gentoo dev-util/cmake: 3.4.3::gentoo dev-util/pkgconfig: 0.29::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.20.4::gentoo sys-apps/sandbox: 2.10-r1::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r1::gentoo sys-devel/automake: 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r1::gentoo sys-devel/binutils: 2.25.1-r1::gentoo sys-devel/gcc: 5.3.0::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r1::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers) sys-libs/glibc: 2.22-r1::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-vcs-ignore: false tox-overlay location: /var/lib/layman/tox-overlay masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native -g0 -fno-var-tracking-assignments -fomit-frame-pointer -ftrack-macro-expansion=0 -fno-stack-protector -fPIC" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/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" CXXFLAGS="-O2 -pipe -march=native -g0 -fno-var-tracking-assignments -fomit-frame-pointer -ftrack-macro-expansion=0 -fno-stack-protector -fPIC" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs ccache cgroup collision-protect config-protect-if-modified distlocks downgrade-backup ebuild-locks fakeroot fixlafiles force-mirror ipc-sandbox merge-sync multilib-strict network-sandbox news nostrip parallel-fetch prelink-checksums preserve-libs sandbox sfperms skiprocheck split-elog split-log strict suidctl unknown-features-warn unmerge-logs userfetch userpriv usersandbox webrsync-gpg" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://de-mirror.org/gentoo/ http://gd.tuwien.ac.at/opsys/linux/gentoo/ http://ftp.romnet.org/gentoo/ http://tux.rainside.sk/gentoo/ http://www.las.ic.unicamp.br/pub/gentoo/" INSTALL_MASK="/lib/systemd /lib32/systemd /lib64/systemd /usr/lib/systemd /usr/lib32/systemd /usr/lib64/systemd /etc/systemd" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j4" 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 --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="3dnow 3dnowext X acl amd64 berkdb bindist btrfs bzip2 cli consolekit crypt cryptsetup cscope cxx dbus device-mapper dri extensions gdbm git gpg gpm gtk3 iconv jpeg lm_sensors lock mmx mmxext modules mosh-hardening ncurses nptl ogg openmp opus pam pcre pie png policykit popcnt pulseaudio qt4 readline seccomp session smp sse sse2 sse3 sse4a ssl ssp startup-notification strong-security xcomposite 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="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="keyboard synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" 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="radeon" XFCE_PLUGINS="brightness clock trash battery power" 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" USE_PYTHON="2.7" Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS ================================================================= Package Settings ================================================================= sys-apps/openrc-0.20.4::gentoo was built with the following: USE="ncurses netifrc pam -audit -debug -newnet (-prefix) (-selinux) -static-libs -tools -unicode" Thank you for looking into this.
I got a FAIL(2) this time: " * Loading key mappings [us] ... [ ok ] ------FAIL(2)----- /sys/fs/cgroup/openrc/loopback/tasks Current: 8844 loopback cat: /sys/fs/cgroup/openrc/loopback/tasks: No such file or directory * Bringing up network interface lo ... [ ok ] " a FAIL(2) means it failed this test: if test -f "$cgroup/tasks"; then The FAIL(1) in the above Comment #17 means it didn't fail the above if, but it failed the second if, this: if ! printf "%d" 0 > "$cgroup/tasks"; then sys-apps/openrc-0.20.4::gentoo was built with the following: USE="ncurses netifrc pam -audit -debug -newnet (-prefix) (-selinux) -static-libs -tools -unicode" The code in context is: (see: fail=2) for d in /sys/fs/cgroup/* ; do [ -f "${d}"/tasks ] && printf "%d" 0 > "${d}"/tasks done openrc_cgroup=/sys/fs/cgroup/openrc if [ -d "$openrc_cgroup" ]; then cgroup="$openrc_cgroup/$RC_SVCNAME" mkdir -p "$cgroup" local fail=0 if test -f "$cgroup/tasks"; then if ! printf "%d" 0 > "$cgroup/tasks"; then fail=1 fi else fail=2 fi if test "$fail" -ne "0"; then echo "------FAIL(${fail})----- $cgroup/tasks" 1>&2 echo "Current: $$ $RC_SVCNAME" 1>&2 cat "$cgroup/tasks" fi
Today I did an update and I have the same issue here. I have: =sys-kernel/gentoo-sources-4.4.6 and =sys-apps/openrc-0.19.1. Now /var/log/rc.log contains errors: /lib64/rc/sh/rc-cgroup.sh: line 91: /sys/fs/cgroup/openrc/mysql/tasks: No such file or directory /lib64/rc/sh/rc-cgroup.sh: line 91: /sys/fs/cgroup/openrc/psd/tasks: No such file or directory /lib64/rc/sh/rc-cgroup.sh: line 91: /sys/fs/cgroup/openrc/loopback/tasks: No such file or directory /lib64/rc/sh/rc-cgroup.sh: line 91: /sys/fs/cgroup/openrc/syslog-ng/tasks: No such file or directory /lib64/rc/sh/rc-cgroup.sh: line 91: /sys/fs/cgroup/openrc/cronie/tasks: No such file or directory /lib64/rc/sh/rc-cgroup.sh: line 91: /sys/fs/cgroup/openrc/irqbalance/tasks: No such file or directory /lib64/rc/sh/rc-cgroup.sh: line 91: /sys/fs/cgroup/openrc/ntp-client/tasks: No such file or directory /lib64/rc/sh/rc-cgroup.sh: line 91: /sys/fs/cgroup/openrc/ntp-client/tasks: No such file or directory My 'emerge --info': Portage 2.2.26 (python 3.4.3-final-0, default/linux/amd64/13.0/desktop/kde, gcc-4.9.3, glibc-2.22-r4, 4.1.15-gentoo-r1 x86_64) ================================================================= System uname: Linux-4.1.15-gentoo-r1-x86_64-Intel-R-_Core-TM-_i7-4790_CPU_@_3.60GHz-with-gentoo-2.2 KiB Mem: 32895192 total, 27345364 free KiB Swap: 33554428 total, 33554428 free Timestamp of repository gentoo: Tue, 26 Apr 2016 11:30:02 +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-r3::gentoo dev-lang/perl: 5.20.2::gentoo dev-lang/python: 2.7.10-r1::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.19.1::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.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.22-r4::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 eva location: /var/lib/layman/eva masters: gentoo priority: 0 torbrowser location: /var/lib/layman/torbrowser masters: gentoo priority: 1 wirelay location: /var/lib/layman/wirelay masters: gentoo priority: 2 gentoo-zh location: /var/lib/layman/gentoo-zh masters: gentoo priority: 3 local location: /usr/local/portage masters: gentoo priority: 15 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=core-avx2 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0" CONFIG_PROTECT_MASK="/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" CXXFLAGS="-march=core-avx2 -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://gentoo.osuosl.org/ http://distfiles.gentoo.org/ ftp://ftp.osuosl.org/pub/gentoo/" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j9" 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="X a52 aac aacplus aacs aalib acl acoustid acpi ads alac alsa amd64 amr analyzer ao audacious audiofile autotrace bash-completion bazaar berkdb bidi bittorrent bl bluetooth bluray branding bs2b btrfs bzip2 cairo cdda cddb cdio cdparanoia cdr celt chm cjk clang cli clucene consolekit corefonts cover cpudetection cracklib crypt css cue cups cvs cxx darcs dbus declarative designer device-mapper dga dirac directfb discid dmx dri drm dts dv dvb dvd dvdr embedded emboss emovix encode exif extensions extras faac faad fam fasttrack fat fdformat fdk ffmpeg firefox flac fontconfig fortran frei0r ftp fuse g3dvl gadu gd gdbm geoip ggi gif gimp git glade glamor gme gmp gnome-keyring gnutella gnutls gphoto2 gpm graphviz groupwise gsf gsm gstreamer gtk hddtemp hfs hidpi hpijs http iconv icu ieee1394 imagemagick imlib inotify ipod iptc ipv6 irda java javafx javascript jfs joystick jpeg jpeg2k kde kdenlive kdepim kdrive kipi ladspa lame lcms ldap libass libcaca libkms libmpeg2 libmpv libnotify libsamplerate libsoxr libv4l live lm_sensors lvm lyrics lz4 lzma lzo mac mad matroska mdadm mdnsresponder-compat meanwhile melt mencoder mercurial messages midi mikmod minizip mjpeg mms mmx mmxext mng mod modplug modules mp3 mp4 mpeg mplayer mpris msn multilib musepack musicbrainz mysql nas ncurses network nls nptl nsplugin ntfs nut ogg ogm openal opencl openexr opengl openmp openssl opus oscar pam pango pcre pcre16 pdf perl phonon plasma playlist pm-utils png pnm policykit postproc ppds ppp pulseaudio pvr python qsui qt3support qt4 quicktime radio rar readline reiser4 reiserfs replaygain rss rtmp rubberband scanner schroedinger script sdl seccomp semantic-desktop session shorten shout sid smp sms sndfile soprano sox speex spell sqlite srt sse sse2 ssh ssl startup-notification stemmer stereo streaming subtitles subversion svg swat taglib tcl tcpd tga theora threads thumbnail tiff timidity tk toolame tools tracker transcode tray tremor truetype tta twolame udev udisks unicode upnp upnp-av upower usb utils v4l vala vcd vcdx vf-dlopen vorbis vpx wavpack webkit widevine winbind wma wmf wxwidgets x264 x265 xa xanin xattr xcb xcomposite xfs xine xinerama xml xmp xpm xps xscreensaver xv xvid xvmc yahoo zeroconf zlib zoran" ABI_X86="32 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="*" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev keyboard mouse joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="pdfimport" LINGUAS="pt_BR" 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" 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
I'm experimenting the very same problem, gentoo-sources kernel 4.4.6, openrc 0.19.1, on many systems, virtual and real. I can't see the problem while booting the slowest between my gentoo (I've a dozen of system up and running, updated at the same level), but the problem is clearly present in at least 3 systems. I never noticed the problem with previous kernel versions (the latest being 4.1.15-r1), but it is a rather random boot message, so, I may have missed it. If I may add my cents, I may confirm a really small delay, in the order of 1/1000th of second, as simple as "sleep 0.001" in the /lib/rc/sh/rc-cgroup.sh, line 89: sleep 0.001 mkdir -p "$cgroup" before the mkdir, function cgroup_add_service(), seems to solve the problem in all of my systems. No more errors in "/var/log/rc.log" in dozen of boots. G. Vitillaro.
Another info which may be useful. From my logs openrc-0.19.1 is installed from 12:20:38 02/01/16 and I never noticed any of these error messages, in many boots of a dozen of systems, kept updated at the same level with almost the same configuration, under kernel 4.1.15-r1. The problem arose the first time I tested kernel 4.4.6, couple of days ago, after more than 3 months. It looks, at least in its frequency, a "kernel dependent" issue. G. Vitillaro.
(In reply to Giuseppe Vitillaro from comment #20) > If I may add my cents, I may confirm a really small delay, in the order of > 1/1000th of second How did you stumble across this fix, if you don't mind me asking? Thanks. Alec
(In reply to Alec Ari from comment #22) > (In reply to Giuseppe Vitillaro from comment #20) > > If I may add my cents, I may confirm a really small delay, in the order of > > 1/1000th of second > > How did you stumble across this fix, if you don't mind me asking? > > Thanks. > > Alec Sorry for the delay, Alec, very busy days last week. Well, following the thread of this BUG. I thought that the "ps" commands, described as a possible temporary fix, before "mkdir -p "$cgroup", was just adding a "delay" before the failing "mkdir" command, so, I converted it in a "sleep". By the way, it is a "partial fix": it seems the probability of a failing "mkdir" decrease, but doesn't completely solve the problem. Peppe.
(In reply to Giuseppe Vitillaro from comment #20) I made similar experiences in another field of coding some time ago. IIRC I got the answer that "mkdir" doesn't (any longer) guarantee that the directory is *immediately* there. But I couldn't believe that.
(In reply to Toralf Förster from comment #24) > (In reply to Giuseppe Vitillaro from comment #20) > I made similar experiences in another field of coding some time ago. IIRC I > got the answer that "mkdir" doesn't (any longer) guarantee that the > directory is *immediately* there. But I couldn't believe that. I remember to have read the same thing. Just emerging my gentoo systems, so I tested this small change to the fix: sleep 0.01 mkdir -p "$cgroup" sleep 0.01 inserting a 1/100sec delay BEFORE and AFTER the mkdir (a small overhead of 1sec every 50 cgroup_add_service(). No errors so far from five systems reboot. It may actually that in this conditions mkdir is not warrentd to "immediately" create the directory and this lead to the random errors.
So we know sleep works, any ideas what a proper fix would be? Perhaps a patch / bug report to GNU coreutils' mkdir once we have more information? Has anyone tried replacing coreutils with busybox and see if the problem goes away without sleep? Just a thought. (Non-Gentoo gurus, DO NOT DO THIS)
(In reply to Alec Ari from comment #26) > So we know sleep works, any ideas what a proper fix would be? Perhaps a > patch / bug report to GNU coreutils' mkdir once we have more information? > Has anyone tried replacing coreutils with busybox and see if the problem > goes away without sleep? Just a thought. (Non-Gentoo gurus, DO NOT DO THIS) Not sure it actually know it works. It is an "elusive", "time dependent" problem. Too many times I thought it had been FIXED, last months, just to discover it was already there. I've never seen a delay after an mkdir from the shell command line. I rather think the delay, if it is a delay, has something to do with the special cgroup filesystem and it should be kernel dependent.
I've stumbled upon this bug upon switching default shell from bash to dash, so I guess it could be related to the way shell's -d/-f/-w tests work. Giuseppe's sleep 0.01 after&before hack seem to have fixed it for me now.
This appears to still be alive and well, I just got it when restarting courier-authlib: $ sudo /etc/init.d/courier-authlib restart * Stopping courier-pop3d over SSL ... [ ok ] * Stopping courier-pop3d ... [ ok ] * Stopping courier-imapd over SSL ... [ ok ] * Stopping courier-imapd ... [ ok ] * Stopping courier-authlib: authdaemond ... [ ok ] * Starting courier-authlib: authdaemond ... [ ok ] /lib64/rc/sh/rc-cgroup.sh: line 108: printf: write error: No such device * Starting courier-imapd over SSL ... * Starting courier-pop3d over SSL ... * Starting courier-imapd ... * Starting courier-pop3d ... [ ok ]