NetBSD Problem Report #55416

From martin@aprisoft.de  Thu Jun 25 13:00:04 2020
Return-Path: <martin@aprisoft.de>
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 96C441A9217
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 25 Jun 2020 13:00:04 +0000 (UTC)
Message-Id: <20200625125955.0DC105CC80C@emmas.aprisoft.de>
Date: Thu, 25 Jun 2020 14:59:55 +0200 (CEST)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: kernel stalls in pipe operations
X-Send-Pr-Version: 3.95

>Number:         55416
>Category:       port-sh3
>Synopsis:       kernel stalls in pipe operations
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-sh3-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 25 13:05:00 +0000 2020
>Last-Modified:  Fri Oct 02 08:32:43 +0000 2020
>Originator:     Martin Husemann
>Release:        NetBSD 9.99.68
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD last-of-the-heroes.aprisoft.de 9.99.68 NetBSD 9.99.68 (GENERIC) #60: Wed Jun 24 18:45:34 CEST 2020 martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/landisk/compile/GENERIC landisk
Architecture: sh3el
Machine: landisk
>Description:

Sometimes (on this machine quite often) during running atf tests the whole
machine locsk up early.


bin/sh/t_syntax (23/852): 21 test cases
    a_basic_tokenisation: [3.246692s] Passed.
    b_comments: [5.969400s] Passed.
    c_line_wrapping: [10.130118s] Passed.
    d_cstrings: [7.377581s] Passed.
    f_redirects: [6.526749s] Passed.
    g_variable_syntax: [142.673727s] Passed.
    h_var_assign: [3.125363s] Passed.
    i_pipelines: 

Breaking into ddb works and shows:

db> ps
PID    LID S CPU     FLAGS       STRUCT LWP *               NAME WAIT
25554 25554 3   0        80           8df70980                cat pipe_rd
27471 27471 3   0        80           8ca1fa00                cat pipe_rd
28477>28477 7   0         0           8ca1f700                 sh
26792 26792 2   0         0           8df70380                cat
19348 19348 2   0         0           8dd95680                cat
26409 26409 2   0         0           8e5aa6c0                cat
28248 28248 3   0     40080           8d81d040                 sh wait
27638 27638 3   0        80           8ca1f400          atf-check wait
19156 19156 3   0        80           8fa9dc40                 sh wait
2097  2097 3   0        80           8e5aa9c0               tail kqueue
811    811 3   0        80           8e5aacc0               tcsh pause
1535  1535 3   0        80           8fe20700               sshd select
1253  1253 3   0        80           8e5aa0c0               sshd poll
1203  1203 3   0        80           8dd95c80                tee pipe_rd
1171  1171 3   0        80           8dd95080         atf-report pipe_rd
1202  1202 3   0        80           8fe20a00                tee pipe_rd
1083  1083 3   0        80           8fa9d340            atf-run poll
920    920 3   0        80           8fa9d040                 sh wait
176    176 3   0        80           8fe20d00                 sh wait
1134  1134 3   0        c0           8fee8d00              getty ttyraw
1062  1062 3   0        80           8fa9d640               cron nanoslp
954    954 3   0        80           8e5aa3c0              inetd kqueue
919    919 3   0        80           8dd95980               sshd select
789    789 3   0        80           8dd95380               ntpd pause
410    410 3   0        80           8fa9d940            syslogd kqueue
1        1 3   0        80           8fe510c0               init wait
0      124 3   0       200           8fe519c0            physiod physiod
0      106 3   0       200           8fe20400          pooldrain pooldrain
0      105 3   0       200           8fe20100            ioflush syncer
0      104 3   0     40200           8fe51cc0           pgdaemon pgdaemon
0      100 3   0       200           8fee8a00               usb2 usbevt
0       99 3   0       200           8fee8700               usb1 usbevt
0       98 3   0       200           8fe516c0               usb0 usbevt
0       97 3   0       200           8fe513c0             npfgc0 npfgcw
0       96 3   0       200           8fe71c80            rt_free rt_free
0       57 3   0       200           8fe71980              unpgc unpgc
0       56 3   0       200           8fe71680    icmp6_wqinput/0 icmp6_wqinput
0       55 3   0       200           8fe71380          nd6_timer nd6_timer
0       54 3   0       200           8fe71080    carp6_wqinput/0 carp6_wqinput
0       31 3   0       200           8fec1040     carp_wqinput/0 carp_wqinput
0       30 3   0       200           8fec1340     icmp_wqinput/0 icmp_wqinput
0       29 3   0       200           8fec1640           rt_timer rt_timer
0       28 3   0       200           8fec1940        vmem_rehash vmem_rehash
0       27 3   0       200           8fec1c40          entbutler entropy
0       18 3   0       240           8fee8400            atabus0 atath
0       17 3   0       200           8fee8100             sysmon smtaskq
0       16 3   0       200           8ff2ecc0         usbtask-dr usbtsk
0       15 3   0       200           8ff2e9c0         usbtask-hc usbtsk
0       14 3   0       200           8ff2e6c0         pmfsuspend pmfsuspend
0       13 3   0       200           8ff2e3c0           pmfevent pmfevent
0       12 3   0       200           8ff2e0c0         sopendfree sopendfr
0       11 3   0       200           8ff5cc80            iflnkst iflnkst
0       10 3   0       200           8ff5c980           nfssilly nfssilly
0        9 3   0       240           8ff5c680             vdrain vdrain
0        8 3   0       200           8ff5c380          modunload mod_unld
0        7 3   0       200           8ff5c080            xcall/0 xcall
0        6 1   0       200           8ff75c40          softser/0
0        5 1   0     40200           8ff75940          softclk/0
0        4 1   0     40200           8ff75640          softbio/0
0        3 1   0       200           8ff75340          softnet/0
0        2 1   0       201           8ff75040             idle/0
0        0 3   0       200           8c3e9240            swapper uvm

db> t/l 8df70980
db_stack_trace_cmd() at 8c3eac40
[ 47854.9011462] sleepq_locks() at 0
db> t/l 8ca1fa00
db_stack_trace_cmd() at 8c3eaa80
[ 47854.9011462] sleepq_locks() at 0
db> bt
cpu_Debugger() at netbsd:scifintr+0x56
scifintr() at netbsd:intc_intr+0x5a
intc_intr() at 8c000676
<EXPEVT 000; SSR=400001c0> at netbsd:__pmap_pte_lookup+0x1a
[trapframe 0x7ff3f000]
   sr=400001c0   gbr=6f3fa000    pc=8c00a032     pr=8c00a08a
   r0=8cbcc000    r1=8e83c000    r2=40000101     r3=00010000
   r4=8fe53dcc    r6=7ff3e000    r7=7ff3f000     r8=00000000
   r5=7ff3e000    r9=8fe53dcc   r10=8c00a050    r11=8c1c7524
  r12=8e4faa2c   r13=1ffff000   r14=7ff3f000 sp=r15=c3155c90
__pmap_pte_lookup() at netbsd:pmap_remove+0x3a
pmap_remove() at netbsd:pmap_page_protect+0x78
pmap_page_protect() at netbsd:uvm_anfree+0x70
uvm_anfree() at netbsd:amap_wipeout+0x64
amap_wipeout() at netbsd:uvm_unmap_detach+0x44
uvm_unmap_detach() at netbsd:uvm_unmap1+0x38
uvm_unmap1() at netbsd:uvmspace_exec+0x5a
uvmspace_exec() at netbsd:execve_runproc+0x86
execve_runproc() at netbsd:execve1+0x38
execve1() at netbsd:sys_execve+0x1a
sys_execve() at netbsd:syscall+0xae
syscall() at netbsd:general_exception+0x184

db> sh uvmexp
Current UVM status:
  pagesize=4096 (0x1000), pagemask=0xfff, pageshift=12, ncolors=1
  14959 VM pages: 3044 active, 1065 inactive, 2147 wired, 496 free
  pages  3199 anon, 1686 file, 1327 exec
  freemin=74, free-target=98, wired-max=4986
  resv-pg=1, resv-kernel=5
  bootpages=239, poolpages=8037
  faults=4318395, traps=2841828, intrs=3569077, ctxswitch=383748
   softint=88949, syscalls=2841827
  fault counts:
    noram=51, noanon=0, pgwait=0, pgrele=0
    ok relocks(total)=2512(2512), anget(retrys)=1372755(7), amapcopy=802107
    neighbor anon/obj pg=1091830/9065920, gets(lock/unlock)=2065539/2505
    cases: anon=836818, anoncow=535937, obj=1809953, prcopy=255584, przero=84964
2
  daemon and swap counts:
    woke=169, revs=169, scans=136425, obscans=46197, anscans=58
    busy=478, freed=46255, reactivate=1991, deactivate=144848
    pageouts=4, pending=54, nswget=7
    nswapdev=1, swpgavail=65531
    swpages=65531, swpginuse=37, swpgonly=35, paging=0


>How-To-Repeat:
s/a

>Fix:
n/a

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->port-sh3-maintainer
Responsible-Changed-By: rin@NetBSD.org
Responsible-Changed-When: Fri, 02 Oct 2020 08:32:43 +0000
Responsible-Changed-Why:
Seems like sh3 specific problem.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

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