Bug 9203

Summary: raid5 doesnt shut down cleanly on 2.6.23-git1[3-6]
Product: IO/Storage Reporter: Jean-Luc Coulon (jean.luc.coulon)
Component: LVM2/DMAssignee: Jens Axboe (axboe)
Status: CLOSED DUPLICATE    
Severity: high CC: agk, akpm, axboe
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.3.23-git16 Subsystem:
Regression: Yes Bisected commit-id:
Attachments: Call trace after crash
raid/dm fixups for empty barriers

Description Jean-Luc Coulon 2007-10-21 08:33:17 UTC
Most recent kernel where this bug did not occur: 2.6.23.1
Distribution: Debian
Hardware Environment: AMD64
Software Environment: X86_64
Problem Description: I've lvm over a raid5 (3 disks).
At shut down, the system doesnt halt cleanly, reporting "kernel BUG"
The messages arent in the syslog, I've not written down them by hand.

Nevertheless, I could see (repeated several time, together with a trace): 
note: md3_raid5[2266] exited with preempt-count 1
[ here, there is the trace ]
kernel BUG at drivers/scsi/scsi_lib.c:1234
invalid opcode : 0000 [2] PREMPT

Steps to reproduce: enter the halt command

This leads to a sync problem on the arry which needs then to be resync.

I can provide my .config on request and (if really needed, I can try to write down the messages from the console).

Regards

Jean-Luc
Comment 1 Andrew Morton 2007-10-21 11:15:51 UTC
Jens, that's

int scsi_setup_fs_cmnd(struct scsi_device *sdev, struct request *req)
{
        struct scsi_cmnd *cmd;
        int ret = scsi_prep_state_check(sdev, req);

        if (ret != BLKPREP_OK)
                return ret;
        /*
         * Filesystem requests must transfer data.
         */
        BUG_ON(!req->nr_phys_segments);
Comment 2 Jens Axboe 2007-10-25 03:03:30 UTC
Can I get a more full backtrace please?
Comment 3 Jean-Luc Coulon 2007-11-01 04:32:26 UTC
Created attachment 13365 [details]
Call trace after crash

Sorry for the late answer, I wanted to have time to be prone of data corruption.

I've got a picture of the screen showing the call trace.
Please ask if you need more.

Jean-Luc
Comment 4 Jens Axboe 2007-11-01 04:36:20 UTC
Created attachment 13366 [details]
raid/dm fixups for empty barriers

Can you please try this?
Comment 5 Jean-Luc Coulon 2007-11-01 09:28:26 UTC
Ok, I applied the patch and retry to halt the system.
I done it 3 times and, with the patch, it halted fine every times.

Regards

Jean-Luc
Comment 6 Jens Axboe 2007-11-05 01:26:14 UTC

*** This bug has been marked as a duplicate of bug 9288 ***