Bugzilla – Bug 780643
/dev/stderr no such device or address
Last modified: 2012-12-03 08:18:39 UTC
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1 System upgraded from 11.4 to 12.2 For start up routines with errors I get the following message during boot: ... /etc/rc.status: line 57: /dev/stderr: No such device or address. Reproducible: Always Steps to Reproduce: 1. Boot system 2. Inspect log 3.
Same here, as well with new installations of openSUSE 12.2. happens at boot with ntpd: ntp[1783]: /etc/rc.status: line 57: /dev/stderr: No such device or address and sometimes while running (restarting npcd): npcd[22338]: Shutting down npcd /etc/rc.status: line 57: /dev/stderr: No such device or address seems that in the start environment /dev/stderr is not available (ntpd in chroot), maybe devtmpfs is not fully populated then. Conflicting line 57 in /etc/rc.status of package aaa_base-12.2-2.11.1 is start|stop|reload|restart|try-restart|force-reload|status) echo "redirecting to systemctl" >/dev/stderr ;; by substituting ">/dev/stderr" with ">&2" everything is fine. See patch: --- orig/etc/rc.status 2012-11-05 19:15:09.407475863 +0100 +++ fixed/etc/rc.status 2012-11-05 19:15:01.855257145 +0100 @@ -54,7 +54,7 @@ if test -z "$SYSTEMD_NO_WRAP" && /bin/mo ;; esac case "$1" in - start|stop|reload|restart|try-restart|force-reload|status) echo "redirecting to systemctl" >/dev/stderr ;; + start|stop|reload|restart|try-restart|force-reload|status) echo "redirecting to systemctl" >&2 ;; *) unset _rc_base ;; esac if test -n "$_rc_base" -a -x /bin/systemctl ; then
and with mysql: mysql[10912]: Shutting down service MySQL ..done mysql[10985]: /etc/rc.status: line 57: /dev/stderr: No such device or address mysql[10985]: Starting service MySQL ..done
/dev/stderr should be a symlink to /dev/fd/2, which in turn is a symlink to /proc/self/fd/2. Example: $ namei -x /dev/stderr f: /dev/stderr D / D dev l stderr -> fd/2 l fd -> /proc/self/fd D / D proc l self -> 23605 d 23605 d fd l 2 -> /dev/pts/0 D / D dev D pts c 0 Please check how does /dev/stderr look like in your case.
I modified the /etc/rc.status script by inserting your /usr/bin/namei -x /dev/stderr > tmpfile before the actual command of echo "redirecting to systemctl" >/dev/stderr The output is: """ f: /dev/stderr D / D dev l stderr -> fd/2 l fd -> /proc/self/fd D / D proc l self -> 32502 d 32502 d fd l 2 -> socket:[1004453] socket:[1004453] - No such file or directory """ Hope this helps.
So /proc/self/fd/2 is a socket even in your shell? What shell is it? A tty login, ssh login, something else?
The above output was generated while using a /bin/bash shell via ssh login on a virtual machine. To rule out an login shell/ssh error I collected more info while rebooting the machine including $SHELL and $TERM. The $1 of rc.status was in both cases "status": Shutdown: ---- scope: status -- SHELL: /bin/bash -- TERM: dumb ---- f: /dev/stderr D / D dev l stderr -> fd/2 l fd -> /proc/self/fd D / D proc l self -> 2594 d 2594 d fd l 2 -> socket:[12470] socket:[12470] - No such file or directory Boot: ---- scope: status -- SHELL: /bin/bash -- TERM: dumb ---- f: /dev/stderr D / D dev l stderr -> fd/2 l fd -> /proc/self/fd D / D proc l self -> 1363 d 1363 d fd l 2 -> socket:[8960] socket:[8960] - No such file or directory
This is a kernel bug as there is no such links below /proc/<pid>/fd for sockets pairs. And as systemd uses socketpairs instead of pseudo ttys this cause the trouble. A workaround would be that systemd would use pseudo ttys instead of sockets pairs for interactive jobs. This could be done similar as startpar from SysVinit it does. *** This bug has been marked as a duplicate of bug 728774 ***