NetBSD Problem Report #46591

From  Tue Jun 12 08:59:59 2012
Return-Path: <>
Received: from ( [])
	by (Postfix) with ESMTP id CBAC363B882
	for <>; Tue, 12 Jun 2012 08:59:59 +0000 (UTC)
Message-Id: <>
Date: Tue, 12 Jun 2012 10:59:54 +0200 (CEST)
Subject: Doing "ktrace -p <pid>" triggered panic
X-Send-Pr-Version: 3.95

>Number:         46591
>Category:       port-powerpc
>Synopsis:       Doing "ktrace -p <pid>" triggered panic
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-powerpc-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 12 09:00:00 +0000 2012
>Closed-Date:    Fri Jul 06 13:10:51 +0000 2012
>Last-Modified:  Fri Jul 06 13:20:04 +0000 2012
>Originator:     Havard Eidnes
>Release:        NetBSD 6.0_BETA2
System: NetBSD 6.0_BETA2 NetBSD 6.0_BETA2 (GENERIC) #5: Wed May 30 20:32:20 CEST 2012 macppc
Architecture: powerpc
Machine: macppc
	During a pkgsrc bulk build, an awk process appeared to be
	spinning on the CPU checking for "porbability" of a Bourne
	shell script.  I wanted to see if it was doing any system
	calls, and what they were, so did a

	ktrace -p <pid>

	on the process, something which triggered an instant panic.

	This was what was left in the messages file after the machine
	came back up again:

panic: cpu_uarea_alloc: uvm_pglistalloc failed: 12
cpu0: Begin traceback...
0xd9d5bc40: at panic+0x4c
0xd9d5bc80: at cpu_uarea_alloc+0x78
0xd9d5bcb0: at uarea_system_poolpage_alloc+0x20
0xd9d5bcc0: at pool_grow+0x48
0xd9d5bce0: at pool_get+0x58
0xd9d5bd00: at pool_cache_get_slow+0x1a4
0xd9d5bd50: at pool_cache_get_paddr+0x104
0xd9d5bd90: at uvm_uarea_system_alloc+0x1c
0xd9d5bda0: at kthread_create+0x60
0xd9d5be00: at ktrace_common+0x390
0xd9d5be40: at sys_ktrace+0xf4
0xd9d5bec0: at syscall_plain+0x1f0
0xd9d5bf20: user SC trap #45 by 0xfde8120c: srr1=0xd032
           r1=0xffffd760 cr=0x28000044 xer=0x20000000 ctr=0xfde81204
cpu0: End traceback...
dumpsys: TBD

	Since there doesn't appear to be any code to dump kernel core,
	that's all I'm left with.

	12 is ENOMEM.

	...and since uarea_system_poolpage_alloc() calls
	cpu_uarea_alloc with "true", it panics.  It appears that
	uarea_system_poolpage_alloc() is prepared to deal with a NULL
	return from cpu_uarea_alloc(), though, but on powerpc, it
	appears that cpu_uarea_alloc() will never return NULL, but
	will instead panic if called with system=true and there's a
	memory shortage "somewhere".

	This is different from x86, where the code doesn't check the
	"system" argument, and doesn't panic() inside

	I'm not sure how repeatable this is...

	Sorry, don't know.


From: Havard Eidnes <>
Subject: Re: port-powerpc/46591: Doing "ktrace -p <pid>" triggered panic
Date: Thu, 28 Jun 2012 14:01:40 +0200 (CEST)

 Update: doing a simple

   ktrace -i sh

 also results in an instant panic.  The same one, it seems:

 panic: cpu_uarea_alloc: uvm_pglistalloc failed: 12
 cpu0: Begin traceback...
 0xd9d3bc40: at panic+0x4c
 0xd9d3bc80: at cpu_uarea_alloc+0x78
 0xd9d3bcb0: at uarea_system_poolpage_alloc+0x20
 0xd9d3bcc0: at pool_grow+0x48
 0xd9d3bce0: at pool_get+0x58
 0xd9d3bd00: at pool_cache_get_slow+0x1a4
 0xd9d3bd50: at pool_cache_get_paddr+0x104
 0xd9d3bd90: at uvm_uarea_system_alloc+0x1c
 0xd9d3bda0: at kthread_create+0x60
 0xd9d3be00: at ktrace_common+0x390
 0xd9d3be40: at sys_ktrace+0xf4
 0xd9d3bec0: at syscall_plain+0x1f0
 0xd9d3bf20: user SC trap #45 by 0xfde8120c: srr1=3D0xd032
             r1=3D0xffffd750 cr=3D0x28000044 xer=3D0x20000000 ctr=3D0xfd=
 cpu0: End traceback...
 dumpsys: TBD


 - H=E5vard

State-Changed-From-To: open->closed
State-Changed-When: Fri, 06 Jul 2012 13:10:51 +0000
Fix committed with revision 1.97 of src/sys/arch/powerpc/powerpc/vm_machdep.c:
Pulled up to netbsd-6 in ticket #388.

From: "Julian Coleman" <>
Subject: PR/46591 CVS commit: [netbsd-6] src/doc
Date: Fri, 6 Jul 2012 13:07:25 +0000

 Module Name:	src
 Committed By:	jdc
 Date:		Fri Jul  6 13:07:25 UTC 2012

 Modified Files:
 	src/doc [netbsd-6]: CHANGES-6.0

 Log Message:
 Mention PR port-powerpc/46591 in the entry for #388.

 To generate a diff of this commit:
 cvs rdiff -u -r1.1.2.151 -r1.1.2.152 src/doc/CHANGES-6.0

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


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.