From owner-freebsd-sparc64@FreeBSD.ORG Mon Aug 22 06:21:49 2005 Return-Path: X-Original-To: freebsd-sparc64@freebsd.org Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F0F9016A41F for ; Mon, 22 Aug 2005 06:21:49 +0000 (GMT) (envelope-from pyunyh@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 338D343D46 for ; Mon, 22 Aug 2005 06:21:48 +0000 (GMT) (envelope-from pyunyh@gmail.com) Received: by wproxy.gmail.com with SMTP id i4so919619wra for ; Sun, 21 Aug 2005 23:21:44 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=KDD9Zk3Y6F/xG0RfCUx12Q3ZSl5duYtlGoyB3LguxdQPlUJM8POOnMFM8ib8KxIs2diUuEAyc8T0kO36cX0y5Nujawx+psSiunHZUERok0LlQT53wPoyn+tZn/zVwqkCyYi2Fx4GiXIMkE08EeADtYuxH/SQ81kMBEWezrW6/2E= Received: by 10.54.56.37 with SMTP id e37mr1257044wra; Sun, 21 Aug 2005 23:21:44 -0700 (PDT) Received: from michelle.rndsoft.co.kr ([211.32.202.209]) by mx.gmail.com with ESMTP id 7sm1418371wrl.2005.08.21.23.21.43; Sun, 21 Aug 2005 23:21:44 -0700 (PDT) Received: from michelle.rndsoft.co.kr (localhost.rndsoft.co.kr [127.0.0.1]) by michelle.rndsoft.co.kr (8.13.1/8.13.1) with ESMTP id j7M6IIUa002076 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 22 Aug 2005 15:18:18 +0900 (KST) (envelope-from yongari@rndsoft.co.kr) Received: (from yongari@localhost) by michelle.rndsoft.co.kr (8.13.1/8.13.1/Submit) id j7M6IEoG002075; Mon, 22 Aug 2005 15:18:14 +0900 (KST) (envelope-from yongari@rndsoft.co.kr) Date: Mon, 22 Aug 2005 15:18:14 +0900 From: Pyun YongHyeon To: John Baldwin Message-ID: <20050822061813.GA712@rndsoft.co.kr> References: <200508110931.13802.john@jnielsen.net> <20050819043026.GC10519@rndsoft.co.kr> <200508190217.15943.john@jnielsen.net> <200508201453.40439.jhb@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200508201453.40439.jhb@FreeBSD.org> User-Agent: Mutt/1.4.2.1i Cc: John Nielsen , freebsd-sparc64@FreeBSD.org Subject: Re: "fast data access mmu miss" on kernels w/o "makeoptions DEBUG=-g" X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2005 06:21:50 -0000 On Sat, Aug 20, 2005 at 02:53:39PM -0400, John Baldwin wrote: > On Friday 19 August 2005 02:17 am, John Nielsen wrote: > > On Friday 19 August 2005 12:30 am, Pyun YongHyeon wrote: > > > On Thu, Aug 18, 2005 at 09:24:58AM -0400, John Nielsen wrote: > > > > On Wednesday 17 August 2005 16:59, Marius Strobl wrote: > > > > > On Mon, Aug 15, 2005 at 10:42:36AM -0400, John Nielsen wrote: > > > > > > On Friday 12 August 2005 00:53, Andrew Belashov wrote: > > > > > > > John Nielsen wrote: > > > > > > > > Can anyone say why removing "makeoptions DEBUG=-g" from a > > > > > > > > kernel would make it unreliable? I'm on an Ultra 5, and it's > > > > > > > > quite stable with either GENERIC or the kernel specified > > > > > > > > below. However, commenting out the "makeoptions DEBUG=-g" > > > > > > > > line builds a kernel that boots but then panics right after > > > > > > > > mounting /: > > > > > > > > > > > > > > > > Entropy harvesting: interrupts ethernet point_to_pointpanic: > > > > > > > > trap: fast data access mmu miss > > > > > > > > Uptime:2s > > > > > > > > Dumping 512 MB (2 chunks) > > > > > > > > > > > > > > Try to clean rebuild kernel (remove build directory > > > > > > > /usr/obj/usr/src/sys/KERNCONF or /sys/compile/KERNCONF). > > > > > > > > > > > > No change even after a fresh buildworld (using RELENG_6): > > > > > > > > > > > > cvsup /etc/supfile-src && rm -r /usr/obj/* && cd /usr/src && make > > > > > > make && make clean && make cleandir && make cleandir && make > > > > > > buildworld && make buildkernel && make installkernel && make > > > > > > installworld && mergemaster > > > > > > > > > > > > I don't mind leaving the option in the kernel, but it does seem > > > > > > like a strange bug. Let me know if anyone has any other ideas. > > > > > > Thanks, > > > > > > > > > > When the DEBUG make option is defined the compiler optimization > > > > > flags (COPTFLAGS) default to '-O -pipe' whereas without DEBUG the > > > > > default is '-O2 -pipe' ('-O2' can cause bogus stack traces so it's > > > > > not the default for debugging kernels). So in case you also get a > > > > > panic with a kernel having both: > > > > > makeoptions DEBUG=-g > > > > > and: > > > > > makeoptions COPTFLAGS="-O2 -pipe" > > > > > this probably means that there's bogus code that breaks at higher > > > > > optimization levels or a compiler bug. A stack trace from such a > > > > > panic might help to track this down in case it's not screwed due > > > > > to the '-O2'. > > > > > > > > That's what it was. A kernel with only > > > > makeoptions COPTFLAGS="-O -pipe" > > > > builds and runs just fine. > > > > > > Are you sure that GENERIC kernel panics too? > > > I couldn't verify it(I'm on a business trip) but I guess you should > > > remove smbfs related kernel options. smbfs never worked on sparc64 > > > and it needs more clean up on various places. > > > If you encounter the panic again would you post stack traces? > > > > Yes, I built about 20 kernels trying to track it down, including GENERIC > > sans makeoptions DEBUG=-g (but with WITNESS, etc). > > > > I haven't actually tried to use SMBFS yet, but simply having it in the > > kernel doesn't seem to be affecting anything. > > > > I'll see if I can get a stacktrace from an existing dump. > > My ultra60 won't boot a kernel that doesn't have WITNESS in it FWIW. Try a > stock GENERIC kernel and see if it works. You can disable witness with the > loader tunable 'debug.witness.watch=0'. > GENERIC kernel without WITNESS/DEBUG works here on U60(CURRENT). But loading libiconv.ko or linking kernel with "options LIBICONV" I got the panic in the following code path. panic: trap: fast data access mmu miss panic messages: --- panic: trap: fast data access mmu miss cpuid = 0 KDB: enter: panic Dumping 512 MB (1 chunks) chunk at 0xa0000000: 536870912 bytes |\^H --- #0 0x00000000c018730c in doadump () (kgdb) bt #0 0x00000000c018730c in doadump () #1 0x00000000c00736e0 in db_fncall () #2 0x00000000c00738e4 in db_command_loop () #3 0x00000000c0076328 in db_trap () #4 0x00000000c01a98e4 in kdb_trap () #5 0x00000000c034e8a8 in trap () #6 0x00000000c01a92f8 in kdb_enter () #7 0x00000000c01a92f0 in kdb_enter () #8 0x00000000c018822c in panic () #9 0x00000000c034e7c4 in trap () #10 0x00000000c02082a0 in strlcpy () #11 0x00000000c0205c9c in iconv_sysctl_drvlist () #12 0x00000000c0192044 in sysctl_root () #13 0x00000000c019239c in userland_sysctl () #14 0x00000000c019251c in __sysctl () #15 0x00000000c034ec28 in syscall () (kgdb) This trace is somewhat different in ddb. But I believe gdb53's trace is correct. I can reliably panic the system with "sysctl kern.random" command after loading libiconv.ko module. So I guess something is wrong in iconv. -- Regards, Pyun YongHyeon