Umount ejected USB Flash drive (kernel panic)

Kernel development, writing drivers, coding, and questions regarding FreeBSD internals.

Umount ejected USB Flash drive (kernel panic)

Postby soko1 » 18 Nov 2008, 13:04

See: http://lists.freebsd.org/pipermail/freebsd-bugs/2007-January/021991.html

In the 8-CURRENT using the new code driver usb (where this problem does not exist), but as to overcome the problem in the 7.X-STABLE?
Powered by TrueBSD
User avatar
soko1
Junior Member
 
Posts: 14
Joined: 16 Nov 2008, 18:06
Location: Belarus/Minsk

Postby soko1 » 18 Nov 2008, 13:08

Plans have new drivers usb port for FreeBSD 7?
Powered by TrueBSD
User avatar
soko1
Junior Member
 
Posts: 14
Joined: 16 Nov 2008, 18:06
Location: Belarus/Minsk

Postby bsddaemon » 18 Nov 2008, 13:16

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 :(
...then the God created man...
User avatar
bsddaemon
Member
 
Posts: 102
Joined: 16 Nov 2008, 19:19
Location: Melbourne

Postby soko1 » 18 Nov 2008, 13:24

Some way must be, I think so. But what?
Powered by TrueBSD
User avatar
soko1
Junior Member
 
Posts: 14
Joined: 16 Nov 2008, 18:06
Location: Belarus/Minsk

Postby soko1 » 18 Nov 2008, 13:27

Earlier this helped patch. But now (FreeBSD 7) it does not work = (

% cat /truebsd/diffs/usr/src/sys/geom/geom_vfs.c.diff
Code: Select all
--- 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));
Powered by TrueBSD
User avatar
soko1
Junior Member
 
Posts: 14
Joined: 16 Nov 2008, 18:06
Location: Belarus/Minsk

Postby danger@ » 18 Nov 2008, 13:28

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.
Looking for administrator? http://www.syscare.sk
User avatar
danger@
Member
 
Posts: 779
Joined: 08 Oct 2007, 18:59
Location: Bratislava, Slovakia

Postby danger@ » 18 Nov 2008, 13:30

Looking for administrator? http://www.syscare.sk
User avatar
danger@
Member
 
Posts: 779
Joined: 08 Oct 2007, 18:59
Location: Bratislava, Slovakia

Postby brucec@ » 19 Nov 2008, 04:36



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.
brucec@
Junior Member
 
Posts: 18
Joined: 16 Nov 2008, 18:33
Location: GB

Postby trasz@ » 12 Dec 2008, 21:28

trasz@
Member
 
Posts: 182
Joined: 20 Feb 2008, 22:44
Location: Warszawa, Poland

Postby trasz@ » 03 Feb 2009, 12:38

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_.
trasz@
Member
 
Posts: 182
Joined: 20 Feb 2008, 22:44
Location: Warszawa, Poland

Postby trasz@ » 25 Feb 2009, 20:53

Things has been committed to CURRENT, expect MFC soon.
trasz@
Member
 
Posts: 182
Joined: 20 Feb 2008, 22:44
Location: Warszawa, Poland

Postby Djn » 25 Feb 2009, 23:44

Ooh, excellent.
Djn
Member
 
Posts: 392
Joined: 19 Nov 2008, 14:21
Location: Horten, Norway

Postby bsdzilla » 23 Mar 2009, 16:48

trasz@ wrote:Things has been committed to CURRENT, expect MFC soon.


Any news on the MFC?
bsdzilla
Junior Member
 
Posts: 1
Joined: 16 Feb 2009, 15:09

Postby trasz@ » 23 Mar 2009, 19:38

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.
trasz@
Member
 
Posts: 182
Joined: 20 Feb 2008, 22:44
Location: Warszawa, Poland


Return to FreeBSD Development

Who is online

Users browsing this forum: No registered users and 0 guests