From owner-freebsd-smp@FreeBSD.ORG Sat Dec 13 13:56:29 2003 Return-Path: Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A99EC16A50F; Sat, 13 Dec 2003 13:56:29 -0800 (PST) Received: from artax.karlin.mff.cuni.cz (artax.karlin.mff.cuni.cz [195.113.31.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id F167C43E36; Sat, 13 Dec 2003 13:53:37 -0800 (PST) (envelope-from mikulas@artax.karlin.mff.cuni.cz) Received: by artax.karlin.mff.cuni.cz (Postfix, from userid 17421) id E69B63F0C; Sat, 13 Dec 2003 22:53:31 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by artax.karlin.mff.cuni.cz (Postfix) with ESMTP id E61F73EA8; Sat, 13 Dec 2003 22:53:31 +0100 (CET) Date: Sat, 13 Dec 2003 22:53:31 +0100 (CET) From: Mikulas Patocka To: freebsd-hackers@freebsd.org In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-smp@freebsd.org Subject: Re: Hyperthreading crashes X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2003 21:56:30 -0000 > Hi > > I use FreeBSD-4.9-RC1 on a machine with hyperthreading (it seems that > hyperthreading support was ripped out of final 4.9 release --- why?) > > I get random SIGBUSes when compiling (once I got SIGSEGV too). When I > compile only with make -j 1, I get no errors. Is it known problem with > FreeBSD? Or does it mean that the machine is bad? > > How can I find what's the reason for particular SIGBUS signal --- what did > the program wrong? I found that it is caused by bogus aligment exceptions, when i modified the kernel this way, it works (and programs don't crash): Does anybody have a clue why this happens? --- ../sys-49/i386/i386/trap.c Thu Feb 27 19:09:59 2003 +++ i386/i386/trap.c Sat Dec 13 22:33:48 2003 @@ -290,6 +290,11 @@ type = frame.tf_trapno; code = frame.tf_err; + if (type == T_ALIGNFLT) { + printf("Bogus alignment check exception!\n"); + return; + } + if (in_vm86call) { if (frame.tf_eflags & PSL_VM && (type == T_PROTFLT || type == T_STKFLT)) { Mikulas