Date: Wed, 28 Sep 2011 22:00:12 GMT From: Yuri Karaban <dev@dev97.com> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/161112: filesystem LOR in FreeBSD 9.0-BETA3 Message-ID: <201109282200.p8SM0CFA018023@red.freebsd.org> Resent-Message-ID: <201109282200.p8SM0LIH009439@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 161112 >Category: kern >Synopsis: filesystem LOR in FreeBSD 9.0-BETA3 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Sep 28 22:00:20 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Yuri Karaban >Release: 9.0-BETA3 >Organization: >Environment: FreeBSD 9.0-BETA3 FreeBSD 9.0-BETA3 #0: Sat Sep 24 20:46:57 UTC 2011 root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: I tried to install FreeBSD 9.0-BETA3 from original install DVD in VirtualBox VM. During installation steps I encountered LOR three times (I didn't use bsdinstall, I installed it manually with custom configuration). So here is the cases caused lock order reversals: (1) When writing to UFS filesystem # newfs /dev/SOME_DEVICE # mount /dev/SOME_DEVICE /mnt/boot # tar -C /mnt -xJf /usr/freebsd-dist/kernel.txz lock order reversal: 1st 0xd8ebacb4 bufwait (bufwait) @ /usr/src/sys/kern/vfs_bio.c:2658 2nd 0xc471fc00 dirhash (dirhash) @ /usr/src/sys/ufs/ufs/ufs_dirhash.c:284 KDB: stack backtrace: db_trace_self_wrapper(c0eff6ac,7366752f,7366752f,7269645f,68736168,...) at db_trace_self_wrapper+0x26 kdb_backtrace(c0a42bdb,c0f0300f,c4557370,c455b4d8,e73687e8,...) at kdb_backtrace+0x2a _witness_debugger(c0f0300f,c471fc00,c0f31d92,c455b4d8,c0f31a17,...) at _witness_debugger+0x25 witness_checkorder(c471fc00,9,c0f31a17,11c,0,...) at witness_checkorder+0x839 _sx_xlock(c471fc00,0,c0f31a17,11c,c4a04ae0,...) at _sx_xlock+0x85 ufsdirhash_acquire(d8ebac54,c4a04ae0,e7368918,dd8b8814,e73688b8,...) at ufsdirhash_acquire+0x35 ufsdirhash_add(c4a04ae0,e7368918,814,e73688a4,e73688a8,...) at ufsdirhash_add+0x13 ufs_direnter(c6150000,c6355660,e7368918,e7368bc0,0,...) at ufs_direnter+0x739 ufs_makeinode(e7368bc0,0,e7368b04,e7368a60,c0d5fc85,...) at ufs_makeinode+0x59d ufs_create(e7368b04,e7368b1c,0,0,e7368b80,...) at ufs_create+0x30 VOP_CREATE_APV(c10493e0,e7368b04,e7368bc0,e7368a9c,0,...) at VOP_CREATE_APV+0xa5 vn_open_cred(e7368b80,e7368c48,16d,0,c4a85d00,...) at vn_open_cred+0x215 vn_open(e7368b80,e7368c48,16d,c497c7a8,c19c0830,...) at vn_open+0x3b kern_openat(c4b42000,ffffff9c,284163c0,0,a02,...) at kern_openat+0x1ec kern_open(c4b42000,284163c0,0,a01,16d,...) at kern_open+0x35 sys_open(c4b42000,e7368cec,c0f493b6,c0f03bb6,206,...) at sys_open+0x30 syscall(e7368d28) at syscall+0x284 Xint0x80_syscall() at Xint0x80_syscall+0x21 --- syscall (5, FreeBSD ELF32, sys_open), eip = 0x2837f343, esp = 0xbfbfe8ec, ebp = 0xbfbfe918 --- (2) When unmounting this filesystem # umount /mnt/boot lock order reversal: 1st 0xc4d1cd18 zfs (zfs) @ /usr/src/sys/kern/vfs_mount.c:1194 2nd 0xc4d1ce28 devfs (devfs) @ /usr/src/sys/ufs/ffs/ffs_vfsops.c:1371 KDB: stack backtrace: db_trace_self_wrapper(c0eff6ac,7366662f,7366765f,2e73706f,33313a63,...) at db_trace_self_wrapper+0x26 kdb_backtrace(c0a42bdb,c0f0300f,c455b470,c455ad20,e7396a38,...) at kdb_backtrace+0x2a _witness_debugger(c0f0300f,c4d1ce28,c0eea2ab,c455ad20,c0f30e50,...) at _witness_debugger+0x25 witness_checkorder(c4d1ce28,9,c0f30e50,55b,c4d1ce48,...) at witness_checkorder+0x839 __lockmgr_args(c4d1ce28,80400,c4d1ce48,0,0,...) at __lockmgr_args+0x824 vop_stdlock(e7396b58,c0f30e50,e7396b5c,80400,c4d1cdd0,...) at vop_stdlock+0x62 VOP_LOCK1_APV(c101f020,e7396b58,c6ba3dd0,c1059a80,c4d1cdd0,...) at VOP_LOCK1_APV+0xb5 _vn_lock(c4d1cdd0,80400,c0f30e50,55b,c4b44100,...) at _vn_lock+0x5e ffs_flushfiles(c516a510,0,c4c2d8a0,0,e7396bd0,...) at ffs_flushfiles+0xa7 ffs_unmount(c516a510,8000000,c0f0a43b,4ef,c4429000,...) at ffs_unmount+0x180 dounmount(c516a510,8000000,c4c2d8a0,474,13f06ba2,...) at dounmount+0x4a1 sys_unmount(c4c2d8a0,e7396cec,c,c,206,...) at sys_unmount+0x331 syscall(e7396d28) at syscall+0x284 Xint0x80_syscall() at Xint0x80_syscall+0x21 --- syscall (22, FreeBSD ELF32, sys_unmount), eip = 0x280de9ab, esp = 0xbfbfe4fc, ebp = 0xbfbfe5c8 --- (3) On shutdown (the same as in 2, but with isofs rather than with zfs) # halt Syncing disks, vnodes remaining...0 0 done All buffers synced. lock order reversal: 1st 0xc4a83af8 isofs (isofs) @ /usr/src/sys/kern/vfs_mount.c:1194 2nd 0xc4a835a8 devfs (devfs) @ /usr/src/sys/ufs/ffs/ffs_vfsops.c:1371 KDB: stack backtrace: db_trace_self_wrapper(c0eff6ac,7366662f,7366765f,2e73706f,33313a63,...) at db_trace_self_wrapper+0x26 kdb_backtrace(c0a42bdb,c0f0300f,c455ad88,c455ad20,e73659d0,...) at kdb_backtrace+0x2a _witness_debugger(c0f0300f,c4a835a8,c0eea2ab,c455ad20,c0f30e50,...) at _witness_debugger+0x25 witness_checkorder(c4a835a8,9,c0f30e50,55b,c4a835c8,...) at witness_checkorder+0x839 __lockmgr_args(c4a835a8,80400,c4a835c8,0,0,...) at __lockmgr_args+0x824 vop_stdlock(e7365af0,c0f30e50,e7365af4,80400,c4a83550,...) at vop_stdlock+0x62 VOP_LOCK1_VPU(c101f020,e7365af0,c4c30110,c1059a80,c4a83550,...) at VOP_LOCK1_APV+0xb5 vn_lock(c4a83550,80400,c0f30e50,55b,c492bd00,...) at _vn_lock+0x5e ffs_flushfiles(c496e798,2,c4b432e0,0,c1059aa0,...) at ffs_flushfiles+0xa7 ffs_unmount(c496e798,80000,e7365bc8,4ef,e7365bf8,...) at ffs_unmount+0x180 dounmount(c496e798,80000,c4b432e0,d8d3ec2c,0,...) at dounmount+0x4a1 vfs_unmountall(c0efb5ad,0,c0efb4fb,139,c09e17da,...) at vfs_unmountall+0x4e kern_reboot(8,0,c0efb4fb,ba,2,...) at kern_reboot+0x4d2 sys_reboot(c4b432e0,e7365cec,c0f493b6,e7365d80,246,...) at sys_reboot+0x6c syscall(e7365d28) at syscall+0x284 Xint0x80_syscall() at Xint0x80_syscall+0x21 --- syscall (55, FreeBSD ELF32, sys_reboot), eip = 0x280b9fab, esp = 0xbfbfeb6c, ebp = 0xbfbfecb8 --- Uptime: 2m0s The operating system has halted. Please press any key to reboot. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109282200.p8SM0CFA018023>
