NetBSD Problem Report #44078

From jreiser@NetBSD32.local  Wed Nov 10 16:32:13 2010
Return-Path: <jreiser@NetBSD32.local>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 8BA5763BA61
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 10 Nov 2010 16:32:13 +0000 (UTC)
Message-Id: <20101110001017.C258F1CA34D@NetBSD32.local>
Date: Tue,  9 Nov 2010 16:10:17 -0800 (PST)
From: jreiser@BitWagon.com
Reply-To: jreiser@BitWagon.com
To: gnats-bugs@gnats.NetBSD.org
Subject: port-i386 crash to BIOS on demand from user mode SIGTRAP
X-Send-Pr-Version: 3.95

>Number:         44078
>Category:       port-i386
>Synopsis:       i386 crash to BIOS on demand from user mode SIGTRAP
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-i386-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 10 16:35:00 +0000 2010
>Closed-Date:    Sat Dec 19 02:34:34 +0000 2015
>Last-Modified:  Sat Dec 19 02:34:34 +0000 2015
>Originator:     John Reiser
>Release:        NetBSD 5.0.2
>Organization:
BitWagon Software LLC
>Environment:
System: NetBSD NetBSD32.local 5.0.2 NetBSD 5.0.2 (GENERIC) #0: Sat Feb 6 17:53:27 UTC 2010 builds@b7.netbsd.org:/home/builds/ab/netbsd-5-0-2-RELEASE/i386/201002061851Z-obj/home/builds/ab/netbsd-5-0-2-RELEASE/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386 (amd64 in i386 mode)
>Description:
	Executing a 3-instruction program causes a crash to BIOS about 70%
	of the time.  The other 30% the shell reports "SIGTRAP - core dumped"
	which is correct.  Sometimes gdb catches the SIGTRAP and reports pc
	== 0x80010033 with sp==0x0, despite no pages mapped at either address.
	Machine is amd64 running in i386 mode:
	processor	: 0
	vendor_id	: AuthenticAMD
	cpu family	: 15
	model		: 15
	model name	: AMD Athlon(tm) 64 Processor 3200+
	stepping	: 2
	cpu MHz		: 2010.35
	fdiv_bug	: no
	fpu		: yes
	fpu_exception	: yes
	cpuid level	: 1
	wp		: yes
	flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 

>How-To-Repeat:
----- file nop.S
_start: .globl _start
	nop
	int3
	nop
-----
$ gcc -o nop -nostartfiles -nostdlib nop.S
$ ./nop
>Fix:

>Release-Note:

>Audit-Trail:
From: David Laight <david@l8s.co.uk>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/44078: port-i386 crash to BIOS on demand from user mode SIGTRAP
Date: Wed, 10 Nov 2010 18:33:40 +0000

 On Wed, Nov 10, 2010 at 04:35:00PM +0000, jreiser@BitWagon.com wrote:
 > >Number:         44078
 > >Category:       port-i386
 > >Synopsis:       i386 crash to BIOS on demand from user mode SIGTRAP

 Can you try this on 'current' ?
 (also try 44079)

 	David

 -- 
 David Laight: david@l8s.co.uk

From: John Reiser <jreiser@bitwagon.com>
To: gnats-bugs@NetBSD.org
Cc: David Laight <david@l8s.co.uk>, port-i386-maintainer@netbsd.org, 
 gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: port-i386/44078: port-i386 crash to BIOS on demand from user
 mode SIGTRAP
Date: Wed, 10 Nov 2010 13:49:27 -0800

 On 11/10/2010 10:30 AM, David Laight wrote:
 >  On Wed, Nov 10, 2010 at 04:35:00PM +0000, jreiser@BitWagon.com wrote:
 >  > >Number:         44078
 >  > >Category:       port-i386
 >  > >Synopsis:       i386 crash to BIOS on demand from user mode SIGTRAP
 >  
 >  Can you try this on 'current' ?

 The test case executes correctly (does not crash the system) when run under:
 NetBSD NetBSD32.local 5.1 NetBSD 5.1 (GENERIC) #0: Sun Nov  7 14:39:56 UTC 2010  builds@b6.netbsd.org:/home/builds/ab/netbsd-5-1-RELEASE/i386/201011061943Z-obj/home/builds/ab/netbsd-5-1-RELEASE/src/sys/arch/i386/compile/GENERIC i386
 which I obtained from  ftp://iso.netbsd.org/pub/NetBSD/iso/5.1/i386cd-5.1.iso

 The output I see is:
 -----
 [1]   Trace/BPT trap (core dumped) ./nop
 -----
 and file 'nop.core' is created and is a relevant "core" file.

 -- 

From: David Laight <david@l8s.co.uk>
To: 
Cc: gnats-bugs@NetBSD.org
Subject: Re: port-i386/44078: port-i386 crash to BIOS on demand from user mode SIGTRAP
Date: Wed, 10 Nov 2010 22:16:47 +0000

 On Wed, Nov 10, 2010 at 01:49:27PM -0800, John Reiser wrote:
 > On 11/10/2010 10:30 AM, David Laight wrote:
 > >  On Wed, Nov 10, 2010 at 04:35:00PM +0000, jreiser@BitWagon.com wrote:
 > >  > >Number:         44078
 > >  > >Category:       port-i386
 > >  > >Synopsis:       i386 crash to BIOS on demand from user mode SIGTRAP
 > >  
 > >  Can you try this on 'current' ?
 > 
 > The test case executes correctly (does not crash the system) when run under:
 > NetBSD NetBSD32.local 5.1 NetBSD 5.1 (GENERIC) #0: Sun Nov  7 14:39:56 UTC 2010  builds@b6.netbsd.org:/home/builds/ab/netbsd-5-1-RELEASE/i386/201011061943Z-obj/home/builds/ab/netbsd-5-1-RELEASE/src/sys/arch/i386/compile/GENERIC i386
 > which I obtained from  ftp://iso.netbsd.org/pub/NetBSD/iso/5.1/i386cd-5.1.iso
 > 
 > The output I see is:
 > -----
 > [1]   Trace/BPT trap (core dumped) ./nop
 > -----
 > and file 'nop.core' is created and is a relevant "core" file.
 > 
 > -- 

 In which case this was probably fixed by the changes done to fix
 faults in kernel during 'return to user'.

 I think the changes were pulled up to 5.1.
 Not sure whether it is worth applying them to the 5.0 branch.

 	David

 -- 
 David Laight: david@l8s.co.uk

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 19 Dec 2015 02:34:34 +0000
State-Changed-Why:
Problem only affected 5.0.x, which was EOL'd some time ago.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.