Streaming NNTP bug?
Julien ÉLIE
julien at trigofacile.com
Wed Mar 23 18:40:24 UTC 2011
Hi River,
> I ran innd under truss and confirmed it really is writing the bad data:
>
> write(108, 0x09B17CB8, 335248) = 49152
> 4 3 8 < 4 d 8 7 b 7 5 c $ 0 $ 7 6 9 0 $ b a 4 a c e f 3 @ r e
> a d e r . n e w s . o r a n g e . f r >\r\n r 4 3 8 < i m 8 d
> 0 t $ v 3 u $ 1 @ n e w s . e t e r n a l - s e p t e m b e r .
>
> I'll see if I can reproduce the problem on a test system, and find out
> what's happening.
I suggest using:
ctlinnd trace innd yes
to turn traces on. Also configure your syslog to catch the trace level.
For syslog-ng, I use something like:
filter f_news { facility(news); };
filter f_at_least_debug { level(debug); };
destination df_news_dot_debug { file("/var/log/news/news.debug" owner("news")); };
log {
source(s_all);
filter(f_news);
filter(f_at_least_debug);
destination(df_news_dot_debug);
};
It will allow to catch what innd/nc.c replies in NCwritereply():
i = write(cp->fd, &bp->data[bp->used], bp->left);
if (Tracing || cp->Tracing)
syslog(L_TRACE, "%s NCwritereply %d=write(%d, \"%.15s\", %lu)",
CHANname(cp), i, cp->fd, &bp->data[bp->used],
(unsigned long) bp->left);
if (Tracing || cp->Tracing)
syslog(L_TRACE, "%s > %s", CHANname(cp), text);
NCcheck() calls that function:
snprintf(cp->Sendid.data, cp->Sendid.size, "%d %s",
NNTP_FAIL_CHECK_REFUSE, cp->av[1]);
NCwritereply(cp, cp->Sendid.data);
Maybe the issue you are seeing comes from a failure during a write.
It would be interesting to know when i != 0 (that is to say bp->left
is non-zero, which means that something was not totally written).
Strange that it always happens at the tenth reply on your system.
--
Julien ÉLIE
« L'éternité, c'est long, surtout vers la fin. » (Woody Allen)
More information about the inn-workers
mailing list