NetBSD Problem Report #53791

From www@NetBSD.org  Sun Dec 16 01:40:27 2018
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 25FA67A1A9
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 16 Dec 2018 01:40:27 +0000 (UTC)
Message-Id: <20181216014025.9EC077A1E8@mollari.NetBSD.org>
Date: Sun, 16 Dec 2018 01:40:25 +0000 (UTC)
From: venture37@geeklan.co.uk
Reply-To: venture37@geeklan.co.uk
To: gnats-bugs@NetBSD.org
Subject: System lands in ddb due to CPU error when running lib/libc/gen/t_fpsetmask ATF test
X-Send-Pr-Version: www-1.0

>Number:         53791
>Category:       port-sgimips
>Synopsis:       System lands in ddb due to CPU error when running lib/libc/gen/t_fpsetmask ATF test
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-sgimips-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 16 01:45:00 +0000 2018
>Closed-Date:    Sun Dec 16 02:48:11 +0000 2018
>Last-Modified:  Tue Dec 25 11:25:01 +0000 2018
>Originator:     Sevan Janiyan
>Release:        
>Organization:
>Environment:
NetBSD 8.99.27 sgimips mipseb
>Description:
lib/libc/gen/t_fpsetmask (136/760): 7 test cases
    fpsetmask_basic: [0.115081s] Passed.
    fpsetmask_masked_double: [0.111482s] Passed.
    fpsetmask_masked_float: [0.111522s] Passed.
    fpsetmask_masked_long_double: [0.111414s] Passed.
    fpsetmask_unmasked_double: pid 7183(t_fpsetmask): trap: cpu0, address error (load or I-fetch) in kernel mode
[ 5379.5860163] status=0x2000ff03, cause=0x10, epc=0x80430654, vaddr=0x4622012e
[ 5379.5860163] tf=0x80b85ce8 ksp=0x80b85d88 ra=0x800855fc ppl=0x7ddf9b7c
[ 5379.5860163] kernel: address error (load or I-fetch) trap
Stopped in pid 7183.1 (t_fpsetmask) at  netbsd:pcu_save+0x10:   lw      v0,4(v0)

db> bt
0x80b85d88: pcu_save+10 (80527cb0,46220002,2108,800861e8) ra 800855fc sz 0
0x80b85d88: mips_emul_fp+205c (80527cb0,80b85f60,3c,800861e8) ra 800694c0 sz 24
0x80b85da0: mips_fpu_intr+c8 (80527cb0,80b85f60,3c,800861e8) ra 8007a8e0 sz 24
0x80b85db8: trap+610 (80527cb0,1,3c,10fa0) ra 80071db8 sz 400
0x80b85f48: mips3_user_gen_exception+d8 (80527cb0,1,3c,10fa0) ra 0 sz 0
User-level: pid 7183.1
db> cont
panic: utlbmod: 0x4622012e: no pte
[ 5379.5860163] cpu0: Begin traceback...
[ 5379.5860163] pid -2135401792 not found
[ 5379.5860163] cpu0: End traceback...

[ 5379.5860163] dumping to dev 10,1 offset 147437

>How-To-Repeat:
Run the atf test suite on sgimips
>Fix:

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: sevan@NetBSD.org
State-Changed-When: Sun, 16 Dec 2018 02:48:11 +0000
State-Changed-Why:
This is a duplicate of port-cobalt/53090, albeit with more detail in output.


From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53791 CVS commit: src/sys/arch/mips/mips
Date: Wed, 19 Dec 2018 15:10:46 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Wed Dec 19 15:10:46 UTC 2018

 Modified Files:
 	src/sys/arch/mips/mips: fp.S

 Log Message:
 Load curlwp into a0 to call fpu_save(curlwp), not fpu_save(garbage).

 The lwp argument to fpu_save was added by chuq in revision 1.14 of
 mips_fpu.c, but this call was not updated to pass it.  This is the
 correct lwp to pass because we are in the middle of executing a
 kernel-emulated fp instruction, so curlwp must own the fpu state, and
 we are trying to write the fp registers to memory so we can adjust
 them there when ctc1 would fail.

 Fixes PR port-cobalt/53090, PR port-sgimips/53791.


 To generate a diff of this commit:
 cvs rdiff -u -r1.48 -r1.49 src/sys/arch/mips/mips/fp.S

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

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53791 CVS commit: [netbsd-8] src/sys/arch/mips/mips
Date: Tue, 25 Dec 2018 11:22:43 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Tue Dec 25 11:22:43 UTC 2018

 Modified Files:
 	src/sys/arch/mips/mips [netbsd-8]: fp.S

 Log Message:
 Pull up following revision(s) (requested by sevan in ticket #1143):

 	sys/arch/mips/mips/fp.S: revision 1.49

 Load curlwp into a0 to call fpu_save(curlwp), not fpu_save(garbage).

 The lwp argument to fpu_save was added by chuq in revision 1.14 of
 mips_fpu.c, but this call was not updated to pass it.  This is the
 correct lwp to pass because we are in the middle of executing a
 kernel-emulated fp instruction, so curlwp must own the fpu state, and
 we are trying to write the fp registers to memory so we can adjust
 them there when ctc1 would fail.

 Fixes PR port-cobalt/53090, PR port-sgimips/53791.


 To generate a diff of this commit:
 cvs rdiff -u -r1.48 -r1.48.6.1 src/sys/arch/mips/mips/fp.S

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

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.