Thread View: news.software.nntp
10 messages
10 total messages
Started by Paul Martin
Thu, 02 Dec 1999 00:00
Nasty little bug in Diablo dnewslink
Author: Paul Martin
Date: Thu, 02 Dec 1999 00:00
Date: Thu, 02 Dec 1999 00:00
15 lines
1154 bytes
1154 bytes
I can't remember whether this has bitten anyone else before, and I'm offline at the moment... If dnewslink attempts to connect to a remote server, gets through the TCP handshake, but gets no greeting from the far server, it sits there, doing nothing, for ever. The nasty bit is that it hasn't locked that queue fully at that point, and when the next queue run happens, a new dnewslink process comes up and gets stuck at the same point. Eventually you'll run out of processes or file handles (or both). -- Paul Martin <pm@zetnet.net> at home, swap dash to dot to email.
Re: Nasty little bug in Diablo dnewslink
Author: Brad Knowles
Date: Mon, 06 Dec 1999 00:00
Date: Mon, 06 Dec 1999 00:00
27 lines
2056 bytes
2056 bytes
In article <384b0113$1$18510@news.zetnet.co.uk>,
pm@nowster-zetnet.co.uk (Paul Martin) wrote:
> I didn't get a response out of Matt from the last set of patches I sent
> him (which I also copied to this newsgroup), so I'm assuming he's
> otherwise engaged.
Matt is exceptionally busy. You can't assume that he will
acknowledge e-mail on any subject, especially not when related to Diablo.
> Has Joe stopped reading this newsgroup?
Joe is probably about as busy as Matt, he just has a larger interest
in keeping his systems running and therefore pays more attention to
things related to Diablo. You can't assume that he'll read any
particular message posted to this newsgroup, although you are more
likely to get a response from him with regards to a private e-mail
message sent to him on this subject.
--
Brad Knowles <brad@shub-internet.org> <http://www.shub-internet.org/brad/>
Are you a USENET news server administrator outside of North America or
Western Europe? Would you like a newsfeed from a site in the Freenix
Top 65? If so, please contact me via private e-mail for details.
Re: Nasty little bug in Diablo dnewslink
Author: Joe Greco
Date: Mon, 06 Dec 1999 00:00
Date: Mon, 06 Dec 1999 00:00
30 lines
2313 bytes
2313 bytes
In news.software.nntp article <brad-8B1C20.11035306121999@news.skynet.be>, Brad Knowles <brad@shub-internet.org> wrote: :In article <384b0113$1$18510@news.zetnet.co.uk>, :pm@nowster-zetnet.co.uk (Paul Martin) wrote: : :> I didn't get a response out of Matt from the last set of patches I sent :> him (which I also copied to this newsgroup), so I'm assuming he's :> otherwise engaged. : : Matt is exceptionally busy. You can't assume that he will :acknowledge e-mail on any subject, especially not when related to Diablo. : :> Has Joe stopped reading this newsgroup? : : Joe is probably about as busy as Matt, he just has a larger interest :in keeping his systems running and therefore pays more attention to :things related to Diablo. You can't assume that he'll read any :particular message posted to this newsgroup, although you are more :likely to get a response from him with regards to a private e-mail :message sent to him on this subject. Probably not, posting in the newsgroup is probably better :-) There's lots of stuff that flies by that I might have something to say about and simply choose not to comment on, but the fact remains that I'll probably take one look at the index in my inbox scanning for interesting people/subjects (and this grows _fast_, hundreds of msgs/day), but I'll probably look at the index for a newsgroup several times because it moves relatively slowly. ... JG
Re: Nasty little bug in Diablo dnewslink
Author: Paul Martin
Date: Mon, 06 Dec 1999 00:00
Date: Mon, 06 Dec 1999 00:00
20 lines
1291 bytes
1291 bytes
In article <A6K14.1646$Sz5.241286@ptah.visi.com>, Mike Horwath wrote: >Paul Martin <pm@nowster-zetnet.co.uk> wrote: >: If dnewslink attempts to connect to a remote server, gets through the TCP >: handshake, but gets no greeting from the far server, it sits there, doing [snip] >Have you emailed this off to Mr. Dillion yet? I didn't get a response out of Matt from the last set of patches I sent him (which I also copied to this newsgroup), so I'm assuming he's otherwise engaged. >Or to Mr. Greco? Has Joe stopped reading this newsgroup? -- Paul Martin <pm@zetnet.net> at home, swap dash to dot to email.
Re: Nasty little bug in Diablo dnewslink
Author: Brad Knowles
Date: Tue, 07 Dec 1999 00:00
Date: Tue, 07 Dec 1999 00:00
24 lines
1892 bytes
1892 bytes
In article <MCY24.2540$Sz5.371542@ptah.visi.com>,
drechsau+usenet@yuck.net (Mike Horwath) wrote:
> Joe Greco <jgreco@ns.sol.net> wrote:
> [a big paragraph]
>
> So, how is Diablo-1.25unoff coming?
It might not be so "unoff", if Joe ever gets around to sending his
ssh keys to Matt and Matt adds them to his server, so that someone can
start actually maintaining Diablo again. ;-)
Maybe we need to think about finding a new home for a CVS server
where certain specific trusted people could have commit priviledges, and
no longer be dependant on Matt?
--
Brad Knowles <brad@shub-internet.org> <http://www.shub-internet.org/brad/>
Are you a USENET news server administrator outside of North America or
Western Europe? Would you like a newsfeed from a site in the Freenix
Top 65? If so, please contact me via private e-mail for details.
Re: Nasty little bug in Diablo dnewslink
Author: Paul Martin
Date: Wed, 08 Dec 1999 00:00
Date: Wed, 08 Dec 1999 00:00
26 lines
2047 bytes
2047 bytes
In article <brad-F78FC6.17320908121999@news.skynet.be>, Brad Knowles wrote: > BTW, anybody got any good pointers for books that could help teach >someone how to take single-threaded programs and make them >multi-threaded? I believe accepted wisdom is that it's best if the program is designed to be multithreaded from the beginning. > There's obviously the Stevens books (_Advanced Programming in the >Unix Environment_ and _Unix Network Programming_ volumes I and II), >which I either have or plan on getting, but what about _Multi-Threaded >Programming in C_ by Mark Walmsley (Springer Verlag; ISBN: 1852331461)? I can only talk about the Stevens books, as those are the ones I have. His function wrapper headers occasionally obscure concepts in the listings. Unix Network Programming Vol 2 is the one to go for, but it may dwell on other topics than the pthread_* calls too much to make it an easy reference, as against a tutorial on the many ways of doing multiprocess networking, which it's very good at. -- Paul Martin <pm@zetnet.net> at home, swap dash to dot to email.
Re: Nasty little bug in Diablo dnewslink
Author: Brad Knowles
Date: Wed, 08 Dec 1999 00:00
Date: Wed, 08 Dec 1999 00:00
32 lines
2437 bytes
2437 bytes
In article <384E737E.426D@i66.net>, Steve/VA <steve@i66.net> wrote:
> I mean no disrespect to anyone by saying this - it's just that one of
> the things that makes INND so unweildy (IMHO) is the uncontrolled mix of
> programming styles...
That's a really good point. We'll need to appoint a Style Guru that
ensures that the program retains a consistent look-and-feel throughout
the code.
BTW, anybody got any good pointers for books that could help teach
someone how to take single-threaded programs and make them
multi-threaded?
There's obviously the Stevens books (_Advanced Programming in the
Unix Environment_ and _Unix Network Programming_ volumes I and II),
which I either have or plan on getting, but what about _Multi-Threaded
Programming in C_ by Mark Walmsley (Springer Verlag; ISBN: 1852331461)?
What do folks think _Concurrent Multi-Threaded Programming_ by Thaun
Q. Pham & Pankaj K. Garg (Prentice Hall; ISBN: 0131792849) will be like?
Are these people good writers?
--
Brad Knowles <brad@shub-internet.org> <http://www.shub-internet.org/brad/>
Are you a USENET news server administrator outside of North America or
Western Europe? Would you like a newsfeed from a site in the Freenix
Top 65? If so, please contact me via private e-mail for details.
Re: Nasty little bug in Diablo dnewslink
Author: Steve/VA
Date: Wed, 08 Dec 1999 00:00
Date: Wed, 08 Dec 1999 00:00
26 lines
1967 bytes
1967 bytes
Brad Knowles wrote: > > It might not be so "unoff", if Joe ever gets around to sending his > ssh keys to Matt and Matt adds them to his server, so that someone can > start actually maintaining Diablo again. ;-) > > Maybe we need to think about finding a new home for a CVS server > where certain specific trusted people could have commit priviledges, and > no longer be dependant on Matt? If Diablo development IS going to go this way, then can we possibly come to some consensus on 'programming style' (for want of a better phrase)... one of the things that makes Diablo so nice to mess about with is Matt's consistant programming style, since of course he was more or less the only person making changes to it... even with contributions, I don't doubt he would make whatever changes were required to make it slide neatly into the rest of the code. I mean no disrespect to anyone by saying this - it's just that one of the things that makes INND so unweildy (IMHO) is the uncontrolled mix of programming styles... S.
Re: Nasty little bug in Diablo dnewslink
Author: Brad Knowles
Date: Thu, 09 Dec 1999 00:00
Date: Thu, 09 Dec 1999 00:00
35 lines
2707 bytes
2707 bytes
In article <384ecea7$0$18512@news.zetnet.co.uk>,
pm@nowster-zetnet.co.uk (Paul Martin) wrote:
> I believe accepted wisdom is that it's best if the program is designed to
> be multithreaded from the beginning.
Understood. However, in the case of Diablo I don't have much choice.
I don't believe for a moment that I would be in the least bit
capable of writing a multi-threaded news server from scratch, while I
might be capable of teaching myself enough about multi-threaded
programming that I could succeed in taking Diablo from a single threaded
fork/exec model into something that would be multi-threaded.
> I can only talk about the Stevens books, as those are the ones I have.
Fair enough. Even that much would be appreciated.
> Unix Network Programming Vol 2 is the one to go for, but it may dwell on
> other topics than the pthread_* calls too much to make it an easy
> reference, as against a tutorial on the many ways of doing multiprocess
> networking, which it's very good at.
Hmm. A tutorial is something I could really use. Hopefully once I
understood the examples, I could then start applying that to the
existing real-world code that I would be trying to make multi-threaded.
--
Brad Knowles <brad@shub-internet.org> <http://www.shub-internet.org/brad/>
Are you a USENET news server administrator outside of North America or
Western Europe? Would you like a newsfeed from a site in the Freenix
Top 65? If so, please contact me via private e-mail for details.
Re: Nasty little bug in Diablo dnewslink
Author: Nickolai Zeldovich
Date: Thu, 16 Dec 1999 00:00
Date: Thu, 16 Dec 1999 00:00
51 lines
2449 bytes
2449 bytes
In article <3846828f$0$18507@news.zetnet.co.uk>, Paul Martin wrote:
>If dnewslink attempts to connect to a remote server, gets through the TCP
>handshake, but gets no greeting from the far server, it sits there, doing
>nothing, for ever.
After being bitten by this as well, I looked some more at the source and
it seems that KillFd isn't being set yet when reading the initial server
reply, so when dnewslink gets SIGALRM due to a timeout, it doesn't have
an fd to close. The following patch to dnewslink.c fixed this particular
bug for me; I'll probably submit it to Matt Dillon sometime soon along
with some other additions..
*** dnewslink.c 1999/12/15 06:42:29 1.3
--- dnewslink.c 1999/12/16 06:48:59 1.4
***************
*** 1026,1031 ****
--- 1026,1036 ----
clearCommandBuffer();
cfd = fd;
+ /* Set KillFd here to avoid deadlock when the remote server fails
+ * to respond after initial connection
+ */
+ KillFd = cfd;
+
switch(commandResponse(cfd, &ptr, NULL)) {
case OK_CANPOST: /* innd */
case OK_NOPOST: /* nntpd may still allow news transfers */
***************
*** 1034,1039 ****
--- 1039,1045 ----
dl_logit("connect: %s\n", (ptr ? ptr : "(unknown error)"));
stprintf("%s %s connect: err resp", HostName, CurrentBatchFile + CBFIndex);
clearCommandBuffer();
+ KillFd = -1;
close(cfd);
cfd = -1;
fd = -1;
***************
*** 1079,1084 ****
--- 1085,1091 ----
dl_logit("mode headfeed failed: %s\n", (ptr ? ptr : "<Unexpected EOF>"));
stprintf("%s %s connect: mode headfeed failed", HostName, CurrentBatchFile + CBFIndex);
clearCommandBuffer();
+ KillFd = -1;
close(cfd);
cfd = -1;
sprintf(LastErrBuf, "mode headfeed command failed");
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads