[DRBD-user] strange drbd bug

Bart Van Assche bvanassche at acm.org
Tue Oct 14 18:07:21 CEST 2014

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.

On 10/14/14 17:08, Lars Ellenberg wrote:
> On Tue, Oct 14, 2014 at 03:27:56PM +0200, Matteo Tescione wrote:
>> Discussed this topic with Bart from SCST, he suggested:
>> "To me this looks like a DRBD bug. If a timeout of a DRBD request occurs
>> the DRBD timeout handler (request_timer_fn()) is called, that function
>> grabs a spinlock and next calls kthread_create_on_node() with that
>> spinlock held.
> Well, no, our request_timer_fn does nothing like that.
> At least it is not supposed to, and I don't see a code path
> leading to anything like that.

Hello Lars,

Matteo reported that this occurred with DRBD version 8.4.4 (see also 
http://sourceforge.net/p/scst/mailman/message/32928699/). My conclusion 
from the stack trace posted by Matteo is that the call chain was as follows:
-> run_timer_softirq()
-> call_timer_fn
-> request_timer_fn()
-> _drbd_set_state()
-> __drbd_set_state()
-> _drbd_thread_stop() (locks the &thi->t_lock spinlock)
-> drbd_thread_start()
-> kthread_create_on_node()
-> wait_for_completion()

In other words, wait_for_completion() is not only called from soft-IRQ 
context but also with a spinlock held. Does this make sense to you ?



More information about the drbd-user mailing list