Hello all

We've run into a problem with stdout-syslog-bridge with systemd v35 on F16.

Our application logged some very long lines as part of debug output,
which filled up the stream buffer for the app.

http://cgit.freedesktop.org/systemd/tree/src/stdout-syslog-bridge.c#n91

I think LINE_MAX is 2048.

At

http://cgit.freedesktop.org/systemd/tree/src/stdout-syslog-bridge.c#n350

this caused a read system call with a 0 length. l=0, so stream_process
returned 0.

This is considered an error condition and

http://cgit.freedesktop.org/systemd/tree/src/stdout-syslog-bridge.c#n609

closed the stream.

The system calls around this time:

read(19, "a very long string here"..., 1261) = 1261
epoll_wait(5, {{EPOLLIN, {u32=7778096, u64=7778096}}}, 1, 4294967295) = 1
read(19, "", 0)                   = 0
epoll_ctl(5, EPOLL_CTL_DEL, 19, NULL) = 0
close(19)                         = 0

Luckily our logging code checks for error returns from its printing
code, so we picked up the error.

Other applications that don't do this might cause this condition after
which their logs will start disappearing.

What's the way forward on this one?

Regards

Albert
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to