Re: network02.patch - MPSAFE network interrupt

Hiten Pandya <hmp@xxxxxxxxxxxxx> wrote:
> Matthew Dillon wrote:
>> :Unfortunately the calling function isn't shown properly in gdb:
>>
>> It looks like its loaded from a module. What modules do you have
>> loadde?
>>
>> -Matt
>
> Late entry, but it should help. The asf(8) utility can help
> people to retrieve symbols from kernel modules. It works by using
> the output of the kldstat(8) command from a vmcore.
>
> Put the following file into your home directory as ".gdbinit":
>
> # fetch http://leaf.dragonflybsd.org/~hmp/dot.gdbinit
> # mv dot.gdbinit ~/.gdbinit
>
> Once you have that file in the right place, reload your gdb session
> and type 'kldstat' inside it. The output of that gdb command should
> be identical to that of the real kldstat(8) utility. Save the output
> of the previous action into a a file; we refer to it as "some-file"
>
> Next step is to invoke the asf(8) utility. The job of this program
> is to generate a gdb command file with the right start addresses for
> loading the debug-enabled KLD files:
>
> # cat some-file | asf -f -s -x /path-to-modules asf.out
> # gdb -k -q /path-to-kernel /path-to-core
> ...
> (kgdb) source asf.out
> (kgdb) bt
>
> Provided asf(8) finds your modules, this will give correct start
> addresses for loading the kernel modules symbols. I have been
> meaning to outline this for a while now, finally got the chance.
>
> I am pretty sure I haven't missed any vital steps, so if this works
> please do provide a verification for others.
Cool, that worked fine. Here's the complete backtrace:
#0 dumpsys () at /usr/src/sys/kern/kern_shutdown.c:527
#1 0xc027acc8 in boot (howto=256) at /usr/src/sys/kern/kern_shutdown.c:360
#2 0xc027b17a in panic (
fmt=0xc04b0d68 "assertion: (ifp->if_serializer)->last_td == curthread in %s") at /usr/src/sys/kern/kern_shutdown.c:673
#3 0xc02e0820 in ether_input (ifp=0xdec4e0b8, eh=0x0, m=0xdeb12600)
at /usr/src/sys/net/if_ethersubr.c:568
#4 0xc02e07e0 in ether_input_internal (ifp=0x0, m=0x0)
at /usr/src/sys/net/if_ethersubr.c:539
#5 0xc02f6d1b in ieee80211_input (ifp=0xdec4e0b8, m=0xdeb12600,
ni=0xc17ea0e8, rssi=47, rstamp=0)
at /usr/src/sys/netproto/802_11/ieee80211_input.c:302
#6 0xdec0314e in ipw_data_intr ()
#7 0xdec0334c in ipw_rx_intr ()
#8 0xdec036fc in ipw_intr ()
#9 0xc025fc8f in ithread_handler (arg=0xb)
at /usr/src/sys/kern/kern_intr.c:750
#10 0xc02814ab in lwkt_create (func=0, arg=0x0, tdp=0xc0530294, template=0x0,
Johannes