RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 846829 - Panic in target_core_iblock iblock_do_task
Summary: Panic in target_core_iblock iblock_do_task
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Andy Grover
QA Contact: Bruno Goncalves
URL:
Whiteboard:
Depends On: 903297 1030730
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-08 20:37 UTC by Jason Mather
Modified: 2014-05-02 18:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-02 18:14:04 UTC
Target Upstream Version:
Embargoed:


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

Description Jason Mather 2012-08-08 20:37:40 UTC
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 17:39:25 UTC
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 14:02:39 UTC
Created attachment 610739 [details]
Stack trace

Comment 4 RHEL Program Management 2012-12-14 08:52:41 UTC
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 12:03:04 UTC
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 12:06:58 UTC
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 13:38:57 UTC
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 18:14:04 UTC
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.