Date: Sun, 13 Apr 1997 14:38:47 -0400 (EDT) From: Mark Taylor <mtaylor@cybernet.com> To: hackers@freebsd.org, bugs@freebsd.org Subject: vnode as filesystem (crash!) Message-ID: <XFMail.970413160017.mtaylor@cybernet.com>
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].). :) OS is FreeBSD 2.2.1-RELEASE. I've tried it on five other machines, all with the same results. (All machines have at least 100 MBytes of swap space, if that matters. None of which is used during these tests, though). The results are universal, and exactly the same. I've come up with a "fix": 1) In the makefiles script, I cause a 'sync' every 100 files created, and all is fine- all of the 7500 files get created. 2) Instead of the /bin/sync in the script, I change kern.update from the default 30 to 5. All 7500 files get made, no problem. So there seems to be a problem with the vm/fs cache? I'd hate to live with a 5 second update time. The sequence of events is: dd if=/dev/zero of=/tmp/T0 bs=1024 count=10240 vnconfig -c -s labels /dev/vn0 /tmp/T0 disklabel -w -r vn0 tenmeg newfs -i 1024 /dev/vn0a # need lots of inodes for makefiles created files mount /dev/vn0a /mnt /root/bin/makefiles # script to create 100 files per directory of 1k each (system hangs/reboots in a few seconds, no messages) The disklabel tenmeg (from /etc/distab): tenmeg:ty=mfs:se#512:nt#1:rm#300:\ :ns#20480:nc#1:\ :pa#20480:oa#0:ba#4096:fa#512:ta=4.2BSD:\ :pc#20480:oc#0:bc#4096:fc#512: The "makefiles" script: (it's a hack- no comments please!) #!/bin/csh set i=0 set files=100 mkdir $files; cd $files while ( `/bin/test $files -gt 7500; echo -n $status` ) # echo -n "$files " if ( `/bin/test $i -ne 100; echo -n $status` ) then echo "$files" #/bin/sync cd .. mkdir $files cd $files set i=0 endif @ i++ dd if=/dev/zero of=$i bs=1024 count=1 >& /dev/null @ files++ end echo "" Please include my email address in responses, as I am not directly on the hackers list. -------------------------------------------------------------------- Mark J. Taylor Network R&D Manager Cybernet Systems mtaylor@cybernet.com 727 Airport Blvd. PHONE (313) 668-2567 Ann Arbor, MI 48108 FAX (313) 668-8780 --------------------------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.970413160017.mtaylor>