NetBSD Problem Report #50790
From www@NetBSD.org Thu Feb 11 19:28:34 2016
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 "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 727917ABDA
for <gnats-bugs@gnats.NetBSD.org>; Thu, 11 Feb 2016 19:28:34 +0000 (UTC)
Message-Id: <20160211192833.8E7F87ACC0@mollari.NetBSD.org>
Date: Thu, 11 Feb 2016 19:28:33 +0000 (UTC)
From: coypu@sdf.org
Reply-To: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Subject: Kernel panic induced by dtrace.
X-Send-Pr-Version: www-1.0
>Number: 50790
>Category: kern
>Synopsis: Kernel panic induced by dtrace.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Feb 11 19:30:00 +0000 2016
>Closed-Date: Mon Sep 05 13:08:26 +0000 2016
>Last-Modified: Mon Sep 05 13:08:26 +0000 2016
>Originator: coypu
>Release: 7.99.26
>Organization:
>Environment:
NetBSD 7.99.26 amd64
>Description:
The following will induce a kernel panic:
# dtrace -n syscall:::entry'/execname == "urxvt"/{@[ustack()] = count()}'
I have some suspicion that the problem is that it hangs for so long that writes are not completed, similar to disconnecting a USB stick in the middle of read/write.
if I am playing audio at the time, savecore is working.
without audio, I have a sudden reboot (I assume this is graphics, I don't use DRMKMS on that computer).
I can provide the output of savecore, but prefer not to post it very publicly. It's also very easy to reproduce.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: coypu@SDF.ORG
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/50790: Kernel panic induced by dtrace.
Date: Mon, 22 Feb 2016 19:12:38 +0000
More detailed:
Start NetBSD, login, don't start anything. load dtrace things.
run the following:
# dtrace -n syscall:::entry'/execname == "bash"/{@[ustack()] = count()}'
there is no crash, this can be stopped and is fine.
if I ctrl+alt+f2 and login another time (and launch bash, my default
shell, again), the kernel panics.
Savecore:
http://coypu.sdf.org/netbsd.2.gz
http://coypu.sdf.org/netbsd.2.core.gz
From: "Chuck Silvers" <chs@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/50790 CVS commit: src/external/cddl/osnet
Date: Sat, 14 May 2016 21:19:06 +0000
Module Name: src
Committed By: chs
Date: Sat May 14 21:19:06 UTC 2016
Modified Files:
src/external/cddl/osnet/dev/dtrace/amd64: dtrace_isa.c
src/external/cddl/osnet/dev/dtrace/i386: dtrace_asm.S dtrace_isa.c
src/external/cddl/osnet/dist/uts/common/dtrace: dtrace.c
Log Message:
apply the ustack() parts of freebsd r211608:
r211608 | rpaulo | 2010-08-22 03:53:32 -0700 (Sun, 22 Aug 2010) | 8 lines
Kernel DTrace support for:
o uregs (sson@)
o ustack (sson@)
o /dev/dtrace/helper device (needed for USDT probes)
The work done by me was:
Sponsored by: The FreeBSD Foundation
plus a few netbsd-specific tweaks from me.
fixes PR 50790.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/cddl/osnet/dev/dtrace/amd64/dtrace_isa.c
cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/dev/dtrace/i386/dtrace_asm.S \
src/external/cddl/osnet/dev/dtrace/i386/dtrace_isa.c
cvs rdiff -u -r1.30 -r1.31 \
src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.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: wiz@NetBSD.org
State-Changed-When: Tue, 17 May 2016 09:32:59 +0000
State-Changed-Why:
chs committed a fix, does it work now?
From: coypu@SDF.ORG
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/50790 (Kernel panic induced by dtrace.)
Date: Thu, 26 May 2016 09:52:56 +0000
Hi, I can't no longer produce a panic (thus the problem is fixed)
# dtrace -n syscall:::entry'/execname == "bash"/{@[ustack()] = count()}'
dtrace: invalid probe specifier syscall:::entry/execname == "bash"/{@[ustack()] = count()}: "/usr/lib/dtrace/psinfo.d", line 46: syntax error near "u_int"
However, I don't know if it works.
Thank you!
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, kern-bug-people@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, coypu@sdf.org
Cc:
Subject: Re: kern/50790 (Kernel panic induced by dtrace.)
Date: Thu, 26 May 2016 08:59:29 -0400
On May 26, 9:55am, coypu@SDF.ORG (coypu@SDF.ORG) wrote:
-- Subject: Re: kern/50790 (Kernel panic induced by dtrace.)
| The following reply was made to PR kern/50790; it has been noted by GNATS.
|
| From: coypu@SDF.ORG
| To: gnats-bugs@NetBSD.org
| Cc:
| Subject: Re: kern/50790 (Kernel panic induced by dtrace.)
| Date: Thu, 26 May 2016 09:52:56 +0000
|
| Hi, I can't no longer produce a panic (thus the problem is fixed)
|
| # dtrace -n syscall:::entry'/execname == "bash"/{@[ustack()] = count()}'
| dtrace: invalid probe specifier syscall:::entry/execname == "bash"/{@[ustack()] = count()}: "/usr/lib/dtrace/psinfo.d", line 46: syntax error near "u_int"
|
| However, I don't know if it works.
This just means that your kernel is missing ctf information to find u_int,
so you are not making it far enough to panic.
christos
State-Changed-From-To: feedback->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Mon, 05 Sep 2016 13:08:26 +0000
State-Changed-Why:
It works! thanks
>Unformatted:
(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-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.