Re: [PATCH] avoid race condition in pick_next_task_fair in kernel/sched_fair.c

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Miklos Vajna
Date: Wednesday, December 22, 2010 - 8:14 am

On Wed, Dec 22, 2010 at 03:11:52PM +0100, Peter Zijlstra <peterz@infradead.org> wrote:

Nope.


I tried to do something really similar to your commandline:

qemu -enable-kvm -kernel kernel-build/arch/x86/boot/bzImage -append "root=/dev/sda1 debug sched_debug ignore_loglevel sysrq_always_enabled console=ttyS0" -hda systemd.img -serial stdio -m 1G -vnc :0

This boots up properly here, I can login using root/root from vnc.

qemu -enable-kvm -kernel kernel-build/arch/x86/boot/bzImage -append "root=/dev/sda1 debug sched_debug ignore_loglevel sysrq_always_enabled console=ttyS0 init=/bin/systemd" -hda systemd.img -serial stdio -m 1G -vnc :0

^ Only init=/bin/systemd added, and this results in a panic in most
cases. I'm attaching the stdout of qemu, showing the fail in
put_prev_task_fair.

$ qemu -version
QEMU emulator version 0.13.0, Copyright (c) 2003-2008 Fabrice Bellard

kernel-build is a git build using the config I already sent and after a
'git checkout v2.6.36'. I can try to build master as well, so far what I
saw is that the bug occurs there as well, but less frequently, so maybe
that's a bit harder to debug.

I also want to note that - at least on my machine - if I drop
-enable-kvm the bug is hard to reproduce, maybe that's because that way
it does not trigger a race condition or my machine is just too slow
without kvm and it triggers some timeout, changing the behaviour; I'm
not exactly sure.  (But again, I can reproduce the bug on real hardware,
so I don't think we have a kvm bug here.)

Thanks,

Miklos
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] avoid race condition in pick_next_task_fair in ..., Miklos Vajna, (Wed Dec 22, 8:14 am)
[tip:sched/core] sched, autogroup: Fix reference leak, tip-bot for Mike Gal ..., (Tue Jan 4, 7:19 am)
Re: [tip:sched/core] sched, autogroup: Fix reference leak, Mike Galbraith, (Tue Jan 4, 12:06 pm)