Umount ejected USB Flash drive (kernel panic)

IIRC, this defect has been existing for years. But I heard there is a new USB stack in the latest snapshot?

This reminds me of my server uptime record. I was plugging the USB DVD burner, then unplugged when it finished burning, but forgot to run umount command, then the entire system was frozen. Had no choice but hard reset. God damn, really take time to reach 4 month uptime :(
 
Earlier this helped patch. But now (FreeBSD 7) it does not work = (

% cat /truebsd/diffs/usr/src/sys/geom/geom_vfs.c.diff
Code:
--- geom_vfs.c.orig     2007-12-29 11:48:20.000000000 +0000
+++ geom_vfs.c  2007-12-29 11:48:39.000000000 +0000
@@ -71,16 +71,9 @@
        struct buf *bp;
        int vfslocked;

-       if (bip->bio_error) {
-               printf("g_vfs_done():");
-               g_print_bio(bip);
-               printf("error = %d\n", bip->bio_error);
-       }
        bp = bip->bio_caller2;
        bp->b_error = bip->bio_error;
        bp->b_ioflags = bip->bio_flags;
-       if (bip->bio_error)
-               bp->b_ioflags |= BIO_ERROR;
        bp->b_resid = bp->b_bcount - bip->bio_completed;
        g_destroy_bio(bip);
        vfslocked = VFS_LOCK_GIANT(((struct mount *)NULL));
 
Unfortunately as far as I know, this will not hit any of the 7.x releases. It probably won't even be enabled by default in 8.x.
 
danger@ said:

There seem to be several problems, and while one or two have been fixed recently, there are still others lurking to bring the system down. One fix was made earlier this year, and with the new USB stack (aka 'usb2') another class of problems should be fixed. However I think there are still issues in the buffer cache or cam layers - hopefully they'll be fixed early next year.
 
Just FYI - I plan to commit remaining patches into CURRENT today or tomorrow. After that, the panics should be gone, at least with msdosfs and ufs filesystems, _without softupdates enabled_.
 
Changes were MFCd already. Things should work; if you're still seeing panics, please send details (most important part is a backtrace and a description of how to provoke the panic) to trasz@FreeBSD.org. I'd like to fix any problems - if there are any - before 7.2.

Note that I'll be afk until friday.
 
Back
Top