From: Eric Wong <e@80x24.org>
To: Jonathan Corbet <corbet@lwn.net>
Cc: meta@public-inbox.org
Subject: Re: Race condition in public-inbox-nntpd?
Date: Tue, 16 Oct 2018 06:36:20 +0000 [thread overview]
Message-ID: <20181016063620.bm34ts45yp5irqmh@untitled> (raw)
In-Reply-To: <20181013124658.23b9f9d2@lwn.net>
Jonathan Corbet <corbet@lwn.net> wrote:
> So for a little while, I've been seeing occasional NNTP weirdness,
> associated with log lines like:
>
> Oct 13 18:01:06 archive.lwn.net public-inbox-nntpd[12352]: error from:
> XOVER 196731-196731 (BUG: nested long response at /usr/local/share/perl5/PublicInbox/NNTP.pm line 588.
>
> Such complaints tend to be immediately followed by significant
> disgruntlement on the client side.
Do you have any logs of client commands which hit this?
public-inbox-nntpd should log commands + timings to stdout.
> I use gnus to read the various NNTP feeds, and I mark articles (with "u")
> when I want to keep them around; I typically have quite a few of them
> marked at any given time in a group like linux-kernel. When I open the
> group in gnus, it will do an XOVER on each of those marked articles,
> generating dozens of single-article XOVERs in quick succession. It's
> always the single-article ones that fail; the big XOVER for all of the new
> stuff at the end works just fine.
>
> Another user has complained that things fail with Thunderbird, again with
> the same symptoms on the server side.
No idea how to use either gnus or tbird, here; so a command
sequence which can be fed into nc or socat would be helpful in
reproducing the problem.
Any relation to group size in reproducing this?
> I have "fixed" the problem with this little patch:
<snip>
> That makes things work, but it is clearly papering over the real
> problem.
Agreed.
> I've spent a fair while staring at the code. As far as I can tell, the
> logic there should be sufficient to prevent this from happening; it's not
> supposed to be reading while a long response is in the works. But somehow
> it happens.
I stared at it some, too; but I'm not seeing it right now, either;
but it's been a tiring few weeks for me so I'm not at my sharpest.
Thanks for bringing this to everyones' attention.
next prev parent reply other threads:[~2018-10-16 6:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-13 18:46 Race condition in public-inbox-nntpd? Jonathan Corbet
2018-10-16 6:36 ` Eric Wong [this message]
2018-10-16 14:04 ` Jonathan Corbet
2018-12-06 3:59 ` [PATCH] nntp: prevent event_read from firing twice in a row Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181016063620.bm34ts45yp5irqmh@untitled \
--to=e@80x24.org \
--cc=corbet@lwn.net \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).