[LITMUS^RT] WARNING: DEBUG_LOCKS_WARN_ON
Björn Brandenburg
bbb at mpi-sws.org
Mon Feb 24 15:05:13 CET 2014
On 24 Feb 2014, at 11:27, Sebastiano Catellani <sebastiano.catellani at gmail.com> wrote:
> At run-time I have this warning:
>
> WARNING: at kernel/sched/core.c:2885 sub_preempt_count+0x9e/0xf0()
> DEBUG_LOCKS_WARN_ON(val > preempt_count())
> CPU: 2 PID: 1702 Comm: rtspin Not tainted 3.10.5-litmus2013.1 #354
> Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
> 0000000000000009 ffff88001cd27de0 ffffffff8155ae8e ffff88001cd27e18
> ffffffff8102f356 0000000000000001 ffff88001eada160 ffff88001cea0830
> ffff88001eada160 ffff88001fd0fb20 ffff88001cd27e78 ffffffff8102f3f7
> Call Trace:
> [<ffffffff8155ae8e>] dump_stack+0x19/0x1b
> [<ffffffff8102f356>] warn_slowpath_common+0x66/0x90
> [<ffffffff8102f3f7>] warn_slowpath_fmt+0x47/0x50
> [<ffffffff8105e5be>] sub_preempt_count+0x9e/0xf0
> [<ffffffff8129ba0d>] pfp_lock+0x49d/0x6b0
> [<ffffffff81293bca>] sys_litmus_lock+0x16a/0x1e0
> [<ffffffff815625d2>] system_call_fastpath+0x16/0x1b
> ---[ end trace 3c8b462b5826d6f4 ]---
>
> From the point of view of the tasks, only the first occurrence of the condition is affected by some problems, otherwise the rest of the execution is correct. In particular the lock owner, after the unlock event and the migration back, executes till the deadline instead of till the expiration of the execution time.
>
Hi Sebastiano,
the code that you posted does not seem to show up in the stack trace. It's not clear to me what's causing the DEBUG_LOCKS_WARN_ON to fire. Some preempt_enable() call seems to detect an invariant failure. Perhaps it helps if you trace preempt_count() using TRACE() and see where it goes wrong in the execution of the task.
Regards,
Björn
More information about the litmus-dev
mailing list