problem with 2.2.0pre2 SMP

Radu Raduta (radu@mail.dnttm.ro)
Fri, 1 Jan 1999 13:05:33 +0200 (EET)



Hi all!
May this be a great year for you all!

(and now back to buisness):
I just downloaded 2.2.0pre2, compiled it and gave it a shot...he kinda
shoots himself in the foot every time at boot-time, oopsing ( this
oops is was reproduced using state-of-the-art Lyra pencils and a
postcard...)

-------------8<-------------------------------------------------
divide error: 0000
CPU: 0
EIP: 0010:[<c010e52c>]
EFLAGS: 00010246
eax: 00000000 ebx: 00000000 ecx: 00000000 edx: 00000000
esi: 000f4240 edi: 00000000 ebp: 00000000 dsp: c01fbfa4
ds: 0016 es: 0018 ss: 0018
Process swapper (pid:0, process nr:0, startpage=c01fb00)
Stack: c0106000 00009000 00000000 c0200635 00000000 00000000 0009e200 c0106000
00009000 00000000 00000282 c020d0ef c01dcafs c01fcc70 c01c5c5f c02674b8
c1000000 c02674b8 c1000000 c0106000 00000000 c01ebe40 c01001b1
Call Trace: [<c010600>] [<c010600>] [<c01c5c5f>] [<c0106000>] [<c0106000>] [<c01001b1>]
Code: f7 f5 89 c7 be 67 00 00 00 31 d2 f7 f6 89 d7 57 89 c8 31 d2
Kernel panic: Attempted to kill the idle task!
In swapper task - not syncing
-------------8<----------------------------------------------------

This 'divide by zero' happens in smp_tune_scheduling:

-------------8<-----------------------------------------------------
0xc010e4b0 <smp_tune_scheduling>: subl $0x4,%esp
0xc010e4b3 <smp_tune_scheduling+3>: pushl %ebp
0xc010e4b4 <smp_tune_scheduling+4>: pushl %edi
0xc010e4b5 <smp_tune_scheduling+5>: pushl %esi
0xc010e4b6 <smp_tune_scheduling+6>: pushl %ebx
0xc010e4b7 <smp_tune_scheduling+7>: cmpb $0x4,0xc01e5db0
0xc010e4be <smp_tune_scheduling+14>: ja 0xc010e4d0 <smp_tune_scheduling+32>
0xc010e4c0 <smp_tune_scheduling+16>: movl $0x0,0xc0220424
0xc010e4ca <smp_tune_scheduling+26>: jmp 0xc010e4fe <smp_tune_scheduling+78>
0xc010e4cc <smp_tune_scheduling+28>: leal 0x0(%esi,1),%esi
0xc010e4d0 <smp_tune_scheduling+32>: movl 0xc01e5e10,%ecx
0xc010e4d6 <smp_tune_scheduling+38>: cmpl $0xffffffff,%ecx
0xc010e4d9 <smp_tune_scheduling+41>: jne 0xc010e4e0 <smp_tune_scheduling+48>
0xc010e4db <smp_tune_scheduling+43>: movl $0x8,%ecx
0xc010e4e0 <smp_tune_scheduling+48>: movl 0xc021ef20,%eax
0xc010e4e5 <smp_tune_scheduling+53>: shrl $0xa,%eax
0xc010e4e8 <smp_tune_scheduling+56>: imull %eax,%ecx
0xc010e4eb <smp_tune_scheduling+59>: movl %ecx,%eax
0xc010e4ed <smp_tune_scheduling+61>: movl $0x1388,%esi
0xc010e4f2 <smp_tune_scheduling+66>: xorl %edx,%edx
0xc010e4f4 <smp_tune_scheduling+68>: divl %esi,%eax
0xc010e4f6 <smp_tune_scheduling+70>: movl %eax,%ecx
0xc010e4f8 <smp_tune_scheduling+72>: movl %ecx,0xc0220424
0xc010e4fe <smp_tune_scheduling+78>: movl 0xc0220424,%ecx
0xc010e504 <smp_tune_scheduling+84>: leal (%ecx,%ecx,4),%eax
0xc010e507 <smp_tune_scheduling+87>: movl %eax,0x10(%esp,1)
0xc010e50b <smp_tune_scheduling+91>: leal (%eax,%eax,4),%edx
0xc010e50e <smp_tune_scheduling+94>: leal 0x0(,%edx,4),%edi
0xc010e515 <smp_tune_scheduling+101>: movl 0xc021ef20,%ebx
0xc010e51b <smp_tune_scheduling+107>: movl %ebx,%eax
0xc010e51d <smp_tune_scheduling+109>: movl $0xf4240,%esi
0xc010e522 <smp_tune_scheduling+114>: xorl %edx,%edx
0xc010e524 <smp_tune_scheduling+116>: divl %esi,%eax
0xc010e526 <smp_tune_scheduling+118>: movl %eax,%ebp
0xc010e528 <smp_tune_scheduling+120>: movl %edi,%eax
0xc010e52a <smp_tune_scheduling+122>: xorl %edx,%edx
0xc010e52c <smp_tune_scheduling+124>: divl %ebp,%eax
^^^^^^^^^ -HERE
0xc010e52e <smp_tune_scheduling+126>: movl %eax,%edi
0xc010e530 <smp_tune_scheduling+128>: movl $0x64,%esi
0xc010e535 <smp_tune_scheduling+133>: xorl %edx,%edx
0xc010e537 <smp_tune_scheduling+135>: divl %esi,%eax
0xc010e539 <smp_tune_scheduling+137>: movl %edx,%edi
0xc010e53b <smp_tune_scheduling+139>: pushl %edi
-------------8<-----------------------------------------------------

This machine is a UP 486, but I've always used SMP kernels on it (don't
ask me why, I don't know :), and haven't had a kernel oops EVER. This
fault may be caused by smp code not interracting very well with 486's alingment.
I'll give it a go with another kernel compiled for 386, but i'm almost
shure that will work OK.
The "faulty" function lies in (yes, you guessed:) arch/i386/kernel/smp.c
>From here, i'm stuck. Note that ebp and eax both are 0. this is quite
wrong.

GCC is : gcc version 2.7.2.3
System is mostly RH5.1, but that wouldn't matter anyway, as this thing
goes south while trying to initialize CPUS.

hope this helps. i'm available for further questioning, and volunteer
for more digging if i get directions ( i never did this before, but i'm
DIYNG to learn more, and besides it's about time i went for the kernel..)

radu

--[ Radu Raduta ]---[ radu@mail.dnttm.ro ]-----------------------------------[ LINUX ]--
"Here look after this penguin for me, oh by the way it bites"
- Alan Cox taking over 2.1.131 development for a week or so as Linus went to Finland
"Gravitation cannot be held responsible for people falling in love." -- Albert Einstein
"Will learn for food !" - me right now.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/