NetBSD Problem Report #47432
From gson@gson.org Fri Jan 11 09:32:57 2013
Return-Path: <gson@gson.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id 73C3963EA72
for <gnats-bugs@gnats.NetBSD.org>; Fri, 11 Jan 2013 09:32:57 +0000 (UTC)
Message-Id: <20130111093252.6086875EC5@guava.gson.org>
Date: Fri, 11 Jan 2013 11:32:52 +0200 (EET)
From: gson@gson.org (Andreas Gustafsson)
Reply-To: gson@gson.org (Andreas Gustafsson)
To: gnats-bugs@gnats.NetBSD.org
Subject: ddb stack trace from interrupt context randomly fails
X-Send-Pr-Version: 3.95
>Number: 47432
>Category: port-i386
>Synopsis: ddb stack trace from interrupt context randomly fails
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: port-i386-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jan 11 09:35:00 +0000 2013
>Originator: Andreas Gustafsson
>Release: NetBSD-current, source date 2013.01.10.06.52.35
>Organization:
>Environment:
System: NetBSD
Architecture: i386
Machine: i386
>Description:
On NetBSD/i386, when entering ddb via an interrupt, for example by
sending a break sequence to a serial console, the stack trace
displayed by the ddb "trace" command often ends prematurely with
an internal DDB page fault.
Here's an example of such an incomplete stack trace:
db{0}> bt
breakpoint(c0c90ee0,3f8,5,c05949d2,c10ea5cc,0,5f5e100,0,c109e9ec,c109e974) at netbsd:breakpoint+0x4
comintr(c109e8c0,c3564f30,7,c0c90010,30,c10c0010,c0c90010,d5646c,1,c36bacd8) at netbsd:comintr+0x597
Xintr_ioapic_edge7() at netbsd:Xintr_ioapic_edge7+0xb5
--- interrupt ---
fatal page fault in supervisor mode
trap type 6 code 0 eip c028b2c6 cs 8 eflags 246 cr2 64 ilevel 8 esp c356475c
curlwp 0xc10c1d20 pid 0 lid 2 lowest kstack 0xc36b8000
kernel: supervisor trap page fault, code=0
Faulted in DDB; continuing...
db{0}>
For comparison, here's a correct-looking stack trace:
db{0}> bt
breakpoint(c0c90ee0,3f8,5,c0c91740,0,0,c0c91740,c0595838,c109e9ec,c109e974) at netbsd:breakpoint+0x4
comintr(c109e8c0,c36bac78,0,0,0,0,0,0,0,0) at netbsd:comintr+0x597
--- switch to interrupt stack ---
Xintr_ioapic_edge7() at netbsd:Xintr_ioapic_edge7+0xb5
--- interrupt ---
acpicpu_cstate_idle_enter(c117ada8,c0c91740,25,0,e58d8ee3,0,c36bad04,c10c1d20,c0
c91740,c36bad2c) at netbsd:acpicpu_cstate_idle_enter+0x42
acpicpu_cstate_idle(c10c1d20,0,0,0,0,c10c1d20,c056d7d0,c10c1d20,0,c0100321) at n
etbsd:acpicpu_cstate_idle+0xaa
idle_loop(c10c1d20,e99000,ea2000,0,c0100307,0,0,0,0,0) at netbsd:idle_loop+0x17c
Repeatedly taking stack traces from an idle system sometimes results
in incomplete traces and sometimes complete ones, seemingly at random.
This is contrast to PR 44260, where the stack trace was always incompete.
>How-To-Repeat:
pkg_add py-anita
anita --sets=kern-GENERIC,modules,base,etc interact http://nyftp.netbsd.org/pub/NetBSD-daily/HEAD/201301091830Z/i386/
[wait for a login prompt]
[press "control-a b" to send a break sequence the virtual serial console]
trace
cont
[press "control-a b" to send a break sequence the virtual serial console]
trace
cont
(etc)
>Fix:
(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-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.