NetBSD Problem Report #55792
From www@netbsd.org Sat Nov 7 00:43:50 2020
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 B838A1A9246
for <gnats-bugs@gnats.NetBSD.org>; Sat, 7 Nov 2020 00:43:50 +0000 (UTC)
Message-Id: <20201107004349.4B3991A925D@mollari.NetBSD.org>
Date: Sat, 7 Nov 2020 00:43:49 +0000 (UTC)
From: rokuyama.rk@gmail.com
Reply-To: rokuyama.rk@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Cannot continue from DDB sometimes on Raspberry Pi 2 B rev1.2
X-Send-Pr-Version: www-1.0
>Number: 55792
>Category: port-arm
>Synopsis: Cannot continue from DDB sometimes on Raspberry Pi 2 B rev1.2
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-arm-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Nov 07 00:45:00 +0000 2020
>Originator: Rin Okuyama
>Release: 9.99.75
>Organization:
Department of Physics, Meiji University
>Environment:
NetBSD rpi2b 9.99.75 NetBSD 9.99.75 (GENERIC) #3: Sat Nov 7 09:30:12 JST 2020 rin@latipes:/sys/arch/evbarm/compile/GENERIC evbarm earmv7hf
>Description:
When entering DDB from serial console (PL011) on RPI2B rev1.2, sometimes
continue does not work:
----
# ~Stopped in pid 0.2 (system) at netbsd:cpu_Debugger+0x4: bx r14
db{0}> ps
...
db{0}> c
----
Then, console echos back, but no operation except entering DDB again is
possible. Here is bt as well as trace for curlwp:
----
~Stopped in pid 216.216 (sh) at netbsd:cpu_Debugger+0x4: bx r14
db{0}> bt
0xbad6dc9c: netbsd:plcomintr+0x10
0xbad6dcb4: netbsd:bcm2835_icu_intr+0x28
0xbad6dcdc: netbsd:pic_dispatch+0x38
0xbad6dd6c: netbsd:pic_do_pending_ints+0x4b4
0xbad6ddfc: netbsd:irq_entry+0x94
0xbad6de5c: netbsd:pcu_load+0xc8
0xbad6def4: netbsd:vfp_handler+0x68
0xbad6dfac: netbsd:undefinedinstruction+0x114
db{0}> ps
PID LID S CPU FLAGS STRUCT LWP * NAME WAIT
216 > 216 7 0 140 91727300 sh
...
db{0}> trace/a 91727300
trace: pid 216 lid 216 at 0xbad6dd6c
0xbad6dd6c: netbsd:pic_do_pending_ints+0xc
0xbad6ddfc: netbsd:irq_entry+0x94
0xbad6de5c: netbsd:pcu_load+0xc8
0xbad6def4: netbsd:vfp_handler+0x68
0xbad6dfac: netbsd:undefinedinstruction+0x114
--- tf 0xbad6dfb0 ---
db{0}>
----
curproc stalls in the same address as far as I can see. This is
arch/arm/pic/pic.c:559
https://nxr.netbsd.org/xref/src/sys/arch/arm/pic/pic.c#559
In other cases, continue is interrupted in pic_do_pending_ints(), as if
there were a breakpoint:
----
db{0}> c
Stopped in pid 0.97 (system) at netbsd:pic_do_pending_ints+0x4ac: ldr
r1, [r11, -#0x06c]
db{3}> c
Stopped in pid 0.20 (system) at netbsd:pic_do_pending_ints+0x4ac: ldr
r1, [r11, -#0x06c]
db{1}> c
----
This address is also always the same, pic.c:451
https://nxr.netbsd.org/xref/src/sys/arch/arm/pic/pic.c#451
>How-To-Repeat:
Enter DDB from serial console on RPI2.
>Fix:
N/A
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.