Bug 123758 - [panic] panic while restarting net/freenet6
Summary: [panic] panic while restarting net/freenet6
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 6.3-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: crash
Depends on:
Blocks:
 
Reported: 2008-05-17 13:10 UTC by edwin
Modified: 2022-10-17 12:18 UTC (History)
0 users

See Also:


Attachments
julian.vcf (175 bytes, text/x-vcard; charset=utf-8)
2008-05-17 14:47 UTC, julian
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description edwin 2008-05-17 13:10:00 UTC
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
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-05-17 13:12:33 UTC
Responsible Changed
From-To: freebsd-bugs->julian

Julian, 

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

Edwin
Comment 2 julian 2008-05-17 14:47:24 UTC
could well be..  I  will try investigate..

Have  you got the actual panic message?
Comment 3 Julian Elischer freebsd_committer freebsd_triage 2008-05-17 15:06:37 UTC
State Changed
From-To: open->feedback

It probably is. 

Can you give me the actual panic message. 
Also, what wsa the workload, and what protocols and options were defined?
Comment 4 edwin 2008-05-18 01:33:45 UTC
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/
Comment 5 edwin 2008-05-19 13:30:57 UTC
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/
Comment 6 Edwin Groothuis freebsd_committer freebsd_triage 2008-06-12 01:21:15 UTC
State Changed
From-To: feedback->open

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. 



Comment 7 Edwin Groothuis freebsd_committer freebsd_triage 2008-06-12 01:21:15 UTC
Responsible Changed
From-To: julian->gnn

Feedback given.
Comment 8 George V. Neville-Neil freebsd_committer freebsd_triage 2010-06-15 18:13:33 UTC
Responsible Changed
From-To: gnn->net@freebsd.org
Comment 9 George V. Neville-Neil freebsd_committer freebsd_triage 2010-06-15 18:14:53 UTC
Responsible Changed
From-To: net@freebsd.org->freebsd-net

Give this one back.
Comment 10 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:05 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 11 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:18:19 UTC
Keyword: 

    crash

– in lieu of summary line prefix: 

    [panic]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>