This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 846829 - Panic in target_core_iblock iblock_do_task
Panic in target_core_iblock iblock_do_task
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Andy Grover
Bruno Goncalves
:
Depends On: 903297 1030730
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-08 16:37 EDT by Jason Mather
Modified: 2014-05-02 14:14 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-05-02 14:14:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to move bio access. (738 bytes, patch)
2012-08-08 16:37 EDT, Jason Mather
no flags Details | Diff
Stack trace (4.46 KB, text/plain)
2012-09-07 10:02 EDT, Jason Mather
no flags Details
loopback trace (4.61 KB, text/plain)
2013-08-15 08:03 EDT, Bruno Goncalves
no flags Details

  None (edit)
Description Jason Mather 2012-08-08 16:37:40 EDT
Created attachment 603111 [details]
Patch to move bio access.

Description of problem:

Running FCoE target panics at iblock_do_task+0x21c

Version-Release number of selected component (if applicable):
2.6.32-279.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. Install in a VM with a virtual network to a client
2. Add a target on the iblock backend
3. Verify that block device is shown on client
4. Start I/O from client (dd will do)
  
Actual results:
Panic in target

Expected results:
I/O flows

Additional info:
Found the error in kernel source.
A bio pointer is dereferenced after being submitted.  On a VM the I/O is 
likely to have completed by the time submit_bio returns.
Moving the access before submit_bio fixes the crash.
Patch attached.
Comment 2 Jason Mather 2012-08-10 13:39:25 EDT
Forgot to mention that this bug is not present in the upstream kernel.  It was introduced when the target code was backported which is why I'm reporting it here.
Comment 3 Jason Mather 2012-09-07 10:02:39 EDT
Created attachment 610739 [details]
Stack trace
Comment 4 RHEL Product and Program Management 2012-12-14 03:52:41 EST
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 5 Bruno Goncalves 2013-08-15 08:03:04 EDT
Created attachment 786911 [details]
loopback trace

I was able to reproduce a similar crash using loopback. It crashed just after adding a LUN to loopback device.


modprobe scsi_debug dev_size_mb=500
targetcli /backstores/block create fcoe_test /dev/sda
targetcli /loopback create naa.60014057b9541ae0
targetcli /loopback/naa.60014057b9541ae0/luns create /backstores/block/fcoe_test


It occurred on RHEL-6.3 (2.6.32-279.el6.x86_64), but not on RHEL-6.4 (2.6.32-358.el6.x86_64)
Comment 6 Bruno Goncalves 2013-08-15 08:06:58 EDT
Jason,

Do you know if the problem still happens on RHEL-6.4(2.6.32-358.el6.x86_64)?

Also, would you be able to provide more details how is the setup?
Like is the VM host that has FCoE target configured and and disk is provided to VM guest? Or there is another server that acts as FCoE target and provides the disk to VM host...
Comment 7 Jason Mather 2013-09-10 09:38:57 EDT
Sorry for the delay.  I no longer have this setup so unable to try this on 6.4.

The iblock backend points to a virtual disk on the VM.  The qemu/kvm host is serving the disk from a qcow2 file (-hdb hdb.qcow2).  The fcoe is over a virtual network to a client on another VM.

I suspect the reason it showed up in my VM is it is provided with only one CPU, so the I/O is more likely to complete and free the bio before it returns to the caller.
Comment 11 Andy Grover 2014-05-02 14:14:04 EDT
We think this is fixed, so closing. If you can reproduce with RHEL 6.5, please feel free to reopen.

Note You need to log in before you can comment on or make changes to this bug.