Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: repeated failure to properly shutdown



On 7/21/16, bch <brad.harder%gmail.com@localhost> wrote:
> Alright -- I'm in (recompiled kernel with proper options, induced
> crash, loaded w/ gdb). What frame and data are we interested in ?


OK -- I roughly reviewed the mail thread and it looks (to me) like frame 6:

> #6  0xffffffff808ca91d in vclean (vp=vp@entry=0xfffffe8108412008) at
> /usr/src/sys/kern/vfs_vnode.c:1032

could be interesting -- so I looked at it's vnode_t (original argument
to func()) and the v_tag for it is (transcribed):
VT_TMPFS

and the v_mount refcounts and flags are:

(gdb) print vp->v_mount
$2 = (struct mount *) 0xfffffe81081c2008
(gdb) print vp->v_mount->mnt_refcnt
$3 = 2501
(gdb) print vp->v_mount->mnt_flag
$4 = 4128
(gdb)


There's much more to look at in the v_mount -- I'll wait for direction
to find out what's "interesting", if this is even the stack frame we
care about...


Cheers,

-bch

>
> /usr/obj/sys/arch/amd64/compile/GENERIC
> kamloops# gdb ./netbsd.gdb
> GNU gdb (GDB) 7.10.1
> Copyright (C) 2015 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64--netbsd".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
> <http://www.gnu.org/software/gdb/documentation/>.
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from ./netbsd.gdb...done.
> (gdb) target kvm /var/crash/netbsd.15.core
> 0xffffffff80119935 in cpu_reboot (howto=howto@entry=260,
> bootstr=bootstr@entry=0x0) at
> /usr/src/sys/arch/amd64/amd64/machdep.c:672
> 672                     dumpsys();
> (gdb) bt
> #0  0xffffffff80119935 in cpu_reboot (howto=howto@entry=260,
> bootstr=bootstr@entry=0x0) at
> /usr/src/sys/arch/amd64/amd64/machdep.c:672
> #1  0xffffffff80874aac in vpanic (fmt=0xffffffff80f85c20 "kernel
> %sassertion \"%s\" failed: file \"%s\", line %d double free of buffer?
> bp=%p, b_freelistindex=%d\n", ap=ap@entry=0xfffffe8041106b98)
>     at /usr/src/sys/kern/subr_prf.c:342
> #2  0xffffffff80bb59f5 in kern_assert
> (fmt=fmt@entry=0xffffffff80f85c20 "kernel %sassertion \"%s\" failed:
> file \"%s\", line %d double free of buffer? bp=%p,
> b_freelistindex=%d\n")
>     at /usr/src/sys/lib/libkern/kern_assert.c:51
> #3  0xffffffff808b2dcd in binstailfree (dp=0xffffffff8130c9c0
> <bufqueues>, bp=0xfffffe811d4245a0) at /usr/src/sys/kern/vfs_bio.c:333
> #4  brelsel (bp=0xfffffe811d4245a0, set=<optimized out>) at
> /usr/src/sys/kern/vfs_bio.c:1092
> #5  0xffffffff808d0786 in wapbl_discard (wl=0xfffffe81081e2e08) at
> /usr/src/sys/kern/vfs_wapbl.c:661
> #6  0xffffffff808ca91d in vclean (vp=vp@entry=0xfffffe8108412008) at
> /usr/src/sys/kern/vfs_vnode.c:1032
> #7  0xffffffff808cc57d in vgone (vp=vp@entry=0xfffffe8108412008) at
> /usr/src/sys/kern/vfs_vnode.c:1152
> #8  0xffffffff808be525 in vflush (mp=mp@entry=0xfffffe81081c2008,
> skipvp=skipvp@entry=0x0, flags=flags@entry=2) at
> /usr/src/sys/kern/vfs_mount.c:531
> #9  0xffffffff80735844 in tmpfs_unmount (mp=0xfffffe81081c2008,
> mntflags=524288) at /usr/src/sys/fs/tmpfs/tmpfs_vfsops.c:243
> #10 0xffffffff808c1d95 in VFS_UNMOUNT (mp=mp@entry=0xfffffe81081c2008,
> a=a@entry=524288) at /usr/src/sys/kern/vfs_subr.c:1296
> #11 0xffffffff808be69d in dounmount (mp=mp@entry=0xfffffe81081c2008,
> flags=524288, l=l@entry=0xfffffe811ae34880) at
> /usr/src/sys/kern/vfs_mount.c:856
> #12 0xffffffff808c5155 in sys_unmount (l=0xfffffe811ae34880,
> uap=0xfffffe8041106f00, retval=<optimized out>) at
> /usr/src/sys/kern/vfs_syscalls.c:617
> #13 0xffffffff8013e6ac in sy_call (rval=0xfffffe8041106eb0,
> uap=0xfffffe8041106f00, l=0xfffffe811ae34880, sy=0xffffffff811ca9d0
> <sysent+528>) at /usr/src/sys/sys/syscallvar.h:65
> #14 sy_invoke (code=22, rval=0xfffffe8041106eb0,
> uap=0xfffffe8041106f00, l=0xfffffe811ae34880, sy=0xffffffff811ca9d0
> <sysent+528>) at /usr/src/sys/sys/syscallvar.h:94
> #15 syscall (frame=0xfffffe8041106f00) at
> /usr/src/sys/arch/x86/x86/syscall.c:156
> #16 0xffffffff80100761 in Xsyscall ()
>
>
> On 7/21/16, Robert Swindells <rjs%fdy2.co.uk@localhost> wrote:
>>
>> bch <brad.harder%gmail.com@localhost> wrote:
>>>I have kernel cores, but I'm not as familiar w/ crash(8) as gdb.
>>
>> You can use gdb instead of crash if you want:
>>
>> <http://www.netbsd.org/docs/kernel/#debugging_a_kernel_crash_dump>
>>
>


Home | Main Index | Thread Index | Old Index