[Bug 728774] New: during boot: /etc/rc.status: line 54: /dev/stderr: No such device or address
https://bugzilla.novell.com/show_bug.cgi?id=728774 https://bugzilla.novell.com/show_bug.cgi?id=728774#c0 Summary: during boot: /etc/rc.status: line 54: /dev/stderr: No such device or address Classification: openSUSE Product: openSUSE 12.1 Version: Factory Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: d.a.van.delft@gmail.com QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; nl; rv:1.9.2.23) Gecko/20110920 SUSE/3.6.23-0.2.1 Firefox/3.6.23 This message (present in /var/log/messages) is given a couple of times during system start up, for example by ntp and mysql. Not sure if it is harmful, but may be indicative of wrong order/dependency of services at boot. This is with systemd start up, have not tested yet with sysvinit. Reproducible: Always Steps to Reproduce: 1. 2. 3. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c1
--- Comment #1 from Danny van Delft
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c
zj jia
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c2
Wilfred van Velzen
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c3
--- Comment #3 from Wilfred van Velzen
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c4
Ruediger Oertel
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c5
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c6
--- Comment #6 from Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c7
--- Comment #7 from Wilfred van Velzen
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c8
--- Comment #8 from Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c9
--- Comment #9 from Wilfred van Velzen
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c10
--- Comment #10 from Wilfred van Velzen
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c11
--- Comment #11 from Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c12
--- Comment #12 from Wilfred van Velzen
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c13
--- Comment #13 from Ruediger Oertel
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c14
Ruediger Oertel
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c15
--- Comment #15 from Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c16
--- Comment #16 from Wilfred van Velzen
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c17
Luuk Vosslamber
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c18
Wilfred van Velzen
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c19
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c20
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c21
--- Comment #21 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c22
--- Comment #22 from Danny van Delft
As it seems that the mysql boot script is destroying the symbolic link /dev/stderr I'd like to know from the current mysql maintainers which script does this do and how to fix this.
As a reminder, it is not only mysql that gives this message at boot: the ntp script as well. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c23
--- Comment #23 from Wilfred van Velzen
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c25
--- Comment #25 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c26
--- Comment #26 from Wilfred van Velzen
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c27
--- Comment #27 from Danny van Delft
(In reply to comment #22)
The ntp script its self does not touch /dev/stderr that is if /dev/stderr was removed or replaced then this error simply happens to all scripts. Please note that /etc/rc.status will be sourced/readed at the very first lines of the most boot scripts.
Maybe it would help to add some lines like
rc_exit ()
test -h /dev/stderr || echo "Service $0 has removed /dev/stderr" if test -e /dev/stderr -a "$(readlink /dev/stderr)" != fd/2 ; then echo "Service $0 has destroyed /dev/stderr" fi exit $_rc_status_all }
into the shell function rc_exit() of /etc/rc.status ... maybe with this we will detect the waste producer.
Done that, but gave no output. So added the following lines to /etc/rc.status, just before the "redirecting to systemctl" is done in the start|stop|... section: degbug="logger" echo 'OUTPUT of ls -l /dev/std*' | $degbug ls -l /dev/std* | $degbug echo 'OUTPUT of ls -lL /dev/std*' | $degbug ls -lL /dev/std* | $degbug echo 'OUTPUT of ls -l /dev/fd/*' | $degbug ls -l /dev/fd/* | $degbug echo 'OUTPUT of ls -lL /dev/fd/*' | $degbug ls -lL /dev/fd/* | $degbug echo 'OUTPUT of netstat -l -n -p' | $degbug netstat -l -n -p | $degbug echo 'OUTPUT of ps axf' | $degbug ps axf | $degbug echo "redirecting to systemctl" >/dev/stderr I will attach the output of these. In it you'll see the ultimate destination of /dev/stderr: May 29 13:36:43 postoffice logger: lrwx------ 1 root root 64 May 29 13:36 /dev/fd/2 -> socket:[8947] May 29 13:36:43 postoffice logger: OUTPUT of ls -lL /dev/fd/* May 29 13:36:43 postoffice ntp[1644]: ls: cannot access /dev/fd/3: No such file or directory May 29 13:36:43 postoffice logger: crw-rw-rw- 1 root root 1, 3 May 29 13:36 /dev/fd/0 May 29 13:36:43 postoffice logger: prw------- 1 root root 0 May 29 13:36 /dev/fd/1 May 29 13:36:43 postoffice logger: srwxrwxrwx 1 root root 0 Jan 1 1970 /dev/fd/2 A socket which apparently doesn't exist. HTH -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c28
--- Comment #28 from Danny van Delft
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c29
--- Comment #29 from Danny van Delft
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c30
--- Comment #30 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c31
--- Comment #31 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c32
--- Comment #32 from Wilfred van Velzen
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c33
--- Comment #33 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c34
--- Comment #34 from Wilfred van Velzen
Guess triggered by Danny's debug session: it happens duing boot/ system start up only.
Maybe you misunderstood: The bug is still showing it self, not just during boot! # date; rcmysql restart Tue May 29 15:08:41 CEST 2012 redirecting to systemctl # tail -3 /var/log/messages 2012-05-29T15:08:42+02:00 reposerver mysql[13668]: Shutting down service MySQL ..done 2012-05-29T15:08:42+02:00 reposerver mysql[13721]: /etc/rc.status: line 57: /dev/stderr: No such device or address 2012-05-29T15:08:44+02:00 reposerver mysql[13721]: Starting service MySQL ..done -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c35
--- Comment #35 from Danny van Delft
(In reply to comment #27)
SysVinit does not use such sockets. Does this happen with the rc links that is with e.g. rcntp or during the boot process its self?
Both at system boot and when manually invoking rcntp restart.
SysVinit does not use such sockets.
Fine, but this is under systemd control. So the question becomes why a symbolic link to a non existing socket is created. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c36
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c37
--- Comment #37 from Danny van Delft
IMHO a very good question
So the question becomes why a symbolic link to a non existing socket is created.
Or probably more likely, why the socket disappears after the link has been created. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c38
Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c39
--- Comment #39 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c40
Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c41
Dieter Jurzitza
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c42
--- Comment #42 from Luuk V
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c43
--- Comment #43 from Jeff Mahoney
https://bugzilla.novell.com/show_bug.cgi?id=728774 https://bugzilla.novell.com/show_bug.cgi?id=728774#c44 Jeff Mahoneychanged: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|kernel-maintainers@forge.pr |jeffm@suse.com |ovo.novell.com | --- Comment #44 from Jeff Mahoney 2012-06-06 15:31:57 EDT --- > after discussing this with upstream systemd, it is suggested to get the kernel > fixed one time for all to handle dup on a socket. What isn't working correctly with dup on a socket? It's functionally equivalent to forking. The same struct file (and obviously as a result, the same socket) just get their refcount incremented and are assigned to an additional fd. Can you provide a link to the discussion? Perhaps I'm missing something. /dev/stderr pointing to a socket will *always* return -ENXIO. This is by design. >From net/socket.c: /* * In theory you can't get an open on this inode, but /proc provides * a back door. Remember to keep it shut otherwise you'll let the * creepy crawlies in. */ static int sock_no_open(struct inode *irrelevant, struct file *dontcare) { return -ENXIO; } It might be enough to allow the open to proceed if the opener owns the socket. Then it's functionally equivalent to the dup case. (In reply to comment #3) > I've replaced '>/dev/stderr' with '1>&2' on line 54 of /etc/rc.status -> > Problem gone! > > Please fix this in the distribution package... This may not be the "correct" answer but it _will_ work. The big thing is that redirecting to /dev/stderr *isn't* the same as as 1>&2. File descriptor 2 is already open with the 1>&2 case. The file descriptor used for > /dev/stderr will never be 2. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c45
--- Comment #45 from Jeff Mahoney
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c46
--- Comment #46 from Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c47
--- Comment #47 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c48
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c49
--- Comment #49 from Jeff Mahoney
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c50
--- Comment #50 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c51
Ludwig Nussel
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c52
--- Comment #52 from Per Jessen
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c53
Koos Pol
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c54
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c55
Christian Boltz
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c56
Christian Boltz
*** Bug 800573 has been marked as a duplicate of this bug. ***
Note: Bug 800573 contains a patch - attachment 522021 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c57
--- Comment #57 from Wilfred van Velzen
Note: Bug 800573 contains a patch - attachment 522021 [details]
The same patch has been suggested in Comment 3 of this bug almost a year ago... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c58
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c59
--- Comment #59 from Manfred Hollstein
(In reply to comment #57)
This is a workaround! The real problem has to be fixed otherwise the normal scripting does not work. Please note the open via `>/dev/stderr' is valid!
I'm not sure I follow you here. What do you mean with "normal scripting"? Something like ">&2" has been valid shell script code for more than 20 years and most scripters are used to it. Using "> /dev/stderr" might look more obvious, but we should make sure that the scripts work correctly, and when "> /dev/stderr" doesn't work occasionally, please open a new report for that issue in general, but lets get this particular bug fixed using a proper fix - even if you call it a workaround. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c60
Don Hughes
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c61
Pi Ny
fggfgf
I confirm this bug with ntp (12.2, fresh dup from 12.1) during boot and feel tempted to repeat comment #60. It’s 15 months now since at least a workaround is known... WHY can't the workaround be implemented despite it is not THE clean solution until such a thing exists? Please don't fight on the back of your users. Now a lot of people are forced to fiddle around in a core start-up script... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c62
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c63
--- Comment #63 from Pi Ny
For 12,.3 and above:
Mon Feb 4 10:52:44 UTC 2013 - werner@suse.de - Avoid to stumble over missing /dev/stderr in boot script started by systemd (work around bnc#728774o but not solve it)
the question is: when this will be fixed in the kernel. I guess this will never happen as long there is not enough pressure onto the kernels people (:
I jumped forward to 12.3 and I am "Forced To Resort To Astonishment": There it is "fixed" (in terms of the workaround). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c64
Jeff Mahoney
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c65
Jeff Mahoney
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c66
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c67
--- Comment #67 from Jeff Mahoney
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c68
--- Comment #68 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=728774
https://bugzilla.novell.com/show_bug.cgi?id=728774#c
Jeff Mahoney
participants (1)
-
bugzilla_noreply@novell.com