From owner-freebsd-current@FreeBSD.ORG Mon Jul 12 23:15:16 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C85C416A4CE; Mon, 12 Jul 2004 23:15:16 +0000 (GMT) Received: from freebee.digiware.nl (dsl390.iae.nl [212.61.63.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 56B1043D53; Mon, 12 Jul 2004 23:15:15 +0000 (GMT) (envelope-from wjw@withagen.nl) Received: from dual (dual [212.61.27.71]) by freebee.digiware.nl (8.12.10/8.12.10) with SMTP id i6CNDssD092329; Tue, 13 Jul 2004 01:13:54 +0200 (CEST) (envelope-from wjw@withagen.nl) Message-ID: <010601c46865$12d2b180$471b3dd4@digiware.nl> From: "Willem Jan Withagen" To: "John Baldwin" References: <20040712024044.GA24706@xor.obsecurity.org> <03b401c467e9$70d4c650$471b3dd4@digiware.nl> <200407121614.40864.jhb@FreeBSD.org> Date: Tue, 13 Jul 2004 01:07:58 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 cc: current@FreeBSD.org cc: Kris Kennaway Subject: Re: page fault/panic: mi_switch: switch in a critical section X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2004 23:15:17 -0000 From: "John Baldwin" > > panic: mi_switch: called by old code > > cpuid = 1; > > Stack backtrace: > > backtrace() at backtrace+0x17 > > panic() at panic+0x1d2 > > mi_switch() at mi_switch+0xcf > > maybe_preempt() at maybe_preempt+0xd0 > > sched_add() at sched_add+0x2dd > > kseq_assign() at kseq_assign+0x45 > > sched_choose() at sched_choose+0x5b > > choosethread() at choosethread+0x3d > > sched_switch() at sched_switch+0x126 > > mi_switch() at mi_switch+0x23b > > ast() at ast+0x35f > > Xfast_syscall() at Xfast_syscall+0xdd > > --- syscall (0), rip = 0x20069afdc, rsp = 0x7fffffffe8a8, rbp = > > This should be fixed in HEAD as kseq_assign() now calls sched_add_internal() > which no longer recursively mi_switch()'s. Well I'm not getting far enough to see if the patch works..... SMAP type=01 base=0000000000000000 len=00000000000a0000 SMAP type=02 base=00000000000f0000 len=0000000000010000 SMAP type=02 base=00000000fec00000 len=0000000001400000 SMAP type=02 base=000000007fef0000 len=0000000000010000 SMAP type=01 base=0000000000100000 len=000000007fde0000 SMAP type=03 base=000000007fee3000 len=000000000000d000 SMAP type=04 base=000000007fee0000 len=0000000000003000 Copyright (c) 1992-2004 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 5.2-CURRENT #60: Tue Jul 13 00:58:57 CEST 2004 root@opteron.digiware.nl:/usr/obj/home2/src/sys/OPTERON.amd64 WARNING: WITNESS option enabled, expect reduced performance. WARNING: DIAGNOSTIC option enabled, expect reduced performance. Preloaded elf kernel "/boot/kernel/kernel" at 0xffffffff806c7000. Calibrating clock(s) ... i8254 clock: 1193255 Hz CLK_USE_I8254_CALIBRATION not specified - using default frequency Timecounter "i8254" frequency 1193182 Hz quality 0 Calibrating TSC clock ... TSC clock: 1603650609 Hz CPU: AMD Opteron(tm) Processor 242 (1603.65-MHz K8-class CPU) Origin = "AuthenticAMD" Id = 0xf51 Stepping = 1 Features=0x78bfbff AMD Features=0xe0500800 L1 2MB data TLB: 8 entries, fully associative L1 2MB instruction TLB: 8 entries, fully associative L1 4KB data TLB: 32 entries, fully associative L1 4KB instruction TLB: 32 entries, fully associative L1 data cache: 64 kbytes, 64 bytes/line, 1 lines/tag, 2-way associative L1 instruction cache: 64 kbytes, 64 bytes/line, 1 lines/tag, 2-way associative L2 2MB unified TLB: 0 entries, disabled/not present L2 4KB data TLB: 512 entries, 4-way associative L2 4KB instruction TLB: 512 entries, 4-way associative L2 unified cache: 1024 kbytes, 64 bytes/line, 1 lines/tag, 16-way associative real memory = 2146304000 (2046 MB) Physical memory chunk(s): 0x0000000000001000 - 0x000000000009cfff, 638976 bytes (156 pages) 0x000000000074d000 - 0x000000007c2b7fff, 2075570176 bytes (506731 pages) avail memory = 2062815232 (1967 MB) ACPI APIC Table: panic: AP #1 (PHY# 1) failed! cpuid = 0; Uptime: 1s panic: kthread_create called too soon cpuid = 0; Uptime: 1s panic: Assertion mtx_unowned(m) failed at /home2/src/sys/kern/kern_mutex.c:859 cpuid = 0; Uptime: 1s And this last panic is repeated at nausium.... But the problem is of course in the fact that: ---- ACPI APIC Table: panic: AP #1 (PHY# 1) failed! ---- Any suggestions on how to improve this? Note again, under i386 I'm ver able to boot 2 processors. --WjW