Bug 2719 - klogd incorrectly splits up kernel messages
Summary: klogd incorrectly splits up kernel messages
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.17.x
Hardware: Other Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-19 13:38 UTC by Johan van Selst
Modified: 2010-10-28 22:19 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
Patch klogd to assemble partial error lines into a single syslog message. (444 bytes, patch)
2010-10-19 13:38 UTC, Johan van Selst
Details

Note You need to log in before you can comment on or make changes to this bug.
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