NetBSD Problem Report #54319

From www@netbsd.org  Sun Jun 23 20:35:22 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 30C2F7A166
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 23 Jun 2019 20:35:22 +0000 (UTC)
Message-Id: <20190623203521.3E8DA7A1DB@mollari.NetBSD.org>
Date: Sun, 23 Jun 2019 20:35:21 +0000 (UTC)
From: venture37@geeklan.co.uk
Reply-To: venture37@geeklan.co.uk
To: gnats-bugs@NetBSD.org
Subject: system panics on executing dtrace script
X-Send-Pr-Version: www-1.0

>Number:         54319
>Category:       kern
>Synopsis:       system panics on executing dtrace script
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 23 20:40:00 +0000 2019
>Closed-Date:    Wed Jul 03 18:21:05 +0000 2019
>Last-Modified:  Wed Jul 03 18:21:05 +0000 2019
>Originator:     Sevan Janiyan
>Release:        NetBSD-HEAD
>Organization:
>Environment:
NetBSD 8.99.47 amd64 x86_64
>Description:
kernel diagnostic assertion "((pp->pr_roflags & PR_NOALIGN) || (((uintptr_t)cp & (pp->pr_alloc->pa_pagesz - 1)) == 0))" failed: file "/usr/src/sys/kern/subr_pool.c", line 1335 pool_prime_page: [dtrace_state_cache] unaligned page: 0xffff878001cb6000


crash> bt
_KERNEL_OPT_NARCNET() at 0
?() at ffff82a84cb160f0
vpanic() at vpanic+0x169
stge_eeprom_wait.isra.4() at stge_eeprom_wait.isra.4
pool_grow() at pool_grow+0x4a2
pool_get() at pool_get+0xa2
pool_cache_get_slow() at pool_cache_get_slow+0x1b4
pool_cache_get_paddr() at pool_cache_get_paddr+0x26f
__kernel_end() at ffffffff81af3623
__kernel_end() at ffffffff81af4198
sys_ioctl() at sys_ioctl+0x5ab
syscall() at syscall+0x181
--- syscall (number 54) ---
72db5d19538a:

>How-To-Repeat:
create a file which contains
BEGIN
{
    trace("Hello world");
    exit(0);
}

e.g hello.d

run
dtrace -xnolibs -s hello.d


>Fix:

>Release-Note:

>Audit-Trail:
From: Sevan Janiyan <venture37@geeklan.co.uk>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/54319: system panics on executing dtrace script
Date: Sun, 23 Jun 2019 21:58:11 +0100

 I set sysctl ddb.onpanic=1 and the backtrace I got is slightly different
 (dtrace functions are listed rather than __kernel_end())

 db{0}> bt
 breakpoint() at netbsd:breakpoint+0x5
 vpanic() at netbsd:vpanic+0x160
 stge_eeprom_wait.isra.4() at netbsd:stge_eeprom_wait.isra.4
 pool_grow() at netbsd:pool_grow+0x4a2
 pool_get() at netbsd:pool_get+0xa2
 pool_cache_get_slow() at netbsd:pool_cache_get_slow+0x1b4
 pool_cache_get_paddr() at netbsd:pool_cache_get_paddr+0x26f
 dtrace_state_go() at dtrace:dtrace_state_go+0x50f
 dtrace_ioctl() at dtrace:dtrace_ioctl+0xd1
 sys_ioctl() at netbsd:sys_ioctl+0x5ab
 syscall() at netbsd:syscall+0x181
 --- syscall (number 54) ---
 7c2faad9538a:

From: "Maxime Villard" <maxv@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54319 CVS commit: src/sys/kern
Date: Sat, 29 Jun 2019 11:13:23 +0000

 Module Name:	src
 Committed By:	maxv
 Date:		Sat Jun 29 11:13:23 UTC 2019

 Modified Files:
 	src/sys/kern: subr_pool.c

 Log Message:
 The big pool allocators use pool_page_alloc(), which allocates page-aligned
 storage. So if we switch to a big pool, set PR_NOALIGN, because the address
 of the storage is not aligned to the item size.

 Should fix PR/54319.


 To generate a diff of this commit:
 cvs rdiff -u -r1.251 -r1.252 src/sys/kern/subr_pool.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: maxv@NetBSD.org
State-Changed-When: Sat, 29 Jun 2019 11:17:21 +0000
State-Changed-Why:
should be fixed, please confirm


From: Sevan Janiyan <venture37@geeklan.co.uk>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/54319 (system panics on executing dtrace script)
Date: Sat, 29 Jun 2019 13:27:30 +0100

 On 29/06/2019 12:17, maxv@NetBSD.org wrote:
 > should be fixed, please confirm

 Confirmed, system no longer panics on running a DTrace script. DTrace is
 still busted but I have no idea if these two issues are related.


 Sevan

State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 03 Jul 2019 18:21:05 +0000
State-Changed-Why:
confirmed fixed, thanks


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