truncated output in syslog with 1.4.2

Stephane Billiart stephane.billiart at gmail.com
Mon Mar 19 18:40:09 PDT 2007


On 19/03/07 ? ? 20:41, Mike Frysinger wrote:
> On Monday 19 March 2007, Denis Vlasenko wrote:
> > Hi Mike, Stephane,
> >
> > On Monday 19 March 2007 02:49, Stephane Billiart wrote:
> > > On 18/03/07 ? ? 18:32, Mike Frysinger wrote:
> > > > anyone else seen truncated messages when using syslog/klog ?  so i
> > > > start up my system and run syslog/klog, /var/log/messages looks like:
> > > > Jun  1 08:01:10 blackfin syslog.info syslogd started: BusyBox v1.4.1
> > > > then i restart klog and this shows up:
> > > > Jun  1 08:02:11 blackfin user.notice kernel: Ker
> > > > Jun  1 08:02:11 blackfin user.notice kernel: klo
> > > >
> > > > changing MAX_READ in sysklogd.c to like 0xFF gives me more output, but
> > > > i feel like that isnt the correct route :)
> > > > -mike
> >
> > Thanks Mike for narrowing it down.
> >
> > > I have reported the same problem last month with uClibc 0.9.27 (glibc is
> > > ok). I did not have time to narrow it down precisely but the reads in
> > > sysklogd.c are definitely short.
> >
> > I think you built uclibc with extra small stdio buffer
> > or something like that -> BUFSIZ is very small (128 bytes?).
> 
> yeah, default is normally like 4096, but we were using 256
> 
> > What printf("BUFSIZ=%d\n", BUFSIZ) prints, if added in syslogd.c?
> 
> echo '#include <stdio.h>' | ...-gcc -E -dD - | grep BUFSIZ
> #define __STDIO_BUFSIZ 256
> 
> > Does attached modified syslogd.c work better?
> 
> seems to work, thanks ... you going to cut something for 1.4.x or just leave 
> it for 1.5.x ?
> -mike

I just did some tests, BUFSIZE is also 256 with my uClibc
Your modified syslogd works for me too.

-- 
Stéphane Billiart                      http://perso.orange.fr/billiart/


More information about the busybox mailing list