From edwin@mavetju.org  Sat May 17 12:00:14 2008
Return-Path: <edwin@mavetju.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B214010656DA
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 17 May 2008 12:00:14 +0000 (UTC)
	(envelope-from edwin@mavetju.org)
Received: from mail5out.barnet.com.au (mail5.barnet.com.au [202.83.178.78])
	by mx1.freebsd.org (Postfix) with ESMTP id 6F9268FC1A
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 17 May 2008 12:00:14 +0000 (UTC)
	(envelope-from edwin@mavetju.org)
Received: by mail5out.barnet.com.au (Postfix, from userid 1001)
	id 454202218A88; Sat, 17 May 2008 22:00:13 +1000 (EST)
Received: from mail5auth.barnet.com.au (mail5.barnet.com.au [202.83.178.78])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail5auth.barnet.com.au", Issuer "*.barnet.com.au" (verified OK))
	by mail5.barnet.com.au (Postfix) with ESMTP id F2AC621B2D88
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 17 May 2008 22:00:12 +1000 (EST)
Received: from k7.mavetju (k7.mavetju.org [10.251.1.18])
	by mail5auth.barnet.com.au (Postfix) with ESMTP id 97DCA2218A7F
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 17 May 2008 22:00:12 +1000 (EST)
Received: by k7.mavetju (Postfix, from userid 1001)
	id 012867DD; Sat, 17 May 2008 22:00:11 +1000 (EST)
Message-Id: <20080517120012.012867DD@k7.mavetju>
Date: Sat, 17 May 2008 22:00:11 +1000 (EST)
From: Edwin Groothuis <edwin@mavetju.org>
Reply-To: Edwin Groothuis <edwin@mavetju.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [panic] panic while restarting net/freenet6
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         123758
>Category:       kern
>Synopsis:       [panic] panic while restarting net/freenet6
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-net
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 17 12:10:00 UTC 2008
>Closed-Date:    
>Last-Modified:  Tue Jun 15 17:15:07 UTC 2010
>Originator:     Edwin Groothuis
>Release:        FreeBSD 6.3-RELEASE-p2 i386
>Organization:
-
>Environment:
FreeBSD qemuc-1.mavetju.org 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Thu May 15 11:19:53 EST 2008     edwin@k7.mavetju:/usr/obj/usr/home/edwin/cvs/qemu/HEAD/sys/GENERIC  i386

Last cvsup is from 2008-05-16.

>Description:

I have installed net/freenet6 and am using the anonymous tunnel.

I setup a tunnel (/usr/local/etc/rc.d/freenet6 start), ssh into the
machine (via IPv6) and I ping www.freebsd.org and restart the tunnel
(/usr/local/etc/rc.d/freenet6 restart):

Jan  1 00:01:09 qemuc-1 kernel: _mtx_lock_flags(c1d75780,0,c0b2942e,11b,4,...) at _mtx_lock_flags+0xbc
Jan  1 00:01:09 qemuc-1 kernel: rtalloc1_fib(c871b7f0,0,0,0,c871b81c,...) at rtalloc1_fib+0x8d
Jan  1 00:01:09 qemuc-1 kernel: rtalloc1(c871b7f0,0,0,0,c1ff689c,...) at rtalloc1+0x27
Jan  1 00:01:09 qemuc-1 kernel: nd6_lookup(c1ff68a4,0,c1d82c00,c1e3783c,c1e3783c,...) at nd6_lookup+0x55
Jan  1 00:01:09 qemuc-1 kernel: nd6_is_addr_neighbor(c1ff689c,c1d82c00,c0b362e5,78c,c871b89c,...) at nd6_is_addr_neighbor+0x3b
Jan  1 00:01:09 qemuc-1 kernel: nd6_output(c1d82c00,c1d82c00,c1e09300,c1ff689c,c1e3783c,...) at nd6_output+0x10f
Jan  1 00:01:09 qemuc-1 kernel: ip6_output(c1e09300,0,c871b9f0,0,0,...) at ip6_output+0x1061
Jan  1 00:01:09 qemuc-1 kernel: tcp_output(c1e35974,c1e07200,30f,1,c1e337a4,...) at tcp_output+0x1364
Jan  1 00:01:09 qemuc-1 kernel: tcp_usr_send(c1e32188,0,c1e07200,0,0,...) at tcp_usr_send+0x248
Jan  1 00:01:09 qemuc-1 kernel: sosend_generic(c1e32188,0,c871bc60,0,0,...) at sosend_generic+0x50d
Jan  1 00:01:09 qemuc-1 kernel: sosend(c1e32188,0,c871bc60,0,0,...) at sosend+0x54
Jan  1 00:01:09 qemuc-1 kernel: soo_write(c1e46000,c871bc60,c1fe4600,0,c1e52880,...) at soo_write+0x4a
Jan  1 00:01:09 qemuc-1 kernel: dofilewrite(c871bc60,ffffffff,ffffffff,0,c1e46000,...) at dofilewrite+0x95
Jan  1 00:01:09 qemuc-1 kernel: kern_writev(c1e52880,3,c871bc60,8133030,0,...) at kern_writev+0x58
Jan  1 00:01:09 qemuc-1 kernel: write(c1e52880,c871bcfc,c,c0b2055e,c0bd6820,...) at write+0x4f
Jan  1 00:01:09 qemuc-1 kernel: syscall(c871bd38) at syscall+0x2a3
Jan  1 00:01:09 qemuc-1 kernel: Xint0x80_syscall() at Xint0x80_syscall+0x20
Jan  1 00:01:09 qemuc-1 kernel: --- syscall (4, FreeBSD ELF32, write), eip = 0x283948b3, esp = 0xbfbfe2bc, ebp = 0xbfbfe2d8 ---
Jan  1 00:01:09 qemuc-1 kernel: panic: _mtx_lock_sleep: recursed on non-recursive mutex rtentry @ /usr/home/edwin/cvs/qemu/HEAD/sys/net/route.c:332
Jan  1 00:01:09 qemuc-1 kernel: 
Jan  1 00:01:09 qemuc-1 kernel: cpuid = 0
Jan  1 00:01:09 qemuc-1 kernel: KDB: enter: panic
Jan  1 00:01:09 qemuc-1 kernel: Uptime: 3h59m25s



>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->julian 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat May 17 12:12:33 UTC 2008 
Responsible-Changed-Why:  
Julian, 

Does this sound like an issue with your routing table patches? 

Edwin 

http://www.freebsd.org/cgi/query-pr.cgi?pr=123758 
State-Changed-From-To: open->feedback 
State-Changed-By: julian 
State-Changed-When: Sat May 17 07:06:37 PDT 2008 
State-Changed-Why:  
It probably is. 

Can you give me the actual panic message. 
Also, what wsa the workload, and what protocols and options were defined? 


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

From: Julian Elischer <julian@ironport.com>
To: bug-followup@FreeBSD.org, edwin@mavetju.org
Cc:  
Subject: Re: kern/123758: [panic] panic while restarting net/freenet6
Date: Sat, 17 May 2008 09:47:24 -0400

 This is a multi-part message in MIME format.
 --------------020707060405030406040804
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 could well be..  I  will try investigate..
 
 Have  you got the actual panic message?
 
 --------------020707060405030406040804
 Content-Type: text/x-vcard; charset=utf-8;
  name="julian.vcf"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="julian.vcf"
 
 begin:vcard
 fn:Julian Elischer
 n:Elischer;Julian
 email;internet:julian@ironport.com
 tel;work:(650) 989 6531
 tel;home:(510) 526 7695
 x-mozilla-html:FALSE
 version:2.1
 end:vcard
 
 
 --------------020707060405030406040804--

From: Edwin Groothuis <edwin@mavetju.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/123758: [panic] panic while restarting net/freenet6
Date: Sun, 18 May 2008 10:33:45 +1000

 Hello Julian,
 
 On Sat, May 17, 2008 at 09:47:24AM -0400, Julian Elischer wrote:
 > could well be..  I  will try investigate..
 > 
 > Have  you got the actual panic message?
 
 panic: _mtx_lock_sleep: recursed on non-recursive mutex rtentry @ /usr/home/edwin/cvs/qemu/HEAD/sys/net/route.c:332
 
 cpuid = 0
 KDB: enter: panic
 [thread pid 12 tid 100004 ]
 Stopped at      kdB-enter+0x3a: movl $0, kdb_why
 
 The backtrace is the same as in the PR.
 
 
 What I have is a -current of last thursday with 
 
 - an IPv6 tunnel provided by Hexago setup in the console of the
   machine-about-to-crash via the net/freenet6 port.
 
 - an SSH session via IPv6 to the machine-about-to-crash. Inside
   that IPv6 session I do $something, for example "ping www.freebsd.org"
 
 - I restart the IPv6 tunnel via "/usr/local/etc/rc.d/freenet6
   restart", the tunnel gets stopped and then the machine panics
 
 
 Edwin
 
 -- 
 Edwin Groothuis      |            Personal website: http://www.mavetju.org
 edwin@mavetju.org    |              Weblog: http://www.mavetju.org/weblog/

From: Edwin Groothuis <edwin@mavetju.org>
To: FreeBSD Gnats Submit <freebsd-gnats-submit@freebsd.org>
Cc:  
Subject: Re: kern/123758: [panic] panic while restarting net/freenet6
Date: Mon, 19 May 2008 22:30:57 +1000

 On Julians request I've build an image from before the routing table
 changes and it also panics on that one:
 
 show locks
 exclusive sleep mutex radix node head r = 0 (0xc1bcd080) locked @ /usr/home/edwin/cvs/qemu/jeli/sys/net/route.c:152
 exclusive sleep mutex rtentry r = 0 (0xc1c676f0) locked @ /usr/home/edwin/cvs/qemu/jeli/sys/netinet6/nd6.c:1932
 exclusive rw tcpinp r = 0 (0xc1c637a4) locked @ /usr/home/edwin/cvs/qemu/jeli/sys/netinet/tcp_timer.c:438
 
 [/home/edwin/cvs/qemu/jeli] root@k7>cat CVS/Tag 
 D2008.05.06.14.00.00
 
 
 Edwin
 -- 
 Edwin Groothuis      |            Personal website: http://www.mavetju.org
 edwin@mavetju.org    |              Weblog: http://www.mavetju.org/weblog/
State-Changed-From-To: feedback->open 
State-Changed-By: edwin 
State-Changed-When: Thu Jun 12 00:21:15 UTC 2008 
State-Changed-Why:  
Please note that this still happens with a kernel / world on 2008-06-12. 

Over to gnn@ (and maybe bz@?) because this is not caused by the 
changes Julian made but somewhere else in the IPv6 code. 



Responsible-Changed-From-To: julian->gnn 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu Jun 12 00:21:15 UTC 2008 
Responsible-Changed-Why:  
Feedback given. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=123758 
Responsible-Changed-From-To: gnn->net@freebsd.org 
Responsible-Changed-By: gnn 
Responsible-Changed-When: Tue Jun 15 17:13:33 UTC 2010 
Responsible-Changed-Why:  


http://www.freebsd.org/cgi/query-pr.cgi?pr=123758 
Responsible-Changed-From-To: net@freebsd.org->freebsd-net 
Responsible-Changed-By: gnn 
Responsible-Changed-When: Tue Jun 15 17:14:53 UTC 2010 
Responsible-Changed-Why:  
Give this one back. 

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