[Bug 672450] New: systemd: too many repeated messages on ttyS0 console
https://bugzilla.novell.com/show_bug.cgi?id=672450 https://bugzilla.novell.com/show_bug.cgi?id=672450#c0 Summary: systemd: too many repeated messages on ttyS0 console Classification: openSUSE Product: openSUSE 11.4 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: jslaby@novell.com QAContact: qa@suse.de CC: kasievers@novell.com Found By: --- Blocker: --- Created an attachment (id=414366) --> (http://bugzilla.novell.com/attachment.cgi?id=414366) screenlog Systemd repeats some messages thousand times while the system is booting. Screenlog attached. For example: .. ^MBoot logging started on /dev/ttyS0(/dev/console) at Wed Feb 16 10:29:08 2011 ^MBoot logging started on /dev/ttyS0(/dev/console) at Wed Feb 16 10:29:08 2011 ^MBoot logging started on /dev/ttyS0(/dev/console) at Wed Feb 16 10:29:08 2011 ^MBoot logging started on /dev/ttyS0(/dev/console) at Wed Feb 16 10:29:08 2011 ^MBoot logging started on /dev/ttyS0(/dev/console) at Wed Feb 16 10:29:08 2011 ^MBoot logging started on /dev/ttyS0(/dev/console) at Wed Feb 16 10:29:08 2011 ^MBoot logging started on /dev/ttyS0(/dev/console) at Wed Feb 16 10:29:08 2011 ^MBoot logging started on /dev/ttyS0(/dev/console) at Wed Feb 16 10:29:08 2011 ^MBoot logging started on /dev/ttyS0(/dev/console) at Wed Feb 16 10:29:08 2011 ^MBoot logging started on /dev/ttyS0(/dev/console) at Wed Feb 16 10:29:08 2011 ^MBoot logging started on /dev/ttyS0(/dev/console) at Wed Feb 16 10:29:08 2011 ^MBoot logging started on /dev/ttyS0(/dev/console) at Wed Feb 16 10:29:08 2011 ^MBoot logging started on /dev/ttyS0(/dev/console) at Wed Feb 16 10:29:08 2011 .. -- 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=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c1
Jiri Slaby
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c2
--- Comment #2 from Jiri Slaby
Ah, sorry I booted with sysvinit this time. So that's its fault.
Hmm, not really, happens also with systemd. But not that much. Only some messages are repeated. -- 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=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c3
Jiri Slaby
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c
Jiri Slaby
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c4
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c5
--- Comment #5 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c6
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c7
--- Comment #7 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c8
--- Comment #8 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c9
--- Comment #9 from Jiri Slaby
Jiri? You may remove the files
/lib/mkinitrd/scripts/boot-blogd.sh /lib/mkinitrd/scripts/boot-killblogd.sh /lib/mkinitrd/scripts/boot-killblogd2.sh
and change within
/lib/mkinitrd/scripts/boot-start.s
the line
exec < /dev/console > /dev/console 2>&1
to
exec < /dev/console > /dev/kmsg 2>&1
Yes, this stops blogd to flood the console.
... Nevertheless the serial driver in the kernel should not fool the usage of the system call write(2).
Nope, it's blogd who cripples. With this change (write(2) interception in the kernel): diff --git a/fs/read_write.c b/fs/read_write.c index 5520f8a..ecae48a 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -384,6 +384,14 @@ ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_ inc_syscw(current); } + if (!strcmp(current->comm, "blogd")) { + int a; + printk("%s: cnt=%lu ret=%ld str=", __func__, count, ret); + for (a = 0; a < min(count, 16LU); a++) + printk(KERN_CONT "%c", buf[a] == '\n' ? 'X' : buf[a]); + printk(KERN_CONT "\n"); + } + return ret; } The output looks like (i.e. blogd write the same messages several times even though the retval equals to what it wanted kernel to write...): [ 2.612154] vfs_write: cnt=78 ret=78 str=^MBoot logging st [ 2.616610] vfs_write: cnt=78 ret=78 str=^MBoot logging st [ 2.621521] vfs_write: cnt=5 ret=5 str=1095X [ 2.634171] vfs_write: cnt=118 ret=118 str=^MBoot logging st [ 2.640975] vfs_write: cnt=118 ret=118 str=^MBoot logging st [ 2.646736] vfs_write: cnt=118 ret=118 str=^MBoot logging st -- 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=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c10
Jiri Slaby
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c
Jiri Slaby
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c11
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c12
--- Comment #12 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c13
--- Comment #13 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c14
--- Comment #14 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c15
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c16
--- Comment #16 from Jiri Slaby
Which kernel version is used and does this happen with a prior version (2.6.37)?
This is my testing kernel where I can very easily inject code. Yes, it happens with 11.4 2.6.37 kernel. (In reply to comment #14)
In other words has there been cahnges at this area in the kernel?
It might be possible. -- 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=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c17
Jiri Slaby
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c18
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c19
--- Comment #19 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c20
--- Comment #20 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c21
Michael Matz
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c22
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c23
Jiri Slaby
OK, I'll remove you from CC
Jiri, please tell me your archtitecture, as I'd like to attach a blogd without switching any terminal into raw mode.
x86_64 It's like it opens /dev/ptmx for reading messages. It writes the messages to /dev/console which is /dev/ptm0 which gets to /dev/ptmx: tty_insert_flip_string_fixed_flag: blogd idx=0 name=ptm0 str=^MBoot logging st sys_write: fd=1 (/dev/console) cnt=78 ret=78 redirected_tty_write str=^MBoot logging st sys_read: fd=0 file=ffff880039d57000 (/dev/ptmx) cnt=78 ret=78 tty_read str=^MBoot logging st sys_write: fd=1 (/dev/ttyS0) cnt=78 ret=78 tty_write str=^MBoot logging st tty_insert_flip_string_fixed_flag: blogd idx=0 name=ptm0 str=^MBoot logging st sys_write: fd=7 (/dev/tty0) cnt=78 ret=78 redirected_tty_write str=^MBoot logging st sys_read: fd=0 file=ffff880039d57000 (/dev/ptmx) cnt=118 ret=118 tty_read str=sys_write: fd=4 (/dev/shm/initrd.msg) cnt=78 ret=78 do_sync_write str=XBoot logging st preping 11-block -- 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=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c24
--- Comment #24 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c25
--- Comment #25 from Jiri Slaby
Please install this executable binary as /sbin/blogd and
It doesn't spam the output. But it doesn't log anything either. There is no "Boot log started" etc. on the console... -- 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=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c
Jiri Slaby
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c26
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c27
Jiri Slaby
Hmmm ... that is strange, are you sure that you have removed the workaround mentioned in comment #7 ... just run
lsinitrd /boot/initrd | grep blogd
Yeah, my bad. chmod a+x /sbin/blogd helped. The issue persists. I fed the output through s/[\r\n][\r\n]*/\r/ to get rid of 600k of crap. -- 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=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c
Jiri Slaby
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c28
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c29
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c30
Greg Kroah-Hartman
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c31
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c32
--- Comment #32 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c33
--- Comment #33 from Hannes Reinecke
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c34
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c35
--- Comment #35 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c36
Marcus Meissner
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c37
--- Comment #37 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c38
--- Comment #38 from Marcus Meissner
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c39
Marcus Meissner
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c40
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c41
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c42
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c43
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c44
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=672450
https://bugzilla.novell.com/show_bug.cgi?id=672450#c45
--- Comment #45 from Bernhard Wiedemann
participants (1)
-
bugzilla_noreply@novell.com