Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jan 2007 07:28:12 +0200
From:      Erik Udo <erik.udo@gmail.com>
To:        freebsd-hackers@freebsd.org
Subject:   unionfs 'locking against myself'
Message-ID:  <45AF056C.2060405@gmail.com>

next in thread | raw e-mail | index | archive | help
Hi,

I just updated my livecd to 6.2-RELEASE. The kernel source is clean, i 
haven't patched it in any way.

The thing is i'm getting kernel panics when mounting unionfs over a 
read-only media and running a system chrooted to this unionfsed directory.

The kernel panics at the same point everytime, and i can reproduce this 
easily, but debugging is an another thing.

To help the developers i was thinking of running a trace and see where 
it happens and why. I believe this panic is pretty common?

I'm running this kernel inside qemu and i'm using -s so i can connect to 
  it with gdb, but everytime i run a trace it seems to be corrupt. I'm 
loading the kernel.debug image inside gdb and the connecting to port 
1234 where qemu is listening. And i'm sure the kernel.debug image and 
the kernel are in sync.

The unionfs patches to 6.1-R was working perfectly for me, but for some 
reason the space taken by generating files on the memory disk that was 
the lower layer of an unionfs mount was not freed up after deleting the 
same file. I tested this on 6.2-R (to which the patches wont apply 
becouse of code changes) and the space was freed up after deleting the 
file. I sent some mail to the patches maintainer if he could reproduce it.

Anykind of help on how to get this working is appreciated. I'll be glad 
to provide any extra info if you just ask.

Cheers, Erik


#0  sccnupdate (scp=0xc09cc140) at /usr/src/sys/dev/syscons/syscons.c:1663
#1  0xc083abfe in scgetc (sc=0xc09d0f80, flags=3)
     at /usr/src/sys/dev/syscons/syscons.c:3169
#2  0xc08387f6 in sccngetch (flags=2)
     at /usr/src/sys/dev/syscons/syscons.c:1627
#3  0xc0838686 in sccncheckc (cd=0xc097aa60)
     at /usr/src/sys/dev/syscons/syscons.c:1550
#4  0xc06aae4a in cncheckc () at /usr/src/sys/kern/tty_cons.c:600
#5  0xc06aae05 in cngetc () at /usr/src/sys/kern/tty_cons.c:581
#6  0xc046bab6 in db_readline (lstart=0xc0983780 "bt\n", lsize=120)
     at /usr/src/sys/ddb/db_input.c:324
#7  0xc046bbb7 in db_read_line () at /usr/src/sys/ddb/db_lex.c:55
#8  0xc046a6db in db_command_loop () at /usr/src/sys/ddb/db_command.c:456
#9  0xc046c309 in db_trap (type=3, code=0) at /usr/src/sys/ddb/db_main.c:222
#10 0xc0690257 in kdb_trap (type=3, code=0, tf=0xc881197c)
     at /usr/src/sys/kern/subr_kdb.c:473
#11 0xc08563fc in trap (frame=
       {tf_fs = 8, tf_es = 40, tf_ds = 40, tf_edi = 1, tf_esi = 
-1064560194, tf_e
bp = -931063364, tf_isp = -931063384, tf_ebx = -931063320, tf_edx = 0, 
tf_ecx =
-1056878592, tf_eax = 18, tf_trapno = 3, tf_err = 0, tf_eip = 
-1066860581, tf_cs
  = 32, tf_eflags = 524930, tf_esp = -931063332, tf_ss = -1066962013})
     at /usr/src/sys/i386/i386/trap.c:594
#12 0xc084403a in calltrap () at /usr/src/sys/i386/i386/exception.s:139
---Type <return> to continue, or q <return> to quit---
#13 0x00000008 in ?? ()
#14 0x00000028 in ?? ()
#15 0x00000028 in ?? ()
#16 0x00000001 in ?? ()
#17 0xc08c19be in ?? ()
#18 0xc88119bc in ?? ()
#19 0xc88119a8 in ?? ()
#20 0xc88119e8 in ?? ()
#21 0x00000000 in ?? ()
#22 0xc1015000 in ?? ()
#23 0x00000012 in ?? ()
#24 0x00000003 in ?? ()
#25 0x00000000 in ?? ()
#26 0xc068ffdb in kdb_enter (msg=0xc09d0f80 "") at cpufunc.h:60
#27 0xc06773a3 in panic (fmt=0xc08c19be "lockmgr: locking against myself")
     at /usr/src/sys/kern/kern_shutdown.c:549
#28 0xc066af0a in lockmgr (lkp=0xc1b649e8, flags=8194, interlkp=0x80,
     td=0xc1ba0300) at /usr/src/sys/kern/kern_lock.c:326
#29 0xc06c5e8a in vop_stdlock (ap=0x0) at 
/usr/src/sys/kern/vfs_default.c:257
#30 0xc086843b in VOP_LOCK_APV (vop=0xc09406a0, a=0xc8811a4c)
     at vnode_if.c:1642
#31 0xc06dcce4 in vn_lock (vp=0xc1b64990, flags=2, td=0xc1ba0300)
     at vnode_if.h:844
#32 0xc1b2f277 in ?? ()
#33 0xc1b64990 in ?? ()
#34 0x00000002 in ?? ()
#35 0xc1ba0300 in ?? ()
#36 0x00000000 in ?? ()
#37 0x00000016 in ?? ()
#38 0xc1ba0300 in ?? ()
#39 0xc8811afc in ?? ()
#40 0xc1a56c00 in ?? ()
#41 0xc8811aa8 in ?? ()
#42 0xc06c5eae in vop_stdunlock (ap=0x0) at 
/usr/src/sys/kern/vfs_default.c:271
#43 0xc1b31b8b in ?? ()
#44 0xc8811c94 in ?? ()
#45 0xc1a46530 in ?? ()
#46 0xc1a59cc0 in ?? ()
#47 0xc1a49110 in ?? ()
#48 0xc8811ca8 in ?? ()
#49 0xc1b64aa0 in ?? ()
#50 0xc1b64bb0 in ?? ()
#51 0x00000001 in ?? ()
#52 0xc8811adc in ?? ()
#53 0x00000000 in ?? ()
#54 0x00000000 in ?? ()
#55 0xc19aa320 in ?? ()
#56 0xc1ba0300 in ?? ()
#57 0xc1a59cc0 in ?? ()
#58 0x00000000 in ?? ()
#59 0x00000000 in ?? ()
#60 0x00000000 in ?? ()
#61 0xc1b64bb0 in ?? ()
#62 0xc1a49110 in ?? ()
#63 0xc1b64aa0 in ?? ()
#64 0xc0981ac0 in vop_unlock_vp_offsets ()
#65 0xc1a49110 in ?? ()
#66 0x00000000 in ?? ()
#67 0xc1ba0300 in ?? ()
#68 0x00000080 in ?? ()
#69 0xc1ba0300 in ?? ()
#70 0xc8811b3c in ?? ()
#71 0xc066af81 in lockmgr (lkp=0xc8811bf8, flags=3249941248, interlkp=0x0,
     td=0xc1b64bb0) at /usr/src/sys/kern/kern_lock.c:351
#72 0xc086785f in VOP_LOOKUP_APV (vop=0xc1b34280, a=0xc8811bf8)
     at vnode_if.c:99
#73 0xc06c82ad in lookup (ndp=0xc8811c80) at vnode_if.h:56
#74 0xc06c7b4e in namei (ndp=0xc8811c80) at 
/usr/src/sys/kern/vfs_lookup.c:211
#75 0xc06d6569 in eaccess (td=0xc1ba0300, uap=0xc8811d04)
     at /usr/src/sys/kern/vfs_syscalls.c:1957
#76 0xc0856c73 in syscall (frame=
       {tf_fs = 59, tf_es = 59, tf_ds = 59, tf_edi = 134611326, tf_esi = 
134729064, tf_ebp = -1077943192, tf_isp = -931062428, tf_ebx = 3, tf_edx 
= 134729104, tf_ecx = 0, tf_eax = 376, tf_trapno = 0, tf_err = 2, tf_eip 
= 672303875, tf_cs = 51, tf_eflags = 524946, tf_esp = -1077943316, tf_ss 
= 59})
     at /usr/src/sys/i386/i386/trap.c:983
#77 0xc084408f in Xint0x80_syscall () at 
/usr/src/sys/i386/i386/exception.s:200
#78 0x0000003b in ?? ()
#79 0x0000003b in ?? ()
#80 0x0000003b in ?? ()
#81 0x0806017e in ?? ()
#82 0x0807cd68 in ?? ()
#83 0xbfbfe468 in ?? ()
#84 0xc8811d64 in ?? ()
#85 0x00000003 in ?? ()
#86 0x0807cd90 in ?? ()
#87 0x00000000 in ?? ()
#88 0x00000178 in ?? ()
#89 0x00000000 in ?? ()
#90 0x00000002 in ?? ()
#91 0x28128b03 in ?? ()
#92 0x00000033 in ?? ()
#93 0x00080292 in ?? ()
#94 0xbfbfe3ec in ?? ()
#95 0x0000003b in ?? ()
#96 0x00000000 in ?? ()
#97 0x00000a3a in ?? ()
#98 0x0000025a in ?? ()
#99 0x00000933 in ?? ()
#100 0x07ca9000 in ?? ()
#101 0xc1b9e648 in ?? ()
#102 0xc1ba0300 in ?? ()
#103 0xc8811884 in ?? ()
#104 0xc881186c in ?? ()
#105 0xc18d6780 in ?? ()
#106 0xc068899b in sched_switch (td=0x807cd68, newtd=0x3, flags=-1077943016)
     at /usr/src/sys/kern/sched_4bsd.c:973
Previous frame inner to this frame (corrupt stack?)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45AF056C.2060405>