Michael Grimm
2018-Jun-17 15:52 UTC
syslogd became silent between 11.2-PRERELEASE r334874 and r335282
On 17. Jun 2018, at 16:27, Michael Grimm <trashcan at ellael.org> wrote:> Hi, > > I am running service jails (VNET/bridge/epair) and a host at 11.2-PRERELEASE r335282, upgraded from r334874 today. > > All syslog messages at each jail become forwarded to syslogd running at the host. This setup worked for years. Today not a single syslog message becomes forwarded to the host's syslogd.I do believe that this commit might be the cause: https://svnweb.freebsd.org/base/stable/11/usr.sbin/syslogd/Makefile?revision=335059&view=markup&sortby=file But I do have to admit, that I do not understand what changed and what would cause my syslogd become silenced, though. Any hints?> > Host's syslogd can be reached from inside every jail, e.g.: > > jtest> nc -4vuw 1 10.x.y.z 514 > Connection to 10.x.y.z 514 port [udp/syslog] succeeded! > > logger doesn't throw any error. No message will be forwarded to the host's syslogd either: > > jtest> logger -4 10.x.y.z HELLO > jtest> > > I cannot find any hint in src/UPDATING. > > What did I miss? > Anyone else with a silenced syslogd? > Anyone running my setup with a noisy syslogd? > > Thank you in advance and regards, > Michael > > _______________________________________________ > freebsd-stable at freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"
Ed Schouten
2018-Jun-17 17:27 UTC
syslogd became silent between 11.2-PRERELEASE r334874 and r335282
Hi Michael, 2018-06-17 17:52 GMT+02:00 Michael Grimm <trashcan at ellael.org>:> I do believe that this commit might be the cause: > https://svnweb.freebsd.org/base/stable/11/usr.sbin/syslogd/Makefile?revision=335059&view=markup&sortby=fileThanks for reporting this issue. I just did some debugging on my system and I think I was able to reproduce this issue. It seems as if I made a tiny mistake in how I implemented the RFC 5426 UDP message size limiting. Could you please give the following patch for syslogd a try? Index: usr.sbin/syslogd/syslogd.c ==================================================================--- usr.sbin/syslogd/syslogd.c (revision 334706) +++ usr.sbin/syslogd/syslogd.c (working copy) @@ -1613,8 +1613,8 @@ struct iovec *last; size_t diff; - while (size > il->totalsize) { - diff = size - il->totalsize; + while (il->totalsize > size) { + diff = il->totalsize - size; last = &il->iov[il->iovcnt - 1]; if (diff >= last->iov_len) { /* Remove the last iovec entirely. */ It should be sufficient to apply this to just the 'client' syslogd. There is no need to patch the central (storage) server. -- Ed Schouten <ed at nuxi.nl> Nuxi, 's-Hertogenbosch, the Netherlands