kern/172166: Deadlock in the networking code, possible due to
a bug in the SCHED_ULE
Alexander Motin
mav at FreeBSD.org
Tue Oct 2 08:50:06 UTC 2012
The following reply was made to PR kern/172166; it has been noted by GNATS.
From: Alexander Motin <mav at FreeBSD.org>
To: Eugene Grosbein <egrosbein at rdtc.ru>
Cc: bug-followup at FreeBSD.org, eugen at eg.sd.rdtc.ru,
Andriy Gapon <avg at FreeBSD.org>
Subject: Re: kern/172166: Deadlock in the networking code, possible due to
a bug in the SCHED_ULE
Date: Tue, 02 Oct 2012 11:45:23 +0300
On 02.10.2012 10:59, Eugene Grosbein wrote:
> 02.10.2012 14:53, Alexander Motin ÐÉÛÅÔ:
>> On 02.10.2012 10:48, Eugene Grosbein wrote:
>>> 02.10.2012 13:58, Alexander Motin ÐÉÛÅÔ:
>>>> About rw_lock priority propagation locking(9) tells:
>>>> The rw_lock locks have priority propagation like mutexes, but priority
>>>> can be propagated only to an exclusive holder. This limitation comes
>>>> from the fact that shared owners are anonymous.
>>>>
>>>> What's about idle stealing threshold, it was fixed in HEAD at r239194,
>>>> but wasn't merged yet. It should be trivial to merge it.
>>>
>>> Would it fix my problem with 6-CPU box?
>>> Your commit log talks about "8 or more cores".
>>
>> Hmm. Then I see no reason why threads were not stolen, unless they are
>> bound to specific CPU. Check `sysctl kern.sched.steal_thresh` output to
>> be sure.
>
> All NIC's threads and dummynet are bound in my boxes.
> igb(4) in RELENG_8 bounds its threads by default in very wrong way,
> so I rebound them. dummynet(8) in RELENG_8 goes wild under severe load
> unless bound to single or two cores.
That can be an answer. Active thread can never never stolen and if it
has high absolute priority and never sleeps voluntary -- it will run
there forever. If all other threads are bound to that CPU, they also can
not be stolen and will wait forever.
> kern.sched.steal_thresh: 2
This should not prevent stealing.
PS: I've just noticed that for some reason I haven't merged my scheduler
improvements to 8-STABLE branch. So behavior may differ from one in HEAD
or 9-STABLE. I will recheck commits history to recall what stopped me
from merge. But I don't remember all details to predict whether it may
affect your problem somehow.
--
Alexander Motin
More information about the freebsd-bugs
mailing list