Bug 463715 - lockdep backtrace when logging out of an iscsi target
lockdep backtrace when logging out of an iscsi target
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
10
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mike Christie
Fedora Extras Quality Assurance
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-24 03:53 EDT by Hans de Goede
Modified: 2009-12-18 01:25 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-12-18 01:25:44 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
dmesg output with backtrace at the end (39.06 KB, text/plain)
2008-09-24 13:00 EDT, Hans de Goede
no flags Details

  None (edit)
Description Hans de Goede 2008-09-24 03:53:09 EDT
Logging out of an iscsi target with the rawhide kernel gives the attached lockdep backtrace.
Comment 1 Jeff Moyer 2008-09-24 12:52:21 EDT
I think you forgot to attach the backtrace.
Comment 2 Hans de Goede 2008-09-24 13:00:20 EDT
Created attachment 317606 [details]
dmesg output with backtrace at the end

Erm, looks like bugzilla ate it, as I'm sure I attached it, trying again.
Comment 3 Mike Christie 2008-09-24 13:31:16 EDT
I do not think we will hit this problem. iscsi will remove all the sessions and their targets/scsi_devices before calling the destroy_workqueue function from the iscsi_remove_host function, so the work queue would never grab the attribute_container_mutex for that type of event.

When iscsi_remove_host is called we will also prevent users from creating new objects would could queue work on workqueue and grab the attribute_container_mutex.

But there is no way for the lock dep code to know this and if it there was not internal code in scsi_transport_iscsi.c to sync those events lock dep is right and we would have locking problem.

What do you think? Is there a way to tell lock dep this, or should I just move destroy_workqueue from iscsi_remove_host to some new function that iscsi drivers call before scsi_remove_host (The reason for the lock dep error is that scsi_remove_host can grab the attribute_container_mutex which then call iscsi_remove_host which calls destroy_workqueue and if the workqueue is running and trying to add or delete objects it could be trying to grab the same attribute_container_mutex, but like I said when we are shutting down the host we prevent it from adding/deleting session/target/scsi_devices and make sure they are already destroyed (we have to make sure they are desotryed before calling scsi_remove_host because of the normal ordering of how the objects are related)).
Comment 4 Mike Christie 2008-09-24 13:32:26 EDT
(In reply to comment #3)
> I do not think we will hit this problem. iscsi will remove all the sessions and
> their targets/scsi_devices before calling the destroy_workqueue function from
> the iscsi_remove_host function, so the work queue would never grab the
> attribute_container_mutex for that type of event.
> 
> When iscsi_remove_host is called we will also prevent users from creating new

I mean before iscsi_remove_host is called.


> objects would could queue work on workqueue and grab the
> attribute_container_mutex.
>
Comment 5 Hans de Goede 2008-09-24 14:55:23 EDT
Mike I've done some kernel programming, but I'm not all that much into the iscsi code so most of what you're saying goes over my head.

I don't think there is anyway to tell lockdep about how this situation is special, so I think you're proposed shuffle changes to avoid the lockdep warning are the best solution.
Comment 6 Bug Zapper 2008-11-25 22:12:15 EST
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 7 Bug Zapper 2009-11-18 03:25:14 EST
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 8 Bug Zapper 2009-12-18 01:25:44 EST
Fedora 10 changed to end-of-life (EOL) status on 2009-12-17. Fedora 10 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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