Red Hat Bugzilla – Bug 846829
Panic in target_core_iblock iblock_do_task
Last modified: 2014-05-02 14:14:04 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):
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)
Panic in target
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.
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.
Created attachment 610739 [details]
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.
Created attachment 786911 [details]
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)
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...
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.
We think this is fixed, so closing. If you can reproduce with RHEL 6.5, please feel free to reopen.