Bug 2719

Summary: klogd incorrectly splits up kernel messages
Product: Busybox Reporter: Johan van Selst <johans>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.17.x   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
Host: Target:
Build:
Attachments: Patch klogd to assemble partial error lines into a single syslog message.

Description Johan van Selst 2010-10-19 13:38:12 UTC
Created attachment 2611 [details]
Patch klogd to assemble partial error lines into a single syslog message.

Busybox klogd handles newlines in kernel messages, splitting such a message up in multiple lines (messages) for syslog. But it does not handle partial messages _without_ a newline. The kernel sometimes prints error messages in chunks (e.g. 3 or 4 prints for a single error line); due to this bug they and up as multiple error messages (lines) in syslog. This happens for example with register dumps when an application crashes.

The fix is to keep collecting partial messages until either a newline is received, or the internal message buffer is full.

A simple patch that does this, is attached. Please include this (or similar patch) in the next release.
Comment 1 Denys Vlasenko 2010-10-19 21:12:17 UTC
Fixed a bit differently in

http://git.busybox.net/busybox/commit/?id=0016bcee374606e79c48a1a97479b0521f947942

Thanks!
Comment 2 Denys Vlasenko 2010-10-28 22:19:57 UTC
Fix will be in 1.18.x