NetBSD Problem Report #54603

From www@netbsd.org  Sun Oct  6 13:13:54 2019
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 DB8EE7A165
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  6 Oct 2019 13:13:54 +0000 (UTC)
Message-Id: <20191006131353.4999C7A250@mollari.NetBSD.org>
Date: Sun,  6 Oct 2019 13:13:53 +0000 (UTC)
From: rares.aioanei@gmail.com
Reply-To: rares.aioanei@gmail.com
To: gnats-bugs@NetBSD.org
Subject: kernel panic when running dtruss
X-Send-Pr-Version: www-1.0

>Number:         54603
>Category:       kern
>Synopsis:       kernel panic when running dtruss
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 06 13:15:00 +0000 2019
>Closed-Date:    Mon Nov 25 06:12:20 +0000 2019
>Last-Modified:  Mon Nov 25 06:12:20 +0000 2019
>Originator:     Rares
>Release:        CURRENT
>Organization:
>Environment:
NetBSD localhost 9.99.15 NetBSD 9.99.15 (GENERIC) #0: Fri Oct  4 16:27:00 UTC 2019  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
When running "sudo dtruss -eos ksh", after a short while the system reboots and afterwards I see the following in /var/log/messages : 

Oct  6 13:05:14 localhost /netbsd: [ 7246.7838607] pool redzone disabled for 'dtrace_state_cache'
Oct  6 13:05:14 localhost /netbsd: [ 7246.7838607] dtrace: XXX dtrace_dof_property not implemented (name=dof-data-0)
Oct  6 13:05:14 localhost /netbsd: [ 7247.2039926] panic: kernel diagnostic assertion "(x86_read_flags() & PSL_I) == 0" failed: file "/usr/src/external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c", line 415 interrup
ts enabled
Oct  6 13:05:14 localhost /netbsd: [ 7247.2039926] cpu1: Begin traceback...
Oct  6 13:05:14 localhost /netbsd: [ 7247.2039926] vpanic() at netbsd:vpanic+0x160
Oct  6 13:05:14 localhost /netbsd: [ 7247.2039926] stge_eeprom_wait.isra.4() at netbsd:stge_eeprom_wait.isra.4
Oct  6 13:05:14 localhost /netbsd: [ 7247.2039926] dtrace_trap() at dtrace:dtrace_trap+0xbc
Oct  6 13:05:14 localhost /netbsd: [ 7247.2039926] trap() at netbsd:trap+0x255
Oct  6 13:05:14 localhost /netbsd: [ 7247.2039926] --- trap (number 6) ---
Oct  6 13:05:14 localhost /netbsd: [ 7247.2039926] dtrace_fuword64_nocheck() at dtrace:dtrace_fuword64_nocheck
Oct  6 13:05:14 localhost /netbsd: [ 7247.2140006] dtrace_getupcstack() at dtrace:dtrace_getupcstack+0xe8
Oct  6 13:05:14 localhost /netbsd: [ 7247.2140006] dtrace_probe() at dtrace:dtrace_probe+0x13ef
Oct  6 13:05:14 localhost /netbsd: [ 7247.2140006] systrace_probe() at dtrace_syscall:systrace_probe+0x71
Oct  6 13:05:14 localhost /netbsd: [ 7247.2140006] trace_exit() at netbsd:trace_exit+0x69
Oct  6 13:05:14 localhost /netbsd: [ 7247.2140006] syscall() at netbsd:syscall+0xb2
Oct  6 13:05:14 localhost /netbsd: [ 7247.2140006] --- syscall (number 197) ---
Oct  6 13:05:14 localhost /netbsd: [ 7247.2140006] 7f7fb0e0c6ea:
Oct  6 13:05:14 localhost /netbsd: [ 7247.2140006] cpu1: End traceback...
Oct  6 13:05:14 localhost /netbsd:
Oct  6 13:05:14 localhost /netbsd: [ 7247.2140006] dumping to dev 0,1 (offset=8, size=2097022):
Oct  6 13:05:14 localhost /netbsd: [ 7247.2140006] dump Skipping crash dump on recursive panic
Oct  6 13:05:14 localhost /netbsd: [ 7248.2443004] panic: atastart: channel 0 busy, xfer not possible
Oct  6 13:05:14 localhost /netbsd: [ 7248.2443004] cpu1: Begin traceback...
Oct  6 13:05:14 localhost /netbsd: [ 7248.2443004] vpanic() at netbsd:vpanic+0x160
Oct  6 13:05:14 localhost /netbsd: [ 7248.2443004] snprintf() at netbsd:snprintf
Oct  6 13:05:14 localhost /netbsd: [ 7248.2543035] ata_get_xfer() at netbsd:ata_get_xfer
Oct  6 13:05:14 localhost /netbsd: [ 7248.2543035] wdc_ata_bio() at netbsd:wdc_ata_bio+0x7b
Oct  6 13:05:14 localhost /netbsd: [ 7248.2543035] wd_dumpblocks() at netbsd:wd_dumpblocks+0x111
Oct  6 13:05:14 localhost /netbsd: [ 7248.2543035] dk_dump() at netbsd:dk_dump+0x172
Oct  6 13:05:14 localhost /netbsd: [ 7248.2543035] dump_header_flush() at netbsd:dump_header_flush+0x6d
Oct  6 13:05:14 localhost /netbsd: [ 7248.2543035] dump_header_addbytes() at netbsd:dump_header_addbytes+0x40
Oct  6 13:05:14 localhost /netbsd: [ 7248.2543035] dump_header_addseg() at netbsd:dump_header_addseg+0x1e
Oct  6 13:05:14 localhost /netbsd: [ 7248.2543035] dump_seg_iter() at netbsd:dump_seg_iter+0x107
Oct  6 13:05:14 localhost /netbsd: [ 7248.2543035] cpu_dump() at netbsd:cpu_dump+0x6a
Oct  6 13:05:14 localhost /netbsd: [ 7248.2543035] dodumpsys() at netbsd:dodumpsys+0xfc
Oct  6 13:05:14 localhost /netbsd: [ 7248.2543035] dumpsys() at netbsd:dumpsys+0x1d
Oct  6 13:05:14 localhost /netbsd: [ 7248.2643066] vpanic() at netbsd:vpanic+0x169
Oct  6 13:05:14 localhost /netbsd: [ 7248.2643066] stge_eeprom_wait.isra.4() at netbsd:stge_eeprom_wait.isra.4
Oct  6 13:05:14 localhost /netbsd: [ 7248.2643066] dtrace_trap() at dtrace:dtrace_trap+0xbc
Oct  6 13:05:14 localhost /netbsd: [ 7248.2643066] trap() at netbsd:trap+0x255
Oct  6 13:05:14 localhost /netbsd: [ 7248.2643066] --- trap (number 6) ---
Oct  6 13:05:14 localhost /netbsd: [ 7248.2643066] dtrace_fuword64_nocheck() at dtrace:dtrace_fuword64_nocheck
Oct  6 13:05:14 localhost /netbsd: [ 7248.2643066] dtrace_getupcstack() at dtrace:dtrace_getupcstack+0xe8
Oct  6 13:05:14 localhost /netbsd: [ 7248.2643066] dtrace_probe() at dtrace:dtrace_probe+0x13ef
Oct  6 13:05:14 localhost /netbsd: [ 7248.2743109] systrace_probe() at dtrace_syscall:systrace_probe+0x71
Oct  6 13:05:14 localhost /netbsd: [ 7248.2743109] trace_exit() at netbsd:trace_exit+0x69
Oct  6 13:05:14 localhost /netbsd: [ 7248.2743109] syscall() at netbsd:syscall+0xb2
Oct  6 13:05:14 localhost /netbsd: [ 7248.2743109] --- syscall (number 197) ---
Oct  6 13:05:14 localhost /netbsd: [ 7248.2743109] 7f7fb0e0c6ea:
Oct  6 13:05:14 localhost /netbsd: [ 7248.2743109] cpu1: End traceback...
Oct  6 13:05:14 localhost /netbsd: [ 7248.2743109] rebooting...

>How-To-Repeat:
Run "sudo dtruss -eos $SHELL"
>Fix:

>Release-Note:

>Audit-Trail:
From: Sevan Janiyan <venture37@geeklan.co.uk>
To: "gnats-bugs@netbsd.org" <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: kern/54603: kernel panic when running dtruss
Date: Sun, 6 Oct 2019 17:06:04 +0100

 It's possible to trigger the bug by just using the -s flag, e.g
 dtruss -s ls


 Sevan

From: "Juergen Hannken-Illjes" <hannken@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54603 CVS commit: src/external/cddl/osnet/dev/dtrace/amd64
Date: Fri, 8 Nov 2019 11:06:21 +0000

 Module Name:	src
 Committed By:	hannken
 Date:		Fri Nov  8 11:06:21 UTC 2019

 Modified Files:
 	src/external/cddl/osnet/dev/dtrace/amd64: dtrace_subr.c

 Log Message:
 dtrace_trap() gets called from alltraps() -> trap() with interrupts enabled
 so we cannot assert for interrupts disabled here.

 Should fix PR kern/54603: kernel panic when running dtruss


 To generate a diff of this commit:
 cvs rdiff -u -r1.13 -r1.14 \
     src/external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c

 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/54603 CVS commit: [netbsd-9] src/external/cddl/osnet/dev/dtrace/amd64
Date: Sun, 10 Nov 2019 13:18:42 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sun Nov 10 13:18:42 UTC 2019

 Modified Files:
 	src/external/cddl/osnet/dev/dtrace/amd64 [netbsd-9]: dtrace_subr.c

 Log Message:
 Pull up following revision(s) (requested by hannken in ticket #410):

 	external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c: revision 1.14

 dtrace_trap() gets called from alltraps() -> trap() with interrupts enabled
 so we cannot assert for interrupts disabled here.
 Should fix PR kern/54603: kernel panic when running dtruss


 To generate a diff of this commit:
 cvs rdiff -u -r1.13 -r1.13.2.1 \
     src/external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.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->feedback
State-Changed-By: snj@NetBSD.org
State-Changed-When: Mon, 18 Nov 2019 03:50:23 +0000
State-Changed-Why:
Fixed?


From: Rares Aioanei <rares.aioanei@gmail.com>
To: gnats-bugs@netbsd.org
Cc: kern-bug-people@netbsd.org, netbsd-bugs@netbsd.org, gnats-admin@netbsd.org, 
	snj@netbsd.org
Subject: Re: kern/54603 (kernel panic when running dtruss)
Date: Mon, 25 Nov 2019 07:33:22 +0200

 Yup, just checked and it works. Thank you.

 On Mon, Nov 18, 2019 at 5:50 AM <snj@netbsd.org> wrote:
 >
 > Synopsis: kernel panic when running dtruss
 >
 > State-Changed-From-To: open->feedback
 > State-Changed-By: snj@NetBSD.org
 > State-Changed-When: Mon, 18 Nov 2019 03:50:23 +0000
 > State-Changed-Why:
 > Fixed?
 >
 >
 >

State-Changed-From-To: feedback->closed
State-Changed-By: snj@NetBSD.org
State-Changed-When: Mon, 25 Nov 2019 06:12:20 +0000
State-Changed-Why:
Fixed and pulled up to netbsd-9.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.45 2018/12/21 14:23:33 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.