From owner-freebsd-smp Wed Dec 4 07:27:41 1996 Return-Path: owner-smp Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id HAA14356 for smp-outgoing; Wed, 4 Dec 1996 07:27:41 -0800 (PST) Received: from kvikk.uit.no (kvikk.Uit.No [129.242.4.32]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id HAA14334 for ; Wed, 4 Dec 1996 07:27:34 -0800 (PST) Received: from sprint.cc.uit.no (sprint.Cc.Uit.No [129.242.5.198]) by kvikk.uit.no (8.7.3/8.7.1) with ESMTP id QAA05865; Wed, 4 Dec 1996 16:27:15 +0100 (MET) Received: from slibo.cc.uit.no (slibo.Cc.Uit.No [129.242.5.36]) by sprint.cc.uit.no (8.8.0/8.8.0) with ESMTP id QAA07628; Wed, 4 Dec 1996 16:27:14 +0100 (MET) Received: from localhost (terjem@localhost) by slibo.cc.uit.no (8.7.3/8.7.3) with ESMTP id QAA04593; Wed, 4 Dec 1996 16:27:13 +0100 (MET) Message-Id: <199612041527.QAA04593@slibo.cc.uit.no> X-Mailer: exmh version 1.6.9 8/22/96 To: Peter Wemm cc: smp@freebsd.org Subject: Re: Crashing on activating other CPUs In-reply-to: Your message of "Wed, 04 Dec 1996 22:27:25 MET." <199612041427.WAA01519@spinner.DIALix.COM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 04 Dec 1996 16:27:12 +0100 From: Terje Normann Marthinussen Sender: owner-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Terje Normann Marthinussen wrote: >> However, after recompiling with DDB, I got: >> cpunumber = 0 >> instruction pointer = 0x8:0xf010d5ad >> stack pointer = 0x10:0xefbfff68 >> frame pointer = 0x10:0xefbfff6c >> code segment = base 0x0, limit 0xfffff, type 0x1b >> = DPL 0, pres 1, def32 1, gran 1 >> processor eflags = interrupt enabled, IOPL = 0 >> current process = 6 (cpuidle1) >> interrupt mask = >> kernel: type 29 trap, code=0 >> Stopped at _smp_idleloop+0x3d: andl $0xf000000,%eax >> db> trace >> _smp_idleloop(f40c14d7,f010d369,1,f01e8294,f01ee958) at _smp_idleloop+0x3d >> _smp_kickoff(0) at _smp_kickoff+0x97 >> _main(efbfffb8,f011cec0,f01ba140,8000000,5,0,efbffff4,f01bd450,f01bcbe3,80000 > 011 >> ,30,22ff00,233000) at _main+0x92 > >Hmm!! I do not understand this at all... How can an 'and' between an >immediate and a register generate a trap??? > >Are you using a P6? Perhaps they have an extra trap or two defined for >some new condition? No, it is a 4 CPU 133 MHZ P5 system. Just for the record, I did a continue in DDB just after this. Now I wonder, what happens when you get into DDB, do you get the code that generated the trap, or do get the code that cpu0 was at when you got the trap? Tried after a reboot: cpunumber = 0 instruction pointer = 0x8:0xf010d65b stack pointer = 0x10:0xefbfff68 frame pointer = 0x10:0xefbfff6c code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, IOPL = 0 current process = 6 (cpuidle1) interrupt mask = kernel: type 29 trap, code=0 Stopped at _smp_idleloop+0xeb: cmpl $0,_whichrtqs db> trace _smp_idleloop(f40c14d7,f010d369,1,f01e8294,f01ee958) at _smp_idleloop+0xeb _smp_kickoff(0) at _smp_kickoff+0x97 _main(efbfffb8,f011cec0,f01ba140,8000000,5,0,efbffff4,f01bd450,f01bcbe3,80000011 ,30,22ff00,233000) at _main+0x92 begin() at begin+0x44 db> c cpunumber = 1 instruction pointer = 0x8:0xf010d5ad stack pointer = 0x10:0xefbfff68 frame pointer = 0x10:0xefbfff6c code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, IOPL = 0 current process = 6 (cpuidle1) interrupt mask = kernel: type 29 trap, code=0 Stopped at _smp_idleloop+0x3d: andl $0xf000000,%eax db> trace _smp_idleloop(f40c14d7,f010d369,1,f01e8294,f01ee958) at _smp_idleloop+0x3d _smp_kickoff(0) at _smp_kickoff+0x97 _main(efbfffb8,f011cec0,f01ba140,8000000,5,0,efbffff4,f01bd450,f01bcbe3,80000011 ,30,22ff00,233000) at _main+0x92 begin() at begin+0x44 And then yet another reboot: SMP: AP CPU #1 LAUNCHED!! Starting Scheduling... cpunumber = 0 instruction pointer = 0x8:0xf010d5ad stack pointer = 0x10:0xefbfff68 frame pointer = 0x10:0xefbfff6c code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, IOPL = 0 current process = 5 (cpuidle0) interrupt mask = kernel: type 29 trap, code=0 Stopped at _smp_idleloop+0x3d: andl $0xf000000,%eax db> c cpunumber = 1 instruction pointer = 0x8:0xf01bf24d stack pointer = 0x10:0xefbfffa4 frame pointer = 0x10:0xefbfd5f4 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, IOPL = 0 current process = 149 (sshd@386freebsd2) interrupt mask = kernel: type 29 trap, code=0 Stopped at _MPgetlock+0x5d: cmpl $-0x1,0(%edx) db> trace _MPgetlock(efbfd644,efbfd624,0,efbfd698,5) at _MPgetlock+0x5d Does this mean that there was a trap generated by both instructions, or that one of them made it? did continue again, and it got up and running with 2 cpus. After this, going from 2->1->2 cpus works fine. Terje Marthinussen terjem@cc.uit.no