panic: lock (sleep mutex) inp not locked @
/usr/src/sys/netinet6/in6_pcb.c:710
Robert Watson
rwatson at FreeBSD.org
Tue Aug 17 21:04:40 PDT 2004
On Wed, 18 Aug 2004, Jun Kuriyama wrote:
> This is current kernel as of 2004.08.17.04.10.00+00.
>
> panic: lock (sleep mutex) inp not locked @
> /usr/src/sys/netinet6/in6_pcb.c:710
Hmm. This code is somewhat more spaghetti than I thought. In the IPv4
version, we check the return value of the notify function to decide if we
need to unlock. Something like the following may fix this:
Index: in6_pcb.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet6/in6_pcb.c,v
retrieving revision 1.59
diff -u -r1.59 in6_pcb.c
--- in6_pcb.c 14 Aug 2004 15:32:20 -0000 1.59
+++ in6_pcb.c 18 Aug 2004 04:02:00 -0000
@@ -705,9 +705,11 @@
}
do_notify:
- if (notify)
- (*notify)(inp, errno);
- INP_UNLOCK(inp);
+ if (notify) {
+ if ((*notify)(inp, errno))
+ INP_UNLOCK(inp);
+ } else
+ INP_UNLOCK(inp);
}
INP_INFO_WUNLOCK(pcbinfo);
splx(s);
Do you have a dump for this? If so, is there any chance you could tell me
what function 'notify' was set to point to, and what the value of 'inp' is
there?
Robert N M Watson FreeBSD Core Team, TrustedBSD Projects
robert at fledge.watson.org Principal Research Scientist, McAfee Research
> cpuid = 1;
> KDB: enter: panic
> [thread 100012]
> Stopped at kdb_enter+0x2b: nop
> db> trace
> kdb_enter(c0679e1c) at kdb_enter+0x2b
> panic(c067d733,c068df54,c0688ab3,c0686de5,2c6) at panic+0x131
> witness_unlock(c3b4084c,8,c0686de5,2c6) at witness_unlock+0xbc
> _mtx_unlock_flags(c3b4084c,0,c0686de5,2c6) at _mtx_unlock_flags+0x5b
> in6_pcbnotify(c0709d40,e4d3abb0,1600,e4d3abd0,9bed) at in6_pcbnotify+0x26d
> tcp6_ctlinput(6,e4d3abb0,e4d3ab80) at tcp6_ctlinput+0xf0
> icmp6_notify_error(c3ad5b00,28,4c,6) at icmp6_notify_error+0x70e
> icmp6_input(e4d3acd4,e4d3ac74,3a,0,3a) at icmp6_input+0xc14
> ip6_input(c3ad5b00) at ip6_input+0xd22
> netisr_processqueue(c0708ca4) at netisr_processqueue+0x6e
> swi_net(0) at swi_net+0x88
> ithread_loop(c3461b80,e4d3ad48,c3461b80,c04de148,0) at ithread_loop+0x124
> fork_exit(c04de148,c3461b80,e4d3ad48) at fork_exit+0xa4
> fork_trampoline() at fork_trampoline+0x8
> --- trap 0x1, eip = 0, esp = 0xe4d3ad7c, ebp = 0 ---
>
>
> --
> Jun Kuriyama <kuriyama at imgsrc.co.jp> // IMG SRC, Inc.
> <kuriyama at FreeBSD.org> // FreeBSD Project
> _______________________________________________
> freebsd-current at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe at freebsd.org"
>
More information about the freebsd-current
mailing list