Re: 7.0-CURRENT panic on kldunload linux.ko

From: John Baldwin <jhb_at_freebsd.org>
Date: Wed, 14 Dec 2005 11:06:50 -0500
On Wednesday 14 December 2005 08:10 am, Goran Gajic wrote:
> FreeBSD fbsd.interex-pla.net 7.0-CURRENT FreeBSD 7.0-CURRENT #5: Wed Dec 14
> 13:30:55 CET 2005    
> root_at_fbsd.interex-pla.net:/usr/src/sys/i386/compile/TEST i386
>
> fbsd# kgdb  /usr/src/sys/i386/compile/TEST/kernel.debug
> /var/crash/vmcore.1
> [GDB will not be able to debug user-mode threads:
> /usr/lib/libthread_db.so: Undefined symbol "ps_pglobal_lookup"]
> GNU gdb 6.1.1 [FreeBSD]
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you
> are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for
> details.
> This GDB was configured as "i386-marcel-freebsd".
>
> Unread portion of the kernel message buffer:
> panic: witness_destroy: lock (sleep mutex) linux osname is not initialized
> KDB: enter: panic
> Uptime: 33s
> Dumping 511 MB (2 chunks)
>    chunk 0: 1MB (159 pages) ... ok
>    chunk 1: 511MB (130736 pages) 495 479 463 447 431 415 399 383 367 351
> 335 319 303 287 271 255 239 223 207 191 175 159 143 127 111 95 79 63 47 31
> 15
>
> #0  doadump () at pcpu.h:165
> 165     pcpu.h: No such file or directory.
>          in pcpu.h
> (kgdb) backtrace
> #0  doadump () at pcpu.h:165
> #1  0xc0666da0 in boot (howto=260) at ../../../kern/kern_shutdown.c:399
> #2  0xc0666ffb in panic (fmt=0xc08db756 "%s: lock (%s) %s is not
> initialized") at ../../../kern/kern_shutdown.c:555
> #3  0xc0687540 in witness_destroy (lock=0xc367ac7c) at
> ../../../kern/subr_witness.c:589
> #4  0xc0660092 in mtx_destroy (m=0xc367ac7c) at
> ../../../kern/kern_mutex.c:891
> #5  0xc065a355 in linker_file_sysuninit (lf=0xc3660400) at
> ../../../kern/kern_linker.c:238
> #6  0xc065a992 in linker_file_unload (file=0xc3660400, flags=0) at
> ../../../kern/kern_linker.c:539
> #7  0xc065b080 in kern_kldunload (td=0xc3660400, fileid=6, flags=0) at
> ../../../kern/kern_linker.c:828
> #8  0xc065b0de in kldunloadf (td=0xc352cd80, uap=0x0) at
> ../../../kern/kern_linker.c:858
> #9  0xc086db1e in syscall (frame=
>        {tf_fs = 59, tf_es = 59, tf_ds = 59, tf_edi = 6, tf_esi =
> -1077940702, tf_ebp = -1077941000, tf_isp = -646460060, tf_ebx = 1, tf_edx
> = 0, tf_ecx = 1, tf_e
> ax = 444, tf_trapno = 12, tf_err = 2, tf_eip = 671825691, tf_cs = 51,
> tf_eflags = 658, tf_esp = -1077942132, tf_ss = 59}) at
> ../../../i386/i386/trap.c:1008
> #10 0xc085cc4f in Xint0x80_syscall () at
> ../../../i386/i386/exception.s:190
> #11 0x00000033 in ?? ()
> Previous frame inner to this frame (corrupt stack?)
> (kgdb)

Very odd indeed.  Ah, try the patch at 
http://www.freebsd.org/~jhb/patches/linux_unload.patch
The linux_osname mutex was being destroyed twice.

> Running skype-1.2.0.18 for linux will immediately reboot machine without
> warring..

That I don't have any good ideas for.  Are you in X when it happens?  If so, 
can you hook up a serial console to see if it panics?

-- 
John Baldwin <jhb_at_FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
Received on Wed Dec 14 2005 - 15:07:46 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:49 UTC