All of lore.kernel.org
 help / color / mirror / Atom feed
* Question on lockdep and sysrq - d
@ 2009-05-23  0:31 Ben Greear
  2009-05-23  1:03 ` Ming Lei
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Greear @ 2009-05-23  0:31 UTC (permalink / raw)
  To: linux-kernel

Hello!

I'm trying to debug an apparent deadlock in some code I'm
writing.

When I do a sysrq 'd', I get a nice dump of locks (I have lockdep enabled).

However, the output appears to show multiple processes holding the
same locks (rtnl_mutex, for example):

Showing all locks held in the system:
3 locks held by events/11/63:
  #0:  (events){--..}, at: [<ffffffff8104f71e>] run_workqueue+0xb1/0x216
  #1:  ((linkwatch_work).work){--..}, at: [<ffffffff8104f71e>] run_workqueue+0xb1/0x216
  #2:  (rtnl_mutex){--..}, at: [<ffffffff8125def1>] rtnl_lock+0x12/0x14
1 lock held by irqbalance/3360:
  #0:  (rtnl_mutex){--..}, at: [<ffffffff8125def1>] rtnl_lock+0x12/0x14
1 lock held by hald/3605:
  #0:  (rtnl_mutex){--..}, at: [<ffffffff8125def1>] rtnl_lock+0x12/0x14
...

Is this merely showing processes that are blocked on trying to acquire these locks?

If so, is there any way to tell which processes have fully acquired locks v/s
just waiting to acquire them?

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question on lockdep and sysrq - d
  2009-05-23  0:31 Question on lockdep and sysrq - d Ben Greear
@ 2009-05-23  1:03 ` Ming Lei
  2009-05-23  4:42   ` Ben Greear
  0 siblings, 1 reply; 4+ messages in thread
From: Ming Lei @ 2009-05-23  1:03 UTC (permalink / raw)
  To: Ben Greear; +Cc: linux-kernel

See http://marc.info/?l=linux-kernel&m=124211522525625&w=2.

thanks.

2009/5/23 Ben Greear <greearb@candelatech.com>:
> Hello!
>
> I'm trying to debug an apparent deadlock in some code I'm
> writing.
>
> When I do a sysrq 'd', I get a nice dump of locks (I have lockdep enabled).
>
> However, the output appears to show multiple processes holding the
> same locks (rtnl_mutex, for example):
>
> Showing all locks held in the system:
> 3 locks held by events/11/63:
>  #0:  (events){--..}, at: [<ffffffff8104f71e>] run_workqueue+0xb1/0x216
>  #1:  ((linkwatch_work).work){--..}, at: [<ffffffff8104f71e>]
> run_workqueue+0xb1/0x216
>  #2:  (rtnl_mutex){--..}, at: [<ffffffff8125def1>] rtnl_lock+0x12/0x14
> 1 lock held by irqbalance/3360:
>  #0:  (rtnl_mutex){--..}, at: [<ffffffff8125def1>] rtnl_lock+0x12/0x14
> 1 lock held by hald/3605:
>  #0:  (rtnl_mutex){--..}, at: [<ffffffff8125def1>] rtnl_lock+0x12/0x14
> ...
>
> Is this merely showing processes that are blocked on trying to acquire these
> locks?
>
> If so, is there any way to tell which processes have fully acquired locks
> v/s
> just waiting to acquire them?
>
> Thanks,
> Ben
>
> --
> Ben Greear <greearb@candelatech.com>
> Candela Technologies Inc  http://www.candelatech.com
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>



-- 
Lei Ming

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question on lockdep and sysrq - d
  2009-05-23  1:03 ` Ming Lei
@ 2009-05-23  4:42   ` Ben Greear
  2009-05-23 12:33     ` Ming Lei
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Greear @ 2009-05-23  4:42 UTC (permalink / raw)
  To: Ming Lei; +Cc: linux-kernel

Ming Lei wrote:
> See http://marc.info/?l=linux-kernel&m=124211522525625&w=2.
>   
That is about some real bug in the official kernel.  I am almost 100%
certain that my own code is at fault here.

I'm just trying to better understand the way lockdep prints out
all of the locks so I can easier debug my issue.

Thanks,
Ben

> thanks.
>
> 2009/5/23 Ben Greear <greearb@candelatech.com>:
>   
>> Hello!
>>
>> I'm trying to debug an apparent deadlock in some code I'm
>> writing.
>>
>> When I do a sysrq 'd', I get a nice dump of locks (I have lockdep enabled).
>>
>> However, the output appears to show multiple processes holding the
>> same locks (rtnl_mutex, for example):
>>
>> Showing all locks held in the system:
>> 3 locks held by events/11/63:
>>  #0:  (events){--..}, at: [<ffffffff8104f71e>] run_workqueue+0xb1/0x216
>>  #1:  ((linkwatch_work).work){--..}, at: [<ffffffff8104f71e>]
>> run_workqueue+0xb1/0x216
>>  #2:  (rtnl_mutex){--..}, at: [<ffffffff8125def1>] rtnl_lock+0x12/0x14
>> 1 lock held by irqbalance/3360:
>>  #0:  (rtnl_mutex){--..}, at: [<ffffffff8125def1>] rtnl_lock+0x12/0x14
>> 1 lock held by hald/3605:
>>  #0:  (rtnl_mutex){--..}, at: [<ffffffff8125def1>] rtnl_lock+0x12/0x14
>> ...
>>
>> Is this merely showing processes that are blocked on trying to acquire these
>> locks?
>>
>> If so, is there any way to tell which processes have fully acquired locks
>> v/s
>> just waiting to acquire them?
>>
>> Thanks,
>> Ben
>>     

-- 
Ben Greear <greearb@candelatech.com> 
Candela Technologies Inc  http://www.candelatech.com



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question on lockdep and sysrq - d
  2009-05-23  4:42   ` Ben Greear
@ 2009-05-23 12:33     ` Ming Lei
  0 siblings, 0 replies; 4+ messages in thread
From: Ming Lei @ 2009-05-23 12:33 UTC (permalink / raw)
  To: Ben Greear; +Cc: linux-kernel

2009/5/23 Ben Greear <greearb@candelatech.com>:
> Ming Lei wrote:
>>
>> See http://marc.info/?l=linux-kernel&m=124211522525625&w=2.
>>
>
> That is about some real bug in the official kernel.  I am almost 100%
> certain that my own code is at fault here.
>
> I'm just trying to better understand the way lockdep prints out
> all of the locks so I can easier debug my issue.

Would you mind posting the whole lockdep warnings in your issue?

Thanks.

>
> Thanks,
> Ben
>
>> thanks.
>>
>> 2009/5/23 Ben Greear <greearb@candelatech.com>:
>>
>>>
>>> Hello!
>>>
>>> I'm trying to debug an apparent deadlock in some code I'm
>>> writing.
>>>
>>> When I do a sysrq 'd', I get a nice dump of locks (I have lockdep
>>> enabled).
>>>
>>> However, the output appears to show multiple processes holding the
>>> same locks (rtnl_mutex, for example):
>>>
>>> Showing all locks held in the system:
>>> 3 locks held by events/11/63:
>>>  #0:  (events){--..}, at: [<ffffffff8104f71e>] run_workqueue+0xb1/0x216
>>>  #1:  ((linkwatch_work).work){--..}, at: [<ffffffff8104f71e>]
>>> run_workqueue+0xb1/0x216
>>>  #2:  (rtnl_mutex){--..}, at: [<ffffffff8125def1>] rtnl_lock+0x12/0x14
>>> 1 lock held by irqbalance/3360:
>>>  #0:  (rtnl_mutex){--..}, at: [<ffffffff8125def1>] rtnl_lock+0x12/0x14
>>> 1 lock held by hald/3605:
>>>  #0:  (rtnl_mutex){--..}, at: [<ffffffff8125def1>] rtnl_lock+0x12/0x14
>>> ...
>>>
>>> Is this merely showing processes that are blocked on trying to acquire
>>> these
>>> locks?
>>>
>>> If so, is there any way to tell which processes have fully acquired locks
>>> v/s
>>> just waiting to acquire them?
>>>
>>> Thanks,
>>> Ben
>>>
>
> --
> Ben Greear <greearb@candelatech.com> Candela Technologies Inc
>  http://www.candelatech.com
>
>
>



-- 
Lei Ming

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-23 12:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-23  0:31 Question on lockdep and sysrq - d Ben Greear
2009-05-23  1:03 ` Ming Lei
2009-05-23  4:42   ` Ben Greear
2009-05-23 12:33     ` Ming Lei

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.