Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Apr 1997 21:06:04 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bugs@freebsd.org, hackers@freebsd.org, mtaylor@cybernet.com
Cc:        dyson@freebsd.org
Subject:   Re: vnode as filesystem (crash!)
Message-ID:  <199704141106.VAA07139@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>I'm trying to use a vnode as a file system.
>
>I have no problem "vnconfig"ing and "newfs"ing it (a 10 MB test
>case, derived from "dd" and /dev/zero).
>
>The problem comes when I start creating files on the mounted
>vnode.  I can get a few hundred files created (this is a random
>number: sometimes a few hundred, but never more than two thousand),
>and then it hangs the system (actually, sometimes it causes a reboot).
>No panics, no kernel messages, just a hang/reboot.  I haven't tried the
>kernel debugger yet (I don't know how to use it [yet].).  :)

/dev/vn has been broken for some time (perhaps always).  In -current,
writing a lot of files to it consistently causes a double fault panic
because of deep recursion.  Writes via vnstrategy() sometimes call bread()
to read an indirect block or something like that, and bread() sometimes
calls vnstrategy() to finish off some delayed writes.  These writes
apparentl often call bread() ...  Perhaps the recursion is actually
limited by the number of delayed writes, but some of the routines are
stack hogs so the stack is exhausted after only about 10 levels of
recursion.

Bruce

db> t 0xf328600c
_vfs_bio_awrite(f256d6a4,f256d6a4,2000,0,8) at _vfs_bio_awrite+0xde
_vfs_bio_awrite(f256d6a4,0,2000,7d,f01373b2) at _vfs_bio_awrite+0xde
_getnewbuf(0,0,2000,2000,f3286128) at _getnewbuf+0x16c
_getblk(f05aa500,7d,2000,0,0) at _getblk+0x1e5
_bread(f05aa500,7d,2000,0,f3286128) at _bread+0x21
_ffs_balloc(f05ad400,7d,2000,f0618680,f328622c) at _ffs_balloc+0x7c5
_ffs_write(f3286298,f05c3000,f256bf70,f059c800,7dc) at _ffs_write+0x2fa
_vnstrategy(f256bf70,f3286318,f01bfe4a,f3286330,f256bf70) at _vnstrategy+0x22c
_spec_strategy(f3286330,f256bf70,200202b4,f256bf70,800) at _spec_strategy+0x1a
_ufs_strategy(f3286330) at _ufs_strategy+0xbe
_bwrite(f256bf70,f3286374,f0138163,f328636c,f256bf70) at _bwrite+0x9c
_vn_bwrite(f328636c,f256bf70,2000,0,8) at _vn_bwrite+0xe
_vfs_bio_awrite(f256bf70,0,2000,81,0) at _vfs_bio_awrite+0x10f
_getnewbuf(0,0,2000,2000,f3286460) at _getnewbuf+0x16c
_getblk(f05aa500,81,2000,0,0) at _getblk+0x1e5
_bread(f05aa500,81,2000,0,f3286460) at _bread+0x21
_ffs_balloc(f05ad400,81,800,f0618680,f3286564) at _ffs_balloc+0x7c5
_ffs_write(f32865d0,f05c3000,f256ecfc,f05c6800,810) at _ffs_write+0x2fa
_vnstrategy(f256ecfc,f3286650,f01bfe4a,f3286668,f256ecfc) at _vnstrategy+0x22c
_spec_strategy(f3286668,f256ecfc,200202b4,f256ecfc,800) at _spec_strategy+0x1a
_ufs_strategy(f3286668) at _ufs_strategy+0xbe
_bwrite(f256ecfc,f32866ac,f0138163,f32866a4,f256ecfc) at _bwrite+0x9c
_vn_bwrite(f32866a4,f256ecfc,2000,0,8) at _vn_bwrite+0xe
_vfs_bio_awrite(f256ecfc,0,2000,60,2000) at _vfs_bio_awrite+0x10f
_getnewbuf(0,0,2000,2000,f3286798) at _getnewbuf+0x16c
_getblk(f05aa500,60,2000,0,0) at _getblk+0x1e5
_bread(f05aa500,60,2000,0,f3286798) at _bread+0x21
_ffs_balloc(f05ad400,60,1000,f0618680,f328689c) at _ffs_balloc+0x7c5
_ffs_write(f3286908,f05c3000,f256c574,f05cf800,602) at _ffs_write+0x2fa
_vnstrategy(f256c574,f3286988,f01bfe4a,f32869a0,f256c574) at _vnstrategy+0x22c
_spec_strategy(f32869a0,f256c574,200202b4,f256c574,c00) at _spec_strategy+0x1a
_ufs_strategy(f32869a0) at _ufs_strategy+0xbe
_bwrite(f256c574,f32869e4,f0138163,f32869dc,f256c574) at _bwrite+0x9c
_vn_bwrite(f32869dc,f256c574,2000,0,8) at _vn_bwrite+0xe
_vfs_bio_awrite(f256c574,0,2000,62,0) at _vfs_bio_awrite+0x10f
_getnewbuf(0,0,2000,2000,f3286ad0) at _getnewbuf+0x16c
_getblk(f05aa500,62,2000,0,0) at _getblk+0x1e5
_bread(f05aa500,62,2000,0,f3286ad0) at _bread+0x21
_ffs_balloc(f05ad400,62,2000,f0618680,f3286bd4) at _ffs_balloc+0x7c5
_ffs_write(f3286c40,f05c3000,f256dca8,f05c0a00,62c) at _ffs_write+0x2fa
_vnstrategy(f256dca8,f3286cc0,f01bfe4a,f3286cd8,f256dca8) at _vnstrategy+0x22c
_spec_strategy(f3286cd8,f256dca8,200202b4,f256dca8,800) at _spec_strategy+0x1a
_ufs_strategy(f3286cd8) at _ufs_strategy+0xbe
_bwrite(f256dca8,f3286d1c,f0138163,f3286d14,f256dca8) at _bwrite+0x9c
_vn_bwrite(f3286d14,f256dca8,2000,0,8) at _vn_bwrite+0xe
_vfs_bio_awrite(f256dca8,0,2000,62,f01373b2) at _vfs_bio_awrite+0x10f
_getnewbuf(0,0,2000,2000,f3286e08) at _getnewbuf+0x16c
_getblk(f05aa500,62,2000,0,0) at _getblk+0x1e5
_bread(f05aa500,62,2000,0,f3286e08) at _bread+0x21
_ffs_balloc(f05ad400,62,1800,f0618680,f3286f0c) at _ffs_balloc+0x7c5
_ffs_write(f3286f78,f05c3000,f256d85c,f05bfa00,628) at _ffs_write+0x2fa
_vnstrategy(f256d85c,f3286ff8,f01bfe4a,f3287010,f256d85c) at _vnstrategy+0x22c
_spec_strategy(f3287010,f256d85c,200202b4,f256d85c,800) at _spec_strategy+0x1a
_ufs_strategy(f3287010) at _ufs_strategy+0xbe
_bwrite(f256d85c,f3287054,f0138163,f328704c,f256d85c) at _bwrite+0x9c
_vn_bwrite(f328704c,f256d85c,2000,0,8) at _vn_bwrite+0xe
_vfs_bio_awrite(f256d85c,0,2000,68,f01373b2) at _vfs_bio_awrite+0x10f
_getnewbuf(0,0,2000,2000,f3287140) at _getnewbuf+0x16c
_getblk(f05aa500,68,2000,0,0) at _getblk+0x1e5
_bread(f05aa500,68,2000,0,f3287140) at _bread+0x21
_ffs_balloc(f05ad400,68,2000,f0618680,f3287244) at _ffs_balloc+0x7c5
_ffs_write(f32872b0,f05c3000,f2566610,f05bd200,68c) at _ffs_write+0x2fa
_vnstrategy(f2566610,f3287330,f01bfe4a,f3287348,f2566610) at _vnstrategy+0x22c
_spec_strategy(f3287348,f2566610,200202b4,f2566610,800) at _spec_strategy+0x1a
_ufs_strategy(f3287348) at _ufs_strategy+0xbe
_bwrite(f2566610,f328738c,f0138163,f3287384,f2566610) at _bwrite+0x9c
_vn_bwrite(f3287384,f2566610,2000,0,8) at _vn_bwrite+0xe
_vfs_bio_awrite(f2566610,0,2000,60,f01373b2) at _vfs_bio_awrite+0x10f
_getnewbuf(0,0,2000,2000,f3287478) at _getnewbuf+0x16c
_getblk(f05aa500,60,2000,0,0) at _getblk+0x1e5
_bread(f05aa500,60,2000,0,f3287478) at _bread+0x21
_ffs_balloc(f05ad400,60,2000,f0618680,f328757c) at _ffs_balloc+0x7c5
_ffs_write(f32875e8,f05c3000,f256a760,f05bb600,60c) at _ffs_write+0x2fa
_vnstrategy(f256a760,f3287668,f01bfe4a,f3287680,f256a760) at _vnstrategy+0x22c
_spec_strategy(f3287680,f256a760,200202b4,f256a760,800) at _spec_strategy+0x1a
_ufs_strategy(f3287680) at _ufs_strategy+0xbe
_bwrite(f256a760,f32876c4,f0138163,f32876bc,f256a760) at _bwrite+0x9c
_vn_bwrite(f32876bc,f256a760,2000,0,8) at _vn_bwrite+0xe
_vfs_bio_awrite(f256a760,0,2000,60,0) at _vfs_bio_awrite+0x10f
_getnewbuf(0,0,2000,2000,f32877b0) at _getnewbuf+0x16c
_getblk(f05aa500,60,2000,0,0) at _getblk+0x1e5
_bread(f05aa500,60,2000,0,f32877b0) at _bread+0x21
_ffs_balloc(f05ad400,60,1800,f0618680,f32878b4) at _ffs_balloc+0x7c5
_ffs_write(f3287920,f05c3000,f256aad0,f05bbe00,608) at _ffs_write+0x2fa
_vnstrategy(f256aad0,f32879a0,f01bfe4a,f32879b8,f256aad0) at _vnstrategy+0x22c
_spec_strategy(f32879b8,f256aad0,200202b4,f256aad0,800) at _spec_strategy+0x1a
_ufs_strategy(f32879b8) at _ufs_strategy+0xbe
_bwrite(f256aad0,f32879fc,f0138163,f32879f4,f256aad0) at _bwrite+0x9c
_vn_bwrite(f32879f4,f256aad0,2000,0,8) at _vn_bwrite+0xe
_vfs_bio_awrite(f256aad0,0,2000,66,0) at _vfs_bio_awrite+0x10f
_getnewbuf(0,0,2000,2000,f3287ae8) at _getnewbuf+0x16c
_getblk(f05aa500,66,2000,0,0) at _getblk+0x1e5
_bread(f05aa500,66,2000,0,f3287ae8) at _bread+0x21
_ffs_balloc(f05ad400,66,2000,f0618680,f3287bec) at _ffs_balloc+0x7c5
_ffs_write(f3287c58,f05c3000,f2568be0,f05bd600,66e) at _ffs_write+0x2fa
_vnstrategy(f2568be0,f3287cd8,f01bfe4a,f3287cf0,f2568be0) at _vnstrategy+0x22c
_spec_strategy(f3287cf0,f2568be0,200202b4,f2568be0,400) at _spec_strategy+0x1a
_ufs_strategy(f3287cf0) at _ufs_strategy+0xbe
_bwrite(f2568be0,f3287d34,f0138163,f3287d2c,f2568be0) at _bwrite+0x9c
_vn_bwrite(f3287d2c,f2568be0,2000,0,8) at _vn_bwrite+0xe
_vfs_bio_awrite(f2568be0,0,600,0,0) at _vfs_bio_awrite+0x10f
_getnewbuf(0,0,600,2000,f05b0c00) at _getnewbuf+0x16c
_getblk(f05a8b00,0,600,0,0) at _getblk+0x1e5
_nfs_getcacheblk(f05a8b00,0,600,f0592c00,f3287ef0) at _nfs_getcacheblk+0x86
_nfs_bioread(f05a8b00,f3287f34,20000,f0616900,f3287f04) at _nfs_bioread+0x5db
_nfs_read(f3287ef0,f02149d8,200,f3287f94,f3287ef0) at _nfs_read+0x1e
_vn_read(f061a080,f3287f34,f0616900,f02149d8,f0592c00) at _vn_read+0x115
_read(f0592c00,f3287f94,f3287f84,11000,51c) at _read+0xa7
_syscall(27,efbf0027,11000,51c,efbfd978) at _syscall+0x16b
_Xsyscall() at _Xsyscall+0x35
--- syscall 0x3, eip = 0x807b0f1, esp = 0xefbfd968, ebp = 0xefbfd978 ---
db>



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