bug, or is it? - SCHED_RR and FPU related
Hello.
I have stumbled upon a grave bug, I think. I can reproduce a hard lock-up using xmms and a buggy plugin - only SysRq-B helps. I managed to narrow it down to "0.5/NAN"-like operation. It only causes a complete hang when xmms is run with SCHED_RR priority. Otherwise, only xmms hangs. Unfortunately, I was not able to create a working proof-of-concept program.
The question is - is this a kernel bug, OR something that cannot be prevented from happening when using SCHED_RR policy?
Tried with 2.6.3-rc[12] and glibc-2.3.2 (-r9 gentoo) with nptl support (if that matters).
Have a nice day.
Rudo.
Quoted 8 lines · Rudo Thomas
Hello.
I have stumbled upon a grave bug, I think. I can reproduce a hard lock-up using xmms and a buggy plugin - only SysRq-B helps. I managed to narrow it down to "0.5/NAN"-like operation. It only causes a complete hang when xmms is run with
SCHED_RRpriority. Otherwise, only xmms hangs. Unfortunately, I was not able to create a working proof-of-concept program.
Quoted 9 lines
The question is - is this a kernel bug, OR something that cannot be prevented from happening when using
SCHED_RRpolicy?Tried with 2.6.3-rc[12] and glibc-2.3.2 (-r9 gentoo) with nptl support (if that matters).
Have a nice day.
Hi Rudo,
xmms probably goes into an infinite loop, preventing anything else from being scheduled, right? If that's the case then this is correct behaviour.
Hi.
Quoted 2 lines
xmms probably goes into an infinite loop, preventing anything else from being scheduled, right?
Nope. When I turn the suid bit off, xmms (does not run with SCHED_RR and) just hangs consuming no CPU cycles. Strange.
I will look into it tomorrow, the invalid FP division was not the problem, its results are.
Thanks.
Rudo.
Quoted 7 lines · Rudo Thomas
Hi.
Quoted 3 lines
xmms probably goes into an infinite loop, preventing anything else from being scheduled, right?
Quoted 7 lines
Nope. When I turn the suid bit off, xmms (does not run with
SCHED_RRand) just hangs consuming no CPU cycles. Strange.I will look into it tomorrow, the invalid FP division was not the problem, its results are.
I think xmms changes the way it runs depending on whether realtime scheduling is set or not, but I could be wrong.
Programs using realtime scheduling need to be coded pretty carefully. Xmms is not something I'd bet my system's stability on.
Hello again.
Quoted 2 lines
I think xmms changes the way it runs depending on whether realtime scheduling is set or not, but I could be wrong.
Yes, it does, but I am not sure whether this is the case.
Anyway, you were right, it was not the kernel. Nothing more to be seen here 8-)
Have a nice weekend.
Rudo.
Re: bug, or is it? - SCHED_RR and futex related
In reply to Rudo ThomasLast question.
I tracked it down to an infinite waiting in futex( ..., FUTEX_WAIT, 2, NULL). Can THIS hang the machine hard when running with SCHED_RR policy?
Thanks.
Rudo.
Re: bug, or is it? - SCHED_RR and futex related
Quoted 2 lines · Rudo Thomas
I tracked it down to an infinite waiting in
futex( ..., FUTEX_WAIT, 2, NULL). Can THIS hang the machine hard when running withSCHED_RRpolicy?
Do you mean that a task running with SCHED_RR calls futex( ..., FUTEX_WAIT, 2, NULL), and there are no other SCHED_RR or SCHED_FIFO tasks?
That cannot lock the machine hard. When the futex call waits, the task sleeps.
-- Jamie