NetBSD Problem Report #43842

From njoly@lanfeust.sis.pasteur.fr  Mon Sep  6 12:38:33 2010
Return-Path: <njoly@lanfeust.sis.pasteur.fr>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 6006863BC7D
	for <gnats-bugs@gnats.NetBSD.org>; Mon,  6 Sep 2010 12:38:33 +0000 (UTC)
Message-Id: <20100906123830.7C5C6DC9BB@lanfeust.sis.pasteur.fr>
Date: Mon,  6 Sep 2010 14:38:30 +0200 (CEST)
From: njoly@pasteur.fr
Reply-To: njoly@pasteur.fr
To: gnats-bugs@gnats.NetBSD.org
Subject: KASSERT when running tests under compat_netbsd32
X-Send-Pr-Version: 3.95

>Number:         43842
>Category:       port-amd64
>Synopsis:       KASSERT when running tests under compat_netbsd32
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-amd64-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 06 12:40:00 +0000 2010
>Closed-Date:    Wed Jan 26 21:53:03 +0000 2011
>Last-Modified:  Wed Jan 26 21:53:03 +0000 2011
>Originator:     Nicolas Joly
>Release:        NetBSD 5.99.39
>Organization:
Institut Pasteur
>Environment:
System: NetBSD lanfeust.sis.pasteur.fr 5.99.39 NetBSD 5.99.39 (LANFEUST) #15: Mon Sep 6 11:41:09 CEST 2010 njoly@lanfeust.sis.pasteur.fr:/local/src/NetBSD/obj.amd64/sys/arch/amd64/compile/LANFEUST amd64
Architecture: x86_64
Machine: amd64
>Description:
Running NetBSD tests in a i386 chroot generate a KASSERT.

njoly@lanfeust [~]> chroot -u njoly -g users /misc/chroot/netbsd32 ksh
njoly@lanfeust [netbsd32:njoly]> cd /usr/tests
njoly@lanfeust [netbsd32:tests]> atf-run | atf-report                          
[...]
fs/msdosfs/t_snapshot (74/244): 1 test cases
    snapshot: Passed.

fs/nfs/t_mountd (75/244): 1 test cases
    mountdhup: 
[...PANIC...]

panic: kernel diagnostic assertion "error == 0" failed: file "/local/src/NetBSD/
src/sys/arch/amd64/amd64/netbsd32_machdep.c", line 943
fatal breakpoint trap in supervisor mode
trap type 1 code 0 rip ffffffff8022b28d cs 8 rflags 246 cr2  fbc9e790 cpl 0 rsp
ffff80004a81fb40
Stopped in pid 5562.20 (t_mountd) at    netbsd:breakpoint+0x5:  leave
db{0}> bt
breakpoint() at netbsd:breakpoint+0x5
panic() at netbsd:panic+0x2ba
kern_assert() at netbsd:kern_assert+0x2d
startlwp32() at netbsd:startlwp32+0x92

While this one is consistently triggered with atf-run, there is no problem
when the test program is launched directly.

njoly@lanfeust [~]> export LD_LIBRARY_PATH=/misc/chroot/netbsd32/usr/lib
njoly@lanfeust [~]> /misc/chroot/netbsd32/usr/tests/fs/nfs/t_mountd mountdhup
rumpnfsd: Cannot get information for `udp6'
rumpnfsd: Cannot get information for `tcp6'
rpcbind debugging enabled.
[...]
doing opt -maproot=0:0
Adding a default entry
Got line 
expected_failure: PR kern/5844: op failed with EACCES

>How-To-Repeat:
Run tests in a netbsd i386 chroot.
>Fix:

>Release-Note:

>Audit-Trail:
From: "Nicolas Joly" <njoly@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/43842 CVS commit: src/sys/arch/amd64/amd64
Date: Wed, 26 Jan 2011 21:44:32 +0000

 Module Name:	src
 Committed By:	njoly
 Date:		Wed Jan 26 21:44:32 UTC 2011

 Modified Files:
 	src/sys/arch/amd64/amd64: netbsd32_machdep.c

 Log Message:
 Do mask the upper 16 bits, when sanity checking fs/gs register values.
 Fix my own PR/43842.


 To generate a diff of this commit:
 cvs rdiff -u -r1.68 -r1.69 src/sys/arch/amd64/amd64/netbsd32_machdep.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: njoly@NetBSD.org
State-Changed-When: Wed, 26 Jan 2011 21:53:03 +0000
State-Changed-Why:
Fixed.


>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.