Bug in ucspilogd v2.2.0.0

From: Colin Booth <cathexis_at_gmail.com>
Date: Sun, 9 Aug 2015 00:27:51 -0700

Hi Laurent,

I'm pretty sure some change in skalibs v2.3.6.0 broke some types of
message handling in ucspilogd. Specifically, a computer I have running
skalibs v2.3.5.1 and s6 v2.1.6.0 is able to read messages sent via the
logger command, whereas a computer I have running skalibs v2.3.6.0 and
s6 v2.2.0.0 cannot.

ucspilogd v2.2.0.0 gives the following when I send a message via logger:
root_at_radon:~# logger woo
_at_4000000055c6fe44103957dc ucspilogd: fatal: unable to read from stdin:
Broken pipe

ucspilogd v2.1.6.0:
root_at_heliocat:~# logger woo
_at_4000000055c6fe7401034cdc 0: 0: user.notice: Aug 9 07:16:32 heliocat: woo

I initially thought it was in the handoff code between s6-ipcserverd
and ucspilogd but after stracing the s6-ipcserverd process and
following forked off children, I'm pretty sure the issue is in
ucspilogd (or, more correctly, the skalibs functions that ucspilogd
wraps since the main program hasn't changed in months).

I haven't yet dug into the skalibs code to see what changed between
those tags, or started bisecting it to find out which commit broke.
However, the difference between a functional and non-functional log
write in strace is the following:

[pid 19388] readv(0, [{"<13>Aug 9 07:26:07 cathexis: wo"..., 8191},
{NULL, 0}], 2) = 34
[pid 19388] writev(1, [{"1000: 1000: user.notice: Aug 9 "..., 55},
{NULL, 0}], 2) = 55
[pid 19388] readv(0,
8158}, {"<13>Aug 9 07:26:07 cathexis: wo"..., 33}], 2) = 0

[pid 31983] readv(0, [{"<13>Aug 8 23:46:57 cathexis: wo"..., 8191},
{NULL, 0}], 2) = 33
[pid 31983] readv(0,
8159}, {"<13>Aug 8 23:46:57 cathexis: wo", 32}], 2) = 0
[pid 31983] writev(2, [{"ucspilogd: fatal: unable to read"..., 57},
{NULL, 0}], 2) = 57

Some syslog messages generated via non-logger sources work, such as
auth messages. Those have the same readv, writev, readv pattern.

Let me know if you need more.


"If the doors of perception were cleansed every thing would appear to
man as it is, infinite. For man has closed himself up, till he sees
all things thru' narrow chinks of his cavern."
  --  William Blake
Received on Sun Aug 09 2015 - 07:27:51 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC