Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 23 Jan 2002 07:08:08 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 23 Jan 2002 07:07:58 -0500 Received: from swazi.realnet.co.sz ([196.28.7.2]:39583 "HELO netfinity.realnet.co.sz") by vger.kernel.org with SMTP id ; Wed, 23 Jan 2002 07:07:47 -0500 Date: Wed, 23 Jan 2002 14:02:48 +0200 (SAST) From: Zwane Mwaikambo X-X-Sender: zwane@netfinity.realnet.co.sz To: Ingo Molnar Cc: Linux Kernel Subject: 2.5.2-pre2-3 SMP broken on UP boxen Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hi Ingo, My test box is a single proc machine running an SMP kernel. As of 2.5.2-pre2 it panics on boot. The reason is kinda obvious, smp_processor_id() will always return the same as global_irq_holder. How come we do this check now? kernel/sched.c asmlinkage void schedule(void) { task_t *prev = current, *next; runqueue_t *rq = this_rq(); prio_array_t *array; list_t *queue; int idx; if (unlikely(in_interrupt())) BUG(); release_kernel_lock(prev, smp_processor_id()); <== spin_lock_irq(&rq->lock); include/asm-i386/smplock.h #define release_kernel_lock(task, cpu) \ do { \ if (unlikely(task->lock_depth >= 0)) { \ spin_unlock(&kernel_flag); \ if (global_irq_holder == (cpu)) \ <== Ugg.... BUG(); \ } \ } while (0) Here is the oops... CPU0: Intel Pentium II (Deschutes) stepping 02 per-CPU timeslice cutoff: 1463.72 usecs. SMP motherboard not detected. enabled ExtINT on CPU#0 ESR value before enabling vector: 00000000 ESR value after enabling vector: 00000000 Using local APIC timer interrupts. calibrating APIC timer ... ..... CPU clock speed is 350.7822 MHz. ..... host bus clock speed is 100.2233 MHz. cpu: 0, clocks: 1002233, slice: 501116 CPU0 kernel BUG at sched.c:588! invalid operand: 0000 CPU: 0 EIP: 0010:[] Not tainted EFLAGS: 00010082 eax: 0000001b ebx: c0338000 ecx: c031ee64 edx: 00000c43 esi: c037bca0 edi: c0338000 ebp: c0339f84 esp: c0339f58 ds: 0018 es: 0018 ss: 0018 Process swapper (pid: 0, stackpage=c0339000) Stack: c02da9e4 0000024c c0339f8c c0339fc0 c0105000 0008e000 c0107661 c0338000 c0338000 c0339fc0 c0105000 0008e000 c0109199 00010f00 c0105090 00000000 c0339fc0 c0105000 0008e000 00000001 00100018 00000018 00000078 c010725d Call Trace: [] [] [] [] [] [] [] [] [] Code: 0f 0b 5a 59 fa 81 7e 04 ad 4e ad de 74 33 68 e3 9f 11 c0 68 <0>Kernel panic: Attempted to kill the idle task! In idle task - not syncing >>EIP; c0119fdf <===== Trace; c0105000 <_stext+0/0> Trace; c0107661 Trace; c0105000 <_stext+0/0> Trace; c0109199 Trace; c0105090 Trace; c0105000 <_stext+0/0> Trace; c010725d Trace; c0105019 Trace; c0105090 Code; c0119fdf 00000000 <_EIP>: Code; c0119fdf <===== 0: 0f 0b ud2a <===== Code; c0119fe1 2: 5a pop %edx Code; c0119fe2 3: 59 pop %ecx Code; c0119fe3 4: fa cli Code; c0119fe4 5: 81 7e 04 ad 4e ad de cmpl $0xdead4ead,0x4(%esi) Code; c0119feb c: 74 33 je 41 <_EIP+0x41> c011a020 Code; c0119fed e: 68 e3 9f 11 c0 push $0xc0119fe3 Code; c0119ff2 13: 68 00 00 00 00 push $0x0 0xc0119fbb : xchg %bl,0xc037a400 0xc0119fc1 : movzbl 0xc031d120,%eax 0xc0119fc8 : mov 0xfffffff0(%ebp),%ecx 0xc0119fcb : cmp 0x20(%ecx),%eax 0xc0119fce : jne 0xc0119fe3 0xc0119fd0 : push $0x24c 0xc0119fd5 : push $0xc02da9e4 0xc0119fda : call 0xc0118570 0xc0119fdf : ud2a 0xc0119fe1 : pop %edx 0xc0119fe2 : pop %ecx - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/