From uspoerlein@gmail.com  Thu Oct 26 13:44:17 2006
Return-Path: <uspoerlein@gmail.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id D179A16A47C
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 26 Oct 2006 13:44:17 +0000 (UTC)
	(envelope-from uspoerlein@gmail.com)
Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5C04643DB4
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 26 Oct 2006 13:43:11 +0000 (GMT)
	(envelope-from uspoerlein@gmail.com)
Received: by ug-out-1314.google.com with SMTP id m2so321295uge
        for <FreeBSD-gnats-submit@freebsd.org>; Thu, 26 Oct 2006 06:43:10 -0700 (PDT)
Received: by 10.67.27.3 with SMTP id e3mr2840624ugj;
        Thu, 26 Oct 2006 06:43:10 -0700 (PDT)
Received: from coyote.q.local ( [85.180.131.23])
        by mx.google.com with ESMTP id 27sm430873ugp.2006.10.26.06.43.09;
        Thu, 26 Oct 2006 06:43:10 -0700 (PDT)
Received: from coyote.q.local (localhost [127.0.0.1])
	by coyote.q.local (8.13.8/8.13.8) with ESMTP id k9QDhAXm006805;
	Thu, 26 Oct 2006 15:43:10 +0200 (CEST)
	(envelope-from q@coyote.q.local)
Received: (from q@localhost)
	by coyote.q.local (8.13.8/8.13.8/Submit) id k9QDhAWk006804;
	Thu, 26 Oct 2006 15:43:10 +0200 (CEST)
	(envelope-from q)
Message-Id: <200610261343.k9QDhAWk006804@coyote.q.local>
Date: Thu, 26 Oct 2006 15:43:10 +0200 (CEST)
From: Ulrich Spoerlein <uspoerlein@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: pjd@freebsd.org, andre@freebsd.org, rwatson@freebsd.org
Subject: ggated broken on RELENG_6 because of socket changes
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         104829
>Category:       kern
>Synopsis:       ggated broken on RELENG_6 because of socket changes
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pjd
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 26 13:50:14 GMT 2006
>Closed-Date:    Tue Nov 14 11:21:34 GMT 2006
>Last-Modified:  Tue Nov 14 11:21:34 GMT 2006
>Originator:     Ulrich Spoerlein
>Release:        FreeBSD 6.2-PRERELEASE i386
>Organization:
>Environment:
Two RELENG_6 machines, checked out and build yesterday
>Description:
I had several panics with a ggate/gmirror device and am now looking into the problem.
One thing that's clearly wrong, is ggated spitting out socket errors and bad file 
descriptors.

>How-To-Repeat:
Simply export some device with a suitable gg.exports. Run ggated -v, run
'ggatec create host device' on some suitable host. As soon as you run ggatec, ggated
will continually spit out errors like this:


tice: disk_thread: started [/dev/da1s2e]!
notice: recv_thread: started [/dev/da1s2e]!
notice: send_thread: started [/dev/da1s2e]!
error: Error while receiving hdr packet: Resource temporarily unavailable.
error: Exiting.
info: Connection from: 10.0.0.1.
debug: Receiving version packet.
debug: Version packet received.
debug: Receiving initial packet.
debug: Initial packet received.
debug: Connection created [10.0.0.1, /dev/da1s2e].
debug: New connection created (token=2782934185).
debug: Sending initial packet.
info: Connection from: 10.0.0.1.
debug: Receiving version packet.
debug: Version packet received.
debug: Receiving initial packet.
debug: Initial packet received.
debug: Found existing connection (token=2782934185).
debug: Connection added [10.0.0.1, /dev/da1s2e].
debug: Sending initial packet.
debug: Connection removed [10.0.0.1 /dev/da1s2e].
debug: Process created [/dev/da1s2e].
notice: disk_thread: started [/dev/da1s2e]!
notice: recv_thread: started [/dev/da1s2e]!
notice: send_thread: started [/dev/da1s2e]!
error: Error while receiving hdr packet: Resource temporarily unavailable.
error: Exiting.
info: Connection from: 10.0.0.1.
debug: Receiving version packet.
debug: Version packet received.
debug: Receiving initial packet.
debug: Initial packet received.
debug: Connection created [10.0.0.1, /dev/da1s2e].
debug: New connection created (token=2615672988).
debug: Sending initial packet.
info: Connection from: 10.0.0.1.
debug: Receiving version packet.
debug: Version packet received.
debug: Receiving initial packet.
debug: Initial packet received.
debug: Found existing connection (token=2615672988).
debug: Connection added [10.0.0.1, /dev/da1s2e].
debug: Sending initial packet.
debug: Connection removed [10.0.0.1 /dev/da1s2e].
debug: Process created [/dev/da1s2e].
notice: disk_thread: started [/dev/da1s2e]!
notice: send_thread: started [/dev/da1s2e]!
notice: recv_thread: started [/dev/da1s2e]!

>Fix:

Someone [1] figured out that backing out sys/kern/uipc_socket2.c
rev. 1.147.2.7 fixes the problem (I haven't tried that yet ...)

[1]
http://lists.freebsd.org/pipermail/freebsd-stable/2006-October/029934.html
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->pjd 
Responsible-Changed-By: rwatson 
Responsible-Changed-When: Thu Oct 26 18:05:40 UTC 2006 
Responsible-Changed-Why:  
Assign first to pjd so that he can look at whether this is a ggated bug 
triggered by the fixed behavior of the socket layer.  Assign to me or 
andre if that is not the case.  Thanks! 


http://www.freebsd.org/cgi/query-pr.cgi?pr=104829 
State-Changed-From-To: open->patched 
State-Changed-By: pjd 
State-Changed-When: Mon Oct 30 18:29:45 UTC 2006 
State-Changed-Why:  
Fix committed to HEAD, MFC after 1 week. 
Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/104829: commit references a PR
Date: Mon, 30 Oct 2006 18:29:45 +0000 (UTC)

 pjd         2006-10-30 18:29:24 UTC
 
   FreeBSD src repository
 
   Modified files:
     sbin/ggate/shared    ggate.c 
   Log:
   - Handle timeouts from recv(2) properly.
   - Increase timeout to 8 seconds (should be made configurable).
   
   Reported by:    Ulrich Spoerlein <uspoerlein@gmail.com>
   Reported by:    Christian Laursen <xi@borderworlds.dk>
   PR:             kern/104829
   MFC after:      1 week
   
   Revision  Changes    Path
   1.6       +6 -2      src/sbin/ggate/shared/ggate.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/104829: commit references a PR
Date: Mon, 13 Nov 2006 15:23:26 +0000 (UTC)

 pjd         2006-11-13 15:13:05 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_6)
     sbin/ggate/shared    ggate.c 
   Log:
   MFC:    sbin/ggate/shared/ggate.c       1.6
   
   - Handle timeouts from recv(2) properly.
   - Increase timeout to 8 seconds (should be made configurable).
   
   Reported by:    Kazuaki ODA <kaakun@highway.ne.jp>
   Reported by:    Ulrich Spoerlein <uspoerlein@gmail.com>
   Reported by:    Christian Laursen <xi@borderworlds.dk>
   PR:             kern/104829
   Approved by:    re (bmah)
   
   Revision  Changes    Path
   1.5.2.1   +6 -2      src/sbin/ggate/shared/ggate.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: pjd 
State-Changed-When: Tue Nov 14 11:21:17 UTC 2006 
State-Changed-Why:  
Fix committed to RELENG_6. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=104829 
>Unformatted:
