> Hello!
>
> > ...which appears to be at the only schedule_timeout call in tcp_close():
> ...
> > So, I guess the question here is should close() be blocking on this
> > socket? Is this a bug in the kernel or in named?
>
> Look at named source. If it sets SO_LINGER, it is buggy.
>
> Older named's set SO_LINGER only making xfer after forking,
> it was crap too, but it was harmless.
Hmm..I'm using bind-8.1.2 here, as bind-8.2 was causing some problems for
me.
Looking in the code:
int
sq_openw(struct qstream *qs, int buflen) {
#ifdef SO_LINGER /* XXX */
static const struct linger ll = { 1, 120 };
#endif
INSIST(qs->s_wbuf == NULL);
qs->s_wbuf = (u_char *)memget(buflen);
if (qs->s_wbuf == NULL)
return (-1);
qs->s_wbuf_send = qs->s_wbuf;
qs->s_wbuf_free = qs->s_wbuf;
qs->s_wbuf_end = qs->s_wbuf + buflen;
#ifdef SO_LINGER /* XXX */
/* kernels that map pages for IO end up failing if the pipe is full
* at exit and we take away the final buffer. this is really a kernel
* bug but it's harmless on systems that are not broken, so...
*/
setsockopt(qs->s_rfd, SOL_SOCKET, SO_LINGER, (char *)&ll, sizeof ll);
#endif
return (0);
}
The setsockopt() call and comment above looks a bit suspicious. :)
I will try commenting out the setsockopt() and see if things work better...
Simon-
| Simon Kirby | Systems Administration |
| mailto:sim@netnation.com | NetNation Communications |
| http://www.netnation.com/ | Tech: (604) 684-6892 |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/