On Fri, May 31, 2013 at 06:45:18AM +0200, Patrik Lundin wrote: > > I am currently testing this patch, I will report back once I have > some results. >
So have have tried to stress test the patch, and while it seems to superficially work it doesnt really seem stable. I have written a rather silly script cycling /usr/src between read/write and read-only while extracting and clearing the 5.3 src.tar.gz, and while a non-softdep fs has been able to complete all the runs, the softdep version seems to halt after a random amount of cycles. It always freezes at the same place, after clearing out /usr/src and attempting to mount the now empty partition read-only again. The machine is still responding but there exists a process looking like this: === root 8678 0.0 0.0 344 184 p0 D+ 8:23PM 0:00.05 /sbin/mount_ffs -o nodev -o nosuid -o softdep -o update -o ro /dev/wd0i /usr/src === Attempting to attach to it with gdb yields this: === # gdb /sbin/mount_ffs 8678 GNU gdb 6.3 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-unknown-openbsd5.3"...(no debugging symbols found) Attaching to program: /sbin/mount_ffs, process 8678 === ktrace doesnt have much to say either: === # kdump 8678 mount_ffs EMUL "native" === I'm not used to debugging kernel level freezes, so I am not sure what to do. Also i must add that the test is performed in a pretty strange setup where OpenBSD is running as a virtualbox guest on top of Win7 and the disk image is accessed via an OpenBSD-hosted samba share. But this is what i can test right now and at least the normal non-softdep operation seems to work as expected. This is the test script: === #!/bin/sh -- COUNTER=0 mount | grep /usr/src while [ COUNTER -lt 1000 ]; do echo "" echo "COUNTER: $COUNTER" echo "" echo "Mounting filesystem read/write" mount -uw /usr/src if [ $? -ne 0 ]; then echo "mount -uw failed (1)" exit 1 fi mount | grep /usr/src echo "" echo "Extracting src.tar.gz" tar -zxf /root/src.tar.gz -C /usr/src if [ $? -ne 0 ]; then echo "tar -zxf failed" exit 1 fi echo "" echo "Mounting filesysytem read-only" mount -ur /usr/src if [ $? -ne 0 ]; then echo "mount -ur failed (1)" exit 1 fi mount | grep /usr/src echo "" echo "Mounting filesystem read/write" mount -uw /usr/src if [ $? -ne 0 ]; then echo "mount -uw failed (2)" exit 1 fi mount | grep /usr/src echo "" echo "Clearing filesystem" rm -r /usr/src/* if [ $? -ne 0 ]; then echo "rm -r failed" exit 1 fi echo "" echo "Mounting filesystem read-only" mount -ur /usr/src if [ $? -ne 0 ]; then echo "mount -ur failed (2)" exit 1 fi mount | grep /usr/src let COUNTER=COUNTER+1 done === ... and when the script decides to stop, it is always at: === Mounting filesystem read/write /dev/wd0i on /usr/src type ffs (local, nodev, nosuid, softdep) Clearing filesystem Mounting filesystem read-only === Regards, Patrik Lundin