lkml.org 
[lkml]   [2016]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] sched: Avoid that __wait_on_bit_lock() hangs
From
Date
On 08/03/2016 11:11 AM, Peter Zijlstra wrote:
> That seems to do the right thing, so clearly I misunderstand. Please
> clarify.

Hello Peter,

try_to_wake_up() locks task_struct.pi_lock but abort_exclusive_wait()
not. My assumption is that the following sequence of events leads to the
lockup that I had mentioned in the description of my patch:
* try_to_wake_up() is called for the task that will execute
abort_exclusive_wait().
* After try_to_wake_up() has checked task_struct.state and before
autoremove_wake_function() has tried to remove the task from the wait
queue, abort_exclusive_wait() is executed for the same task.

Please note that the call stack I had mentioned in my e-mail had been
reported before. See e.g.
* Michael Shaver, Kernel deadlock during mdadm reshape, July 2016
(http://www.spinics.net/lists/raid/msg53056.html).
* Bart Van Assche, Kernel hangs in truncate_inode_pages(), August 2012
(https://lkml.org/lkml/2012/8/24/185).

Bart.

\
 
 \ /
  Last update: 2016-08-03 22:01    [W:0.107 / U:1.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site