Bug 38842
Summary: | panic in elv_completed_request on safe remove usb hard drive | ||
---|---|---|---|
Product: | IO/Storage | Reporter: | leniviy (basinilya) |
Component: | Other | Assignee: | io_other |
Status: | RESOLVED CODE_FIX | ||
Severity: | high | CC: | alan, cereslei, florian, herton, jrnieder, maciej.rutecki, rjw, stern |
Priority: | P1 | ||
Hardware: | x86-64 | ||
OS: | Linux | ||
Kernel Version: | 2.6.39.2 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Bug Depends on: | |||
Bug Blocks: | 32012 | ||
Attachments: | dmesg output |
Description
leniviy
2011-07-06 09:20:03 UTC
downgraded to 2.6.38.8 , works stable This could already be fixed in 3.0-rc6 ... can you test that? At <http://bugs.debian.org/631187>, Alexander Kurtz writes: > I just tested 2.6.39-3 from sid and 3.0.0~rc6-1~experimental.1 from > experimental. Unfortunately both reliably panic when safely removing my > external hard drive. 2.6.38-5 (still) works fine. Seems like it's time > for me to do a git bisect, or do you any other ideas? So alas, this doesn't seem to be fixed yet. Based on an oops there, it seems e->ops is NULL (thanks to bwh for analyzing it). There is a proposed patch here: http://marc.info/?l=linux-scsi&m=131007155700831&w=2 I don't know if it has gotten into Linus's tree yet. Also, this patch may not be a complete fix. I got a similar bug reported here: https://bugs.launchpad.net/bugs/793796 Indeed it's because of elevator being deallocated (elevator_exit, e->ops = NULL) and later e->ops trying to be used again. I did 2 patches checking for queue being dead (0004 and 0005 at http://people.canonical.com/~herton/lp793796/r5/), reporter confirmed that fixed his problems with them, but indeed it seems other elevator calls could access e->ops after elevator_exit, the patch from James seems more complete. I'll try to get reporter test with only his patch. I got the reporter to test the patch from http://marc.info/?l=linux-scsi&m=131007155700831&w=2 The results are that the patch doesn't work for him, so something more is needed, he still gets the panic on elv_completed_request: https://launchpadlibrarian.net/75257538/r6panic.jpg (gdb) l *(elv_completed_request+0x3f) 0xffffffff812bd22f is in elv_completed_request (/home/herton/clean/ubuntu-natty/block/elevator.c:812). 807 * request is released from the driver, io must be done 808 */ 809 if (blk_account_rq(rq)) { 810 q->in_flight[rq_is_sync(rq)]--; 811 if ((rq->cmd_flags & REQ_SORTED) && 812 e->ops->elevator_completed_req_fn) 813 e->ops->elevator_completed_req_fn(q, rq); 814 } 815 } |