Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 385305

Summary: sys-apps/util-linux-2.20: dmesg command stops before two consecutive 'newline' in the kernel log buffer
Product: Gentoo Linux Reporter: Maxime Gervais <maxime>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: mads
Priority: Normal    
Version: 10.0   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
Test module
Makefile for test module

Description Maxime Gervais 2011-10-02 03:52:17 UTC
When I run the dmesg command, the output stops (no error, output code 0) after these lines :

md/raid0:md127: md_size is 2500516864 sectors. 
******* md127 configuration ********* 
zone0=[sda1/sdb1/] 
       zone offset=0kb device offset=0kb size=1250258432kb 
********************************** 

This is caused by the following line in the kernel tree (drivers/md/raid0.c:77) that has two consecutive '\n' at the end:
printk(KERN_INFO "**********************************\n\n");



- Raw dmesg output (dmesg -r) works fine.
- sys-apps/util-linux-2.19.1-r1 works fine.

Reproducible: Always

Steps to Reproduce:
1. Clear the kernel log buffer (dmesg -C) 
1. Load the test module
2. Run dmesg
Actual Results:  
dmesg output:
foo

Expected Results:  
dmesg output:
foo

bar

Kernel: sys-kernel/gentoo-sources-3.0.4-r1
Comment 1 Maxime Gervais 2011-10-02 03:53:57 UTC
Created attachment 288513 [details]
emerge --info
Comment 2 Maxime Gervais 2011-10-02 03:54:48 UTC
Created attachment 288515 [details]
Test module
Comment 3 Maxime Gervais 2011-10-02 03:57:02 UTC
Created attachment 288517 [details]
Makefile for test module
Comment 4 Mads 2011-10-02 14:51:43 UTC
I've also noticed that dmesg after a while stops showing new output after updating util-linux... nice that you found out what was causing it.
Comment 5 SpanKY gentoo-dev 2011-10-02 18:34:11 UTC
easy to reproduce by doing:
# dmesg -c >/dev/null
# printf 'one\ntwo\n\nthree\nfour\n' > /dev/kmsg
# dmesg
Comment 6 SpanKY gentoo-dev 2011-10-03 02:44:41 UTC
latest upstream dmesg has this already fixed