From nobody@FreeBSD.org  Wed Jan 19 04:45:39 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 71468106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 19 Jan 2011 04:45:39 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (unknown [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 6132E8FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 19 Jan 2011 04:45:39 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p0J4jdEB045835
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 19 Jan 2011 04:45:39 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p0J4jd1i045834;
	Wed, 19 Jan 2011 04:45:39 GMT
	(envelope-from nobody)
Message-Id: <201101190445.p0J4jd1i045834@red.freebsd.org>
Date: Wed, 19 Jan 2011 04:45:39 GMT
From: George Michaelson <ggm@apnic.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: stuck kernel state in LISTEN on ipv6 daemon which has been killed
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         154134
>Category:       kern
>Synopsis:       [ip6] stuck kernel state in LISTEN on ipv6 daemon which has been killed
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-net
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 19 04:50:07 UTC 2011
>Closed-Date:    
>Last-Modified:  Mon Jan 24 02:50:11 UTC 2011
>Originator:     George Michaelson
>Release:        8.1
>Organization:
APNIC
>Environment:
FreeBSD wattle.apnic.net 8.1-RELEASE-p2 FreeBSD 8.1-RELEASE-p2 #1: Tue Jan 18 01:06:10 UTC 2011     root@wattle.apnic.net:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
rsync --daemon not accepting v6 rsync calls. TCPDUMP shows packetflow syn/fin.

kill daemon, state left in kernel with netstat -an | grep 873.

add inetd entry tcp6. can't bind to port.

reboot, problem gone.

oddly, ssh and ping6 working, and I see a heap of nd6 neighbour discovery even though the two boxes 'knew' each other when this happened.
>How-To-Repeat:
not sure I can. looks like sometimes, kernel state for listen() in v6 is stuck even if user process goes away.
>Fix:
notknown

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-amd64->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Jan 23 21:38:22 UTC 2011 
Responsible-Changed-Why:  
Reclassify. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=154134 

From: "Bjoern A. Zeeb" <bz@FreeBSD.org>
To: bug-followup@FreeBSD.org, ggm@apnic.net
Cc:  
Subject: Re: kern/154134: [ip6] stuck kernel state in LISTEN on ipv6 daemon
 which has been killed
Date: Sun, 23 Jan 2011 22:03:33 +0000 (UTC)

 Him
 
 unfortunately you didn't give any of the output;  I guess you lost it
 with the reboot and don't have a scrollback?
 
 I am not exactly sure about the details that happened:
 
 1) you ran rsync standalon in daemon mode
 2) you tried to connect by IPv6 which failed?  - How?
 3) killed rsync
 4) what exact state was netstat showing?  Was rsync really all gone?
 5) you added what exactly to inetd.conf?
 
 -- 
 Bjoern A. Zeeb                                 You have to have visions!
          <ks> Going to jail sucks -- <bz> All my daemons like it!
    http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html

From: George Michaelson <ggm@apnic.net>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/154134: [ip6] stuck kernel state in LISTEN on ipv6 daemon which has been killed
Date: Mon, 24 Jan 2011 12:44:07 +1000

 On 24/01/2011, at 8:03 AM, Bjoern A. Zeeb wrote:
 
 > Him
 >=20
 > unfortunately you didn't give any of the output;  I guess you lost it
 > with the reboot and don't have a scrollback?
 
 right. sad.
 
 >=20
 > I am not exactly sure about the details that happened:
 >=20
 > 1) you ran rsync standalon in daemon mode
 
 yes.
 
 > 2) you tried to connect by IPv6 which failed?  - How?
 
 SYN, but no reply. client then falls back to nd and thats bizarre, but =
 what happened.
 
 multiple times btw.
 
 > 3) killed rsync
 
 yes.
 
 > 4) what exact state was netstat showing?  Was rsync really all gone?
 
 tcp6       0      0 *.873                  *.*                    LISTEN
 
 not in a FIN_WAIT_2 or TIMEOUT or anything.
 
 pstree showed no process in zombie.
 
 > 5) you added what exactly to inetd.conf?
 
 rsync   stream  tcp6    nowait  root   /usr/local/bin/rsync rsyncd =
 --daemon -6
 
 Look, My gut feel is that this was a one-off.=20
 
 If you get other people saying hmm.. some net trash is left active in =
 the kernel in V6 sometimes then this might be useful debug of when it =
 was seen in a kernel, but at this point it cleared across reboot, and I =
 have no further debug I can give. I can't reproduce.
 
 mark it stalled or close?
 
 -G=
>Unformatted:
