2.6.7-rc1-bk: SMT scheduler bug / crashes on kernel boot
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 11 lines · Anton Altaparmakov
Hi,
Kernel 2.6.7-rc1-bk crashes on boot with a NULL pointer dereference. The kernel is running under VMware if that matters but I don't think it should. It was working fine with 2.6.6-rc3-bk kernels.
I am afraid the only way I could capture the crash was to capture the vmware screen into a PNG image which is attached. Maybe I need to setup some OCR software for in the future... (-;
The system running VMware is a P4 2.6Hz with Hyper threading enabled and
/proc/cpuinfoshows two cpus:
OK, thanks for that. It would be quite helpful if you edit kernel/sched.c and turn the line #undef SCHED_DOMAIN_DEBUG into #define SCHED_DOMAIN_DEBUG, then compile a kernel with debugging info enabled.
Boot again, and capture another screenshot of the oops. This will hopefully include the SCHED_DOMAIN_DEBUG output.
Also run
addr2line -e /path/to/vmlinux EIP
vmlinux is the file generated in the root directory of the source tree after compilation. EIP is the EIP value printed by the Oops.
Thanks.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 16 lines · Anton Altaparmakov
Quoted 14 lines · Nick Piggin
Quoted 11 lines · Anton Altaparmakov
Hi,
Kernel 2.6.7-rc1-bk crashes on boot with a NULL pointer dereference. The kernel is running under VMware if that matters but I don't think it should. It was working fine with 2.6.6-rc3-bk kernels.
I am afraid the only way I could capture the crash was to capture the vmware screen into a PNG image which is attached. Maybe I need to setup some OCR software for in the future... (-;
The system running VMware is a P4 2.6Hz with Hyper threading enabled and
/proc/cpuinfoshows two cpus:
Quoted 8 lines
Quoted 4 lines
OK, thanks for that. It would be quite helpful if you edit
kernel/sched.cand turn the line #undefSCHED_DOMAIN_DEBUGinto #defineSCHED_DOMAIN_DEBUG, then compile a kernel with debugging info enabled.Looking at
kernel/sched.cit already says #define, not #undef!
Oops, yes.
[snip]
Quoted 5 lines
So the dereferencing of one of the two fails. Considering the offset is
0x18in the NULL dereference it must be the (p)->prio that causes the oops and hence p must be NULL. I will leave you to figure out what that means...
Nice detective work.
It tried to dereference a NULL idle thread I'd say. ie. the CPU hasn't been set up. Please try Ingo's patch.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 2 lines · Anton Altaparmakov
The kernel shows a warning about the number of siblings being 2 but only 1 being detected. Perhaps this is the cause of the problem. Even if
Probably this is the cause of the problem.
What is the exact message?
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · Anton Altaparmakov
Quoted 8 lines · Nick Piggin
Quoted 2 lines · Anton Altaparmakov
The kernel shows a warning about the number of siblings being 2 but only 1 being detected. Perhaps this is the cause of the problem. Even if
Probably this is the cause of the problem.
Quoted 8 lines
Quoted 1 line
What is the exact message?
You can see it in the PNG I attached in the original post. But here it is copied out:
WARNING: 1 siblings found for CPU0, should be 2
OK thanks... I think I even wrote that :P
The problem is smp_num_siblings is set to 2, but phys_proc_id doesn't seem to be set up right (or it could be cpu_callout_map). That would cause the sched-domains to get set up wrong, sure. Maybe we should just go bug in this case? Or try to fix up?
Anyone have any idea why this is happening?
Quoted 1 line · Anton Altaparmakov
WARNING: 1 siblings found for CPU0, should be 2
does the patch below fix it?
Ingo
arch/i386/kernel/smpboot.c renamed from arch/i386/kernel/smpboot.c.orig +3 -1
@@ -1110,8 +1110,10 @@ static void __init smp_boot_cpus(unsignecpu_set (cpu, cpu_sibling_map[cpu]); } -if (siblings != smp_num_siblings) +if (siblings != smp_num_siblings) {printk (KERN_WARNING "WARNING: %d siblings found for CPU%d, should be %d\n" , siblings, cpu, smp_num_siblings); + smp_num_siblings = siblings; + } }if (nmi_watchdog ==NMI_LOCAL_APIC )