NetBSD Problem Report #54734

From gson@gson.org  Wed Dec  4 08:14:57 2019
Return-Path: <gson@gson.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 76E9D7A180
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  4 Dec 2019 08:14:57 +0000 (UTC)
Message-Id: <20191204081451.B0AF6253F37@guava.gson.org>
Date: Wed,  4 Dec 2019 10:14:51 +0200 (EET)
From: gson@gson.org (Andreas Gustafsson)
Reply-To: gson@gson.org (Andreas Gustafsson)
To: gnats-bugs@NetBSD.org
Subject: sparc panics running ATF tests
X-Send-Pr-Version: 3.95

>Number:         54734
>Category:       port-sparc
>Synopsis:       sparc panics running ATF tests
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    ad
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 04 08:15:00 +0000 2019
>Closed-Date:    Wed May 20 11:02:11 +0000 2020
>Last-Modified:  Mon May 25 17:15:02 +0000 2020
>Originator:     Andreas Gustafsson
>Release:        NetBSD-current
>Organization:

>Environment:
System: NetBSD
Architecture: sparc
Machine: sparc
>Description:

As of source date 2019.12.03.16.45.21, NetBSD-current/sparc panics
while running the ATF tests.  For example,

  http://www.gson.org/netbsd/bugs/build/sparc/2019/2019.12.03.16.45.21/test.log

contains:

  lib/libc/sys/t_getrusage (278/844): 6 test cases
      getrusage_err: [0.051956s] Passed.
      getrusage_maxrss: [ 2459.5996110] panic: TAILQ_PREREMOVE head 0xf0002008 elm 0xf075b040 /tmp/bracket/build/2019.12.03.16.45.21-sparc/src/sys/kern/kern_sleepq.c:112
  [ 2459.5996110] cpu0: Begin traceback...
  [ 2459.5996110] 0x0(0xf04536c0, 0xf53eec20, 0xf054cc00, 0xf054dc00, 0x104, 0xf054dbc8) at netbsd:panic+0x20
  [ 2459.5996110] panic(0xf04536c0, 0xf0002008, 0xf075b040, 0xf049ca60, 0x70, 0xf0756d90) at netbsd:sleepq_remove+0x21c
  [ 2459.5996110] sleepq_remove(0xf0002008, 0xf075b040, 0xf084e3a0, 0xf049a400, 0x206, 0xf075b040) at netbsd:cv_wakeup_one+0x80
  [ 2459.5996110] cv_wakeup_one(0xf0002008, 0x0, 0xf0525bdc, 0xf049a400, 0xf0756d90, 0xf075b040) at netbsd:xc_broadcast+0x1ec
  [ 2459.5996110] xc_broadcast(0x0, 0x40, 0x1, 0xf0531f78, 0x0, 0xf0531480) at netbsd:xc_barrier+0x14
  [ 2459.5996110] xc_barrier(0x0, 0xf0c75d20, 0xf084e3a0, 0xf049a400, 0x20e, 0x7c) at netbsd:pool_cache_invalidate_groups+0x5c
  [ 2459.5996110] pool_cache_invalidate_groups(0xf07066e0, 0xf08674e0, 0xf0bed470, 0xf08674ec, 0xf0c75d20, 0x0) at netbsd:pool_cache_invalidate+0xa4
  [ 2459.5996110] pool_cache_invalidate(0xf07066e0, 0xf0afb300, 0xf084e3a0, 0xf04a2800, 0xf08674e0, 0x0) at netbsd:pool_reclaim+0x64
  [ 2459.5996110] pool_reclaim(0xf07066e0, 0x0, 0xf0706754, 0xf049a400, 0xf084e3a0, 0xf071c2a0) at netbsd:pool_drain+0x6c
  [ 2459.5996110] pool_drain(0x0, 0xf0549034, 0x0, 0xf0526800, 0xf054d400, 0xf07066e0) at netbsd:uvmpd_pool_drain_thread+0x90
  [ 2459.5996110] uvmpd_pool_drain_thread(0xf0522348, 0xf0548130, 0xf052cd40, 0xf05511f0, 0xf0549034, 0x0) at netbsd:lwp_trampoline+0x8
  [ 2459.5996110] cpu0: End traceback...
  [ 2459.5996110] Frame pointer is at 0xf53eea38
  [ 2459.5996110] Call traceback:
  [ 2459.5996110]	  pc = 0xf002cd4c  args = (0xf0478f00, 0x0, 0xfff4, 0xf0457398, 0xf03134ec, 0xf052c000) fp = 0xf53eeaa8
  [ 2459.5996110]	  pc = 0xf03137bc  args = (0x104, 0x0, 0xf04536c0, 0xf53eec20, 0xf0549c00, 0x0) fp = 0xf53eeb10
  [ 2459.5996110]	  pc = 0xf0313868  args = (0xf04536c0, 0xf53eec20, 0xf054cc00, 0xf054dc00, 0x104, 0xf054dbc8) fp = 0xf53eeb70
  [ 2459.5996110]	  pc = 0xf02e0370  args = (0xf04536c0, 0xf0002008, 0xf075b040, 0xf049ca60, 0x70, 0xf0756d90) fp = 0xf53eebd8
  [ 2459.5996110]	  pc = 0xf02abea8  args = (0xf0002008, 0xf075b040, 0xf084e3a0, 0xf049a400, 0x206, 0xf075b040) fp = 0xf53eec38
  [ 2459.5996110]	  pc = 0xf031e0c0  args = (0xf0002008, 0x0, 0xf0525bdc, 0xf049a400, 0xf0756d90, 0xf075b040) fp = 0xf53eec98
  [ 2459.5996110]	  pc = 0xf031e204  args = (0x0, 0x40, 0x1, 0xf0531f78, 0x0, 0xf0531480) fp = 0xf53eecf8
  [ 2459.5996110]	  pc = 0xf030fb48  args = (0x0, 0xf0c75d20, 0xf084e3a0, 0xf049a400, 0x20e, 0x7c) fp = 0xf53eed58
  [ 2459.5996110]	  pc = 0xf0310b74  args = (0xf07066e0, 0xf08674e0, 0xf0bed470, 0xf08674ec, 0xf0c75d20, 0x0) fp = 0xf53eedb8
  [ 2459.5996110]	  pc = 0xf0310c30  args = (0xf07066e0, 0xf0afb300, 0xf084e3a0, 0xf04a2800, 0xf08674e0, 0x0) fp = 0xf53eee18
  [ 2459.5996110]	  pc = 0xf0311048  args = (0xf07066e0, 0x0, 0xf0706754, 0xf049a400, 0xf084e3a0, 0xf071c2a0) fp = 0xf53eee90
  [ 2459.5996110]	  pc = 0xf0296b6c  args = (0x0, 0xf0549034, 0x0, 0xf0526800, 0xf054d400, 0xf07066e0) fp = 0xf53eeef0
  [ 2459.5996110]	  pc = 0xf000a194  args = (0xf0522348, 0xf0548130, 0xf052cd40, 0xf05511f0, 0xf0549034, 0x0) fp = 0xf53eef50
  [ 2459.5996110]	  pc = 0x0  args = (0x0, 0x0, 0x0, 0x0, 0x0, 0x0) fp = 0x0

  [ 2459.5996110] dumping to dev 7,1 offset 164063
  [ 2459.5996110] dump succeeded
  [ 2459.5996110] rebooting

The crashes started some time during the period of build breakage that
started with:

  commit 2019.12.01.14.28.01 ad src/sys/uvm/uvm_init.c 1.50
  commit 2019.12.01.14.30.01 ad src/sys/uvm/uvm_fault.c 1.211

and ended with:

  commit 2019.12.01.23.14.47 uwe src/sys/uvm/uvm_anon.c 1.67
  commit 2019.12.01.23.14.47 uwe src/sys/uvm/uvm_km.c 1.150
  commit 2019.12.01.23.14.47 uwe src/sys/uvm/uvm_pager.c 1.113
  commit 2019.12.01.23.14.47 uwe src/sys/uvm/uvm_swap.c 1.183

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: port-sparc-maintainer->ad
Responsible-Changed-By: ad@NetBSD.org
Responsible-Changed-When: Sun, 12 Jan 2020 22:08:42 +0000
Responsible-Changed-Why:
been looking at this today


From: Andrew Doran <ad@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-sparc/54734 (sparc panics running ATF tests)
Date: Wed, 22 Jan 2020 21:53:43 +0000

 access_regs_set_unaligned_pc_0x1: [0.225264s] Passed.
 access_regs_set_unaligned_pc_0x3: qemu: fatal: Trap 0x07 while interrupts disabled, Error state
 pc: f00095b8  npc: f00095bc
 %g0-7: 00000000 00000d3e 30beb38e 30800000 007ace38 00028f74 00000000 ede4ab58
 %o0-7: f0002000 f895ffb0 edd425d4 f045a8f0 f045a8e0 f14058c0 f895ff50 f0008834
 %l0-7: 04400082 00028f77 00028f7b 00000fc1 00000008 00000002 f895e000 00000528
 %i0-7: 00000000 00000000 00000000 00000000 edd98b58 00000000 effff528 00028f6c
 %f00:  ffffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff
 %f08:  ffffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff
 %f16:  ffffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff
 %f24:  ffffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff
 psr: 04400082 (icc: -Z-- SPE: S--) wim: 00000010
 fsr: 0f800000 y: 0e66726b

 [1]   Abort trap (core dumped) qemu-system-sparc -m 128 -drive file=/ccd/spar...

From: Kamil Rytarowski <n54@gmx.com>
To: gnats-bugs@netbsd.org, Andrew Doran <ad@netbsd.org>
Cc: 
Subject: Re: port-sparc/54734 (sparc panics running ATF tests)
Date: Fri, 24 Jan 2020 22:58:58 +0100

 On 22.01.2020 22:55, Andrew Doran wrote:
 > The following reply was made to PR port-sparc/54734; it has been noted b=
 y GNATS.
 >
 > From: Andrew Doran <ad@netbsd.org>
 > To: gnats-bugs@netbsd.org
 > Cc:
 > Subject: Re: port-sparc/54734 (sparc panics running ATF tests)
 > Date: Wed, 22 Jan 2020 21:53:43 +0000
 >
 >  access_regs_set_unaligned_pc_0x1: [0.225264s] Passed.
 >  access_regs_set_unaligned_pc_0x3: qemu: fatal: Trap 0x07 while interrup=
 ts disabled, Error state
 >  pc: f00095b8  npc: f00095bc
 >  %g0-7: 00000000 00000d3e 30beb38e 30800000 007ace38 00028f74 00000000 e=
 de4ab58
 >  %o0-7: f0002000 f895ffb0 edd425d4 f045a8f0 f045a8e0 f14058c0 f895ff50 f=
 0008834
 >  %l0-7: 04400082 00028f77 00028f7b 00000fc1 00000008 00000002 f895e000 0=
 0000528
 >  %i0-7: 00000000 00000000 00000000 00000000 edd98b58 00000000 effff528 0=
 0028f6c
 >  %f00:  ffffffffffffffff ffffffffffffffff ffffffffffffffff fffffffffffff=
 fff
 >  %f08:  ffffffffffffffff ffffffffffffffff ffffffffffffffff fffffffffffff=
 fff
 >  %f16:  ffffffffffffffff ffffffffffffffff ffffffffffffffff fffffffffffff=
 fff
 >  %f24:  ffffffffffffffff ffffffffffffffff ffffffffffffffff fffffffffffff=
 fff
 >  psr: 04400082 (icc: -Z-- SPE: S--) wim: 00000010
 >  fsr: 0f800000 y: 0e66726b
 >
 >  [1]   Abort trap (core dumped) qemu-system-sparc -m 128 -drive file=3D/=
 ccd/spar...
 >
 >

 http://netbsd.org/~kamil/patch-00216-sparc-ptrace-panic.txt

 Taken from:

 commit 88c62ad10d352c3ab86db6f5332100eec863a0f5
 Author: miod <miod@openbsd.org>
 Date:   Tue Mar 2 23:45:27 2004 +0000

     In process_set_pc() and process_set_regs(), disallow unaligned pc
 and npc
     values. Workaround against PR #3663.

     ok deraadt@

 diff --git a/sys/arch/sparc/sparc/process_machdep.c
 b/sys/arch/sparc/sparc/process_machdep.c
 index a3b2e940c24..595aa4c7e83 100644
 =2D-- a/sys/arch/sparc/sparc/process_machdep.c
 +++ b/sys/arch/sparc/sparc/process_machdep.c
 @@ -1,4 +1,4 @@
 -/*	$OpenBSD: process_machdep.c,v 1.7 2004/02/08 00:04:21 deraadt Exp $	*/
 +/*	$OpenBSD: process_machdep.c,v 1.8 2004/03/02 23:45:27 miod Exp $	*/
  /*	$NetBSD: process_machdep.c,v 1.6 1996/03/14 21:09:26 christos Exp $ */

  /*
 @@ -103,6 +103,10 @@ process_write_regs(p, regs)
  	struct reg *regs;
  {
  	int	psr =3D p->p_md.md_tf->tf_psr & ~PSR_ICC;
 +
 +	if (((regs->r_pc | regs->r_npc) & 0x03) !=3D 0)
 +		return (EINVAL);
 +
  	bcopy((caddr_t)regs, p->p_md.md_tf, sizeof(struct reg));
  	p->p_md.md_tf->tf_psr =3D psr | (regs->r_psr & PSR_ICC);
  	return (0);
 @@ -123,6 +127,9 @@ process_set_pc(p, addr)
  	struct proc *p;
  	caddr_t addr;
  {
 +	if (((u_int)addr & 0x03) !=3D 0)
 +		return (EINVAL);
 +
  	p->p_md.md_tf->tf_pc =3D (u_int)addr;
  	p->p_md.md_tf->tf_npc =3D (u_int)addr + 4;
  	return (0);

From: Kamil Rytarowski <n54@gmx.com>
To: Martin Husemann <martin@duskware.de>,
 "gnats-bugs@NetBSD.org" <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: port-sparc/54734 (sparc panics running ATF tests)
Date: Sat, 25 Jan 2020 18:40:33 +0100

 On 25.01.2020 10:36, Martin Husemann wrote:
 > On Fri, Jan 24, 2020 at 10:05:01PM +0000, Kamil Rytarowski wrote:
 >>  http://netbsd.org/~kamil/patch-00216-sparc-ptrace-panic.txt
 >
 > That change is fine, is it enough to fix that panic?
 >

 It should be everything.

 > Two notes:
 >
 >  - we need the same in sparc64/sparc64/process_machdep.c (not sure why
 >    that didn't show up in test runs so far)

 In theory every alignment sensitive port is endangered.

 https://github.com/openbsd/src/blob/master/regress/sys/ptrace/ptrace.c

 Context:

 https://marc.info/?l=3Dopenbsd-bugs&m=3D107558043319084&w=3D2

 In theory just using PTRACE_REG_SET_PC() might not be enough to trigger
 a panic on a certain port.

 >  - in process_write_regs() we should also verify that npc !=3D pc
 >    (or force npc to be pc + 4 if it isn't)
 >

 If there is just triggered a crash signal that kills the child process
 but not the kernel, we could ignore it in the kernel.

 > Martin
 >

State-Changed-From-To: open->closed
State-Changed-By: kamil@NetBSD.org
State-Changed-When: Mon, 11 May 2020 20:38:59 +0200
State-Changed-Why:
Fixed.


From: "Kamil Rytarowski" <kamil@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54734 CVS commit: src/sys/arch/sparc/sparc
Date: Mon, 11 May 2020 18:38:27 +0000

 Module Name:	src
 Committed By:	kamil
 Date:		Mon May 11 18:38:27 UTC 2020

 Modified Files:
 	src/sys/arch/sparc/sparc: process_machdep.c

 Log Message:
 Reject setting unaligned Program Counter

 Patch taken from OpenBSD.

 Tested in qemu.

 Fixes PR port-sparc/54734 by Andreas Gustafsson


 To generate a diff of this commit:
 cvs rdiff -u -r1.19 -r1.20 src/sys/arch/sparc/sparc/process_machdep.c

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

From: Andreas Gustafsson <gson@gson.org>
To: kamil@NetBSD.org
Cc: gnats-bugs@netbsd.org,
    ad@netbsd.org
Subject: Re: PR/54734 CVS commit: src/sys/arch/sparc/sparc
Date: Thu, 14 May 2020 11:07:19 +0300

 Kamil Rytarowski committed:
 >  Module Name:	src
 >  Committed By:	kamil
 >  Date:		Mon May 11 18:38:27 UTC 2020
 >  
 >  Modified Files:
 >  	src/sys/arch/sparc/sparc: process_machdep.c
 >  
 >  Log Message:
 >  Reject setting unaligned Program Counter
 >  
 >  Patch taken from OpenBSD.
 >  
 >  Tested in qemu.
 >  
 >  Fixes PR port-sparc/54734 by Andreas Gustafsson
 >  
 >  
 >  To generate a diff of this commit:
 >  cvs rdiff -u -r1.19 -r1.20 src/sys/arch/sparc/sparc/process_machdep.c

 The sparc test runs are still panicing in the same test case both on
 babylon5 and my own testbed.  The panic message changed from "panic:
 TAILQ_PREREMOVE" to "panic: kernel diagnostic assertion
 "cv_is_valid(cv)" in late March, so maybe there were two different
 bugs and the commit did fix the original one, but since the subject
 line of the PR is still applies, I'll reopen it rather than filing a
 new one.

 For logs, see:

   http://releng.netbsd.org/b5reports/sparc/commits-2020.05.html#2020.05.11.18.38.26

 Grep output from babylon5 showing when the panic message changed:

   2020.03.18.19.34.15/test.log.gz:    getrusage_maxrss: [ 4995.8360525] panic: TAILQ_PREREMOVE head 0xf0002008 elm 0xf075f080 /tmp/bracket/build/2020.03.18.19.34.15-sparc/src/sys/kern/kern_sleepq.c:119
   2020.03.24.22.09.50/test.log.gz:    getrusage_maxrss: [ 5060.4379790] panic: TAILQ_PREREMOVE head 0xf0002008 elm 0xf0761080 /tmp/bracket/build/2020.03.24.22.09.50-sparc/src/sys/kern/kern_sleepq.c:119
   2020.03.27.11.15.33/test.log.gz:    getrusage_maxrss: [ 4793.0443690] panic: kernel diagnostic assertion "cv_is_valid(cv)" failed: file "/tmp/bracket/build/2020.03.27.11.15.33-sparc/src/sys/kern/kern_condvar.c", line 486
   2020.03.28.20.13.13/test.log.gz:    getrusage_maxrss: [ 5143.9754705] panic: kernel diagnostic assertion "cv_is_valid(cv)" failed: file "/tmp/bracket/build/2020.03.28.20.13.13-sparc/src/sys/kern/kern_condvar.c", line 486

 -- 
 Andreas Gustafsson, gson@gson.org

State-Changed-From-To: closed->open
State-Changed-By: gson@NetBSD.org
State-Changed-When: Thu, 14 May 2020 08:12:49 +0000
State-Changed-Why:
Panics still happen.


From: Kamil Rytarowski <n54@gmx.com>
To: Andreas Gustafsson <gson@gson.org>, kamil@NetBSD.org
Cc: gnats-bugs@netbsd.org, ad@netbsd.org
Subject: Re: PR/54734 CVS commit: src/sys/arch/sparc/sparc
Date: Thu, 14 May 2020 14:26:29 +0200

 On 14.05.2020 10:07, Andreas Gustafsson wrote:
 > Kamil Rytarowski committed:
 >>  Module Name:	src
 >>  Committed By:	kamil
 >>  Date:		Mon May 11 18:38:27 UTC 2020
 >>
 >>  Modified Files:
 >>  	src/sys/arch/sparc/sparc: process_machdep.c
 >>
 >>  Log Message:
 >>  Reject setting unaligned Program Counter
 >>
 >>  Patch taken from OpenBSD.
 >>
 >>  Tested in qemu.
 >>
 >>  Fixes PR port-sparc/54734 by Andreas Gustafsson
 >>
 >>
 >>  To generate a diff of this commit:
 >>  cvs rdiff -u -r1.19 -r1.20 src/sys/arch/sparc/sparc/process_machdep.c
 >
 > The sparc test runs are still panicing in the same test case both on
 > babylon5 and my own testbed.  The panic message changed from "panic:
 > TAILQ_PREREMOVE" to "panic: kernel diagnostic assertion
 > "cv_is_valid(cv)" in late March, so maybe there were two different
 > bugs and the commit did fix the original one, but since the subject
 > line of the PR is still applies, I'll reopen it rather than filing a
 > new one.
 >
 > For logs, see:
 >
 >   http://releng.netbsd.org/b5reports/sparc/commits-2020.05.html#2020.05.=
 11.18.38.26
 >
 > Grep output from babylon5 showing when the panic message changed:
 >
 >   2020.03.18.19.34.15/test.log.gz:    getrusage_maxrss: [ 4995.8360525] =
 panic: TAILQ_PREREMOVE head 0xf0002008 elm 0xf075f080 /tmp/bracket/build/2=
 020.03.18.19.34.15-sparc/src/sys/kern/kern_sleepq.c:119
 >   2020.03.24.22.09.50/test.log.gz:    getrusage_maxrss: [ 5060.4379790] =
 panic: TAILQ_PREREMOVE head 0xf0002008 elm 0xf0761080 /tmp/bracket/build/2=
 020.03.24.22.09.50-sparc/src/sys/kern/kern_sleepq.c:119
 >   2020.03.27.11.15.33/test.log.gz:    getrusage_maxrss: [ 4793.0443690] =
 panic: kernel diagnostic assertion "cv_is_valid(cv)" failed: file "/tmp/br=
 acket/build/2020.03.27.11.15.33-sparc/src/sys/kern/kern_condvar.c", line 4=
 86
 >   2020.03.28.20.13.13/test.log.gz:    getrusage_maxrss: [ 5143.9754705] =
 panic: kernel diagnostic assertion "cv_is_valid(cv)" failed: file "/tmp/br=
 acket/build/2020.03.28.20.13.13-sparc/src/sys/kern/kern_condvar.c", line 4=
 86
 >

 Please reopen as a new PR. That one is unrelated in
 lib/libc/sys/t_getrusage:

 lib/libc/sys/t_getrusage (284/855): 6 test cases
     getrusage_err: [0.120000s] Passed.
     getrusage_maxrss: [ 5370.1468210] panic: kernel diagnostic assertion
 "cv_is_valid(cv)" failed: file
 "/tmp/bracket/build/2020.05.11.18.38.26-sparc/src/sys/kern/kern_condvar.c"=
 ,
 line 455

From: Andreas Gustafsson <gson@gson.org>
To: Kamil Rytarowski <n54@gmx.com>
Cc: gnats-bugs@NetBSD.org
Subject: Re: PR/54734 CVS commit: src/sys/arch/sparc/sparc
Date: Thu, 14 May 2020 17:39:40 +0300

 Kamil Rytarowski wrote:
 > Please reopen as a new PR.

 Done: PR 55261.

 I'm leaving the present PR open until I can verify that the problem is
 fixed.
 -- 
 Andreas Gustafsson, gson@gson.org

From: Kamil Rytarowski <n54@gmx.com>
To: "gnats-bugs@NetBSD.org" <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: PR/54734 CVS commit: src/sys/arch/sparc/sparc
Date: Fri, 15 May 2020 15:08:22 +0200

 On 14.05.2020 14:26, Kamil Rytarowski wrote:
 > On 14.05.2020 10:07, Andreas Gustafsson wrote:
 >> Kamil Rytarowski committed:
 >>>  Module Name:	src
 >>>  Committed By:	kamil
 >>>  Date:		Mon May 11 18:38:27 UTC 2020
 >>>
 >>>  Modified Files:
 >>>  	src/sys/arch/sparc/sparc: process_machdep.c
 >>>
 >>>  Log Message:
 >>>  Reject setting unaligned Program Counter
 >>>
 >>>  Patch taken from OpenBSD.
 >>>
 >>>  Tested in qemu.
 >>>
 >>>  Fixes PR port-sparc/54734 by Andreas Gustafsson
 >>>
 >>>
 >>>  To generate a diff of this commit:
 >>>  cvs rdiff -u -r1.19 -r1.20 src/sys/arch/sparc/sparc/process_machdep.c
 >>
 >> The sparc test runs are still panicing in the same test case both on
 >> babylon5 and my own testbed.  The panic message changed from "panic:
 >> TAILQ_PREREMOVE" to "panic: kernel diagnostic assertion
 >> "cv_is_valid(cv)" in late March, so maybe there were two different
 >> bugs and the commit did fix the original one, but since the subject
 >> line of the PR is still applies, I'll reopen it rather than filing a
 >> new one.
 >>
 >> For logs, see:
 >>
 >>   http://releng.netbsd.org/b5reports/sparc/commits-2020.05.html#2020.05=
 .11.18.38.26
 >>
 >> Grep output from babylon5 showing when the panic message changed:
 >>
 >>   2020.03.18.19.34.15/test.log.gz:    getrusage_maxrss: [ 4995.8360525]=
  panic: TAILQ_PREREMOVE head 0xf0002008 elm 0xf075f080 /tmp/bracket/build/=
 2020.03.18.19.34.15-sparc/src/sys/kern/kern_sleepq.c:119
 >>   2020.03.24.22.09.50/test.log.gz:    getrusage_maxrss: [ 5060.4379790]=
  panic: TAILQ_PREREMOVE head 0xf0002008 elm 0xf0761080 /tmp/bracket/build/=
 2020.03.24.22.09.50-sparc/src/sys/kern/kern_sleepq.c:119
 >>   2020.03.27.11.15.33/test.log.gz:    getrusage_maxrss: [ 4793.0443690]=
  panic: kernel diagnostic assertion "cv_is_valid(cv)" failed: file "/tmp/b=
 racket/build/2020.03.27.11.15.33-sparc/src/sys/kern/kern_condvar.c", line =
 486
 >>   2020.03.28.20.13.13/test.log.gz:    getrusage_maxrss: [ 5143.9754705]=
  panic: kernel diagnostic assertion "cv_is_valid(cv)" failed: file "/tmp/b=
 racket/build/2020.03.28.20.13.13-sparc/src/sys/kern/kern_condvar.c", line =
 486
 >>
 >
 > Please reopen as a new PR. That one is unrelated in
 > lib/libc/sys/t_getrusage:
 >
 > lib/libc/sys/t_getrusage (284/855): 6 test cases
 >     getrusage_err: [0.120000s] Passed.
 >     getrusage_maxrss: [ 5370.1468210] panic: kernel diagnostic assertion
 > "cv_is_valid(cv)" failed: file
 > "/tmp/bracket/build/2020.05.11.18.38.26-sparc/src/sys/kern/kern_condvar.=
 c",
 > line 455
 >

 As informed offlist, I confused PR/54734 with PR/55076.

 PR/55076 was fixed; PR/53736 is unrelated bug.

From: Andreas Gustafsson <gson@gson.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-sparc/54734: sparc panics running ATF tests
Date: Wed, 20 May 2020 13:55:29 +0300

 The sparc tests are running to completion again since this commit:

   2020.05.17.17.12.28 ad src/sys/uvm/uvm_page.c 1.236

 -- 
 Andreas Gustafsson, gson@gson.org

State-Changed-From-To: open->closed
State-Changed-By: gson@NetBSD.org
State-Changed-When: Wed, 20 May 2020 11:02:11 +0000
State-Changed-Why:
Fixed, thanks.


From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54734 CVS commit: [netbsd-9] src/sys/arch/sparc/sparc
Date: Mon, 25 May 2020 17:12:26 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Mon May 25 17:12:26 UTC 2020

 Modified Files:
 	src/sys/arch/sparc/sparc [netbsd-9]: process_machdep.c

 Log Message:
 Pull up following revision(s) (requested by kamil in ticket #926):

 	sys/arch/sparc/sparc/process_machdep.c: revision 1.20

 Reject setting unaligned Program Counter

 Patch taken from OpenBSD.

 Tested in qemu.
 Fixes PR port-sparc/54734 by Andreas Gustafsson


 To generate a diff of this commit:
 cvs rdiff -u -r1.19 -r1.19.20.1 src/sys/arch/sparc/sparc/process_machdep.c

 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.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.