more on vfs/ufs locks with BBB
George Rosamond
george at ceetonetechnology.com
Wed Feb 18 20:47:55 UTC 2015
This is a regular issue on BeagleBones in particular for me. This is on
-current with revision 278962. Have used multiple microSD cards.
Using the most recent crochet, and the default BEAGLEBONE kernel with
WITNESS enabled, etc.
I created a static image size this time for a 16G microSD card, and
disabled Autosize/growfs.
option ImageSize 15600mb
I'm also fighting with regular dropped connections when attempting to
update the ports tree with svnlite on BeagleBones and Raspberry Pis,
that bombs out with "svn: E120106: ra_serf: The server sent a truncated
HTTP response body." But it seems unrelated at this point.
On first login, the first command I ran was passwd(1), and boom.
Relevant line in sys/kern/vfs_bio.c is:
BO_LOCKPTR(bo), "getblk", slpflag, slptimeo);
And line in sys/ufs/ufs/ufs_dirhash.c
sx_xlock(&dh->dh_lock);
root at bbb-fbsd:~ # passwd
Changing local password for root
New Password:
Retype New Password:
lock order reversal:
1st 0xcd115ad0 bufwait (bufwait) @ /data/fbsd-head/sys/kern/vfs_bio.c:3097
2nd 0xc2f39c00 dirhash (dirhash) @
/data/fbsd-head/sys/ufs/ufs/ufs_dirhash.c:285
KDB: stack backtrace:
db_trace_self() at db_trace_self
pc = 0xc05ad730 lr = 0xc0233288 (db_trace_self_wrapper+0x2c)
sp = 0xde6eb800 fp = 0xc07505b0
db_trace_self_wrapper() at db_trace_self_wrapper+0x2c
pc = 0xc0233288 lr = 0xc03a5b44 (kdb_backtrace+0x34)
sp = 0xde6eb918 fp = 0xc07505b0
r4 = 0xc0720214
kdb_backtrace() at kdb_backtrace+0x34
pc = 0xc03a5b44 lr = 0xc03bf36c (_witness_debugger+0x2c)
sp = 0xde6eb920 fp = 0xc07505b0
r4 = 0x00000001
_witness_debugger() at _witness_debugger+0x2c
pc = 0xc03bf36c lr = 0xc03c0d98 (witness_checkorder+0x904)
sp = 0xde6eb930 fp = 0xc07505b0
r4 = 0xc06402c0 r5 = 0xcd115ad0
witness_checkorder() at witness_checkorder+0x904
pc = 0xc03c0d98 lr = 0xc0375da8 (_sx_xlock+0xa0)
sp = 0xde6eb978 fp = 0x000081a4
r4 = 0xc2f39c00 r5 = 0xc2f39c00
r6 = 0xc063ff1c r7 = 0x0000011d
r8 = 0x00000000 r9 = 0x000001ec
r10 = 0xc2d6ed80
_sx_xlock() at _sx_xlock+0xa0
pc = 0xc0375da8 lr = 0xc056b19c (ufsdirhash_acquire+0x28)
sp = 0xde6eb998 fp = 0x000081a4
r4 = 0xc2f39c00 r5 = 0x00000814
r6 = 0xc2d6ed80 r7 = 0xc2d6ed80
r8 = 0x00000014
ufsdirhash_acquire() at ufsdirhash_acquire+0x28
pc = 0xc056b19c lr = 0xc056b6fc (ufsdirhash_add+0x18)
sp = 0xde6eb9a8 fp = 0x000081a4
r4 = 0xcd33c800 r5 = 0x00000814
r6 = 0xde6eba68
ufsdirhash_add() at ufsdirhash_add+0x18
pc = 0xc056b6fc lr = 0xc056eebc (ufs_direnter+0x7e8)
sp = 0xde6eb9c0 fp = 0x000081a4
r4 = 0xcd33c800 r5 = 0x00000200
r6 = 0xcd33c814 r7 = 0x00000001
ufs_direnter() at ufs_direnter+0x7e8
pc = 0xcd056eebc lr = 0xc0576448 (ufs_makeinode+0x50c)
sp = 0xde6eba30 fp = 0x000081a4
r4 = 0xde6eba68 r5 = 0xc30cc400
r6 = 0x00000000 r7 = 0x00000001
r8 = 0xc2c68900 r9 = 0xde6ebd48
r10 = 0xde6ebd60
ufs_makeinode() aft ufs_makeinode+0x50c
pc = 0xc0576448 lr = 0xc05767a0 (ufs_create+0x2c)
sp = 0xde6ebb98 fp = 0x00000000
r4 = 0xde6ebbdc r5 = 0x00000000
r6 = 0x00000000 r7 = 0x00000000
r8 = 0xde6ebbdc r9 = 0xc2fd7990
r10 = 0xde6ebdc0
ufs_create() at ufs_create+0x2c
pc = 0xc05767a0 lr = 0xc05dda94 (VOP_CREATE_APV+0xfc)
sp = 0xde6ebbb0 fp = 0x00000000
r4 = 0xc06f1e9c r5 = 0x00000000
VOP_CREATE_APV() at VOP_CREATE_APV+0xfc
pc = 0xc05dda94 lr = 0xc041d0b4 (vn_open_cred+0x178)
sp = 0xde6ebbd0 fp = 0x00000000
r4 = 0xde6ebcf8 r5 = 0xde6ebc84
r6 = 0x00000a02 r7 = 0x00000000
r8 = 0x000001a4
vn_open_cred() at vn_open_cred+0x178
pc = 0xc041d0b4 lr = 0xc041d244 (vn_open+0x20)
sp = 0xde6ebca8 fp = 0x00000000
r4 = 0x000001a4 r5 = 0xde6ebdc0
r6 = 0xde6ebcf8 r7 = 0x00000000
r8 = 0xc2fd7990 r9 = 0xffffff9c
r10 = 0xbfffec98
vn_open() at vn_
open+0x20
pc = 0xc041d244 lr = 0xc0417b84 (kern_openat+0x264)
sp = 0xde6ebcb8 fp = 0x00000000
kern_openat() at kern_openat+0x264
pc = 0xc0417b84 lr = 0xc0417e88 (sys_openat+0x28)
sp = 0xde6ebdc0 fp = 0x00000000
r4 = 0xbfffec98 r5 = 0xde6ebe50
r6 = 0xc2fd7990 r7 = 0xc2d46a68
r8 = 0x00000000 r9 = 0x60000013
r10 = 0x00000000
sys_openat() at sys_openat+0x28
pc = 0xc0417e88 lr = 0xc05c0c98 (swi_handler+0x2fc)
sp = 0xde6ebdd0 fp = 0x00000000
swi_handler() at swi_handler+0x2fc
pc = 0xc05c0c98 lr = 0xc05aece4 (swi_exit)
sp = 0xde6ebe50 fp = 0x00000000
r4 = 0xbfffec98 r5 = 0xbfffec98
r6 = 0x2081b088 r7 = 0x000001f3
r8 = 0x00000040 r9 = 0x0000b904
r10 = 0x0000b90c
swi_exit() at swi_exit
pc = 0xc05aece4 lr = 0xc05aece4 (swi_exit)
sp = 0xde6ebe50 fp = 0x00000000
I don't think it matters, but my build /etc/src.conf file contains:
WITHOUT_AUTHPF=yes
WITHOUT_BIND=yes
WITHOUT_BLUETOOTH=yes
WITHOUT_EXAMPLES=yes
WITHOUT_FLOPPY=yes
WITHOUT_GAMES=yes
WITHOUT_HTML=yes
WITHOUT_IPFILTER=yes
WITHOUT_IPFW=yes
WITHOUT_IPX=yes
WITHOUT_LPR=yes
WITHOUT_MAN=yes
WITHOUT_NCP=yes
WITHOUT_NDIS=yes
WITHOUT_NIS=yes
WITHOUT_PPP=yes
#WITHOUT_SENDMAIL=yes
WITHOUT_SHAREDOCS=yes
WITHOUT_WIRELESS=yes
WITHOUT_WPA_SUPPLICANT_EAPOL=yes
WITHOUT_ZFS=yes
WITHOUT_INET6=yes
g
More information about the freebsd-arm
mailing list