NetBSD Problem Report #56074
From reinoud@diablo.13thmonkey.org Thu Mar 25 13:09:41 2021
Return-Path: <reinoud@diablo.13thmonkey.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_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 BE59A1A9217
for <gnats-bugs@gnats.NetBSD.org>; Thu, 25 Mar 2021 13:09:41 +0000 (UTC)
Message-Id: <20210325130938.5135FC13AE0@diablo.13thmonkey.org>
Date: Thu, 25 Mar 2021 14:09:38 +0100 (CET)
From: reinoud@NetBSD.org
Reply-To: reinoud@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: Kernel panic in uvm_pglist_alloc_contig_agressive with uvideo
X-Send-Pr-Version: 3.95
>Number: 56074
>Category: kern
>Synopsis: Kernel panic in uvm_pglist_alloc_contig_agressive with uvideo
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Mar 25 13:10:01 +0000 2021
>Closed-Date: Fri Jul 05 13:57:22 +0000 2024
>Last-Modified: Fri Jul 05 13:57:22 +0000 2024
>Originator: Reinoud Zandijk
>Release: NetBSD 9.99.80
>Organization:
>Environment:
System: NetBSD diablo.13thmonkey.org 9.99.80 NetBSD 9.99.80 (GENERIC) #2: Wed Feb 24 22:15:49 CET 2021 reinoud@diablo.13thmonkey.org:/usr/sources/cvs.netbsd.org/src-clean/sys/arch/amd64/compile/obj/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
When trying out my USB camera in Firefox for a test-meeting the kernel
paniced. It had been running fine for some days. It was attached on:
ehci0
usb3
uhub6
uhub8
uvideo0
video0
uaudio0
audio1
addr 1: EHCI root hub, NetBSD
addr 2: product 005a, NEC
addr 3: product 0825, Logitech
The gdb trace gives:
(gdb) target kvm netbsd.175.core
0xffffffff802261d5 in cpu_reboot (howto=howto@entry=260,
bootstr=bootstr@entry=0x0) at
/usr/sources/cvs.netbsd.org/src-clean/sys/arch/amd64/amd64/machdep.c:713
713 dumpsys();
(gdb) where
#0 0xffffffff802261d5 in cpu_reboot (howto=howto@entry=260, bootstr=bootstr@entry=0x0) at
/usr/sources/cvs.netbsd.org/src-clean/sys/arch/amd64/amd64/machdep.c:713
#1 0xffffffff80caefe1 in kern_reboot (howto=howto@entry=260, bootstr=bootstr@entry=0x0) at
/usr/sources/cvs.netbsd.org/src-clean/sys/kern/kern_reboot.c:73
#2 0xffffffff80ceedfd in vpanic (fmt=fmt@entry=0xffffffff81346626 "trap", ap=ap@entry=0xffffa10109d79588) at
/usr/sources/cvs.netbsd.org/src-clean/sys/kern/subr_prf.c:290
#3 0xffffffff80ceeec2 in panic (fmt=fmt@entry=0xffffffff81346626 "trap") at /usr/sources/cvs.netbsd.org/src-clean/sys/kern/subr_prf.c:209
#4 0xffffffff80228ee1 in trap (frame=0xffffa10109d796d0) at /usr/sources/cvs.netbsd.org/src-clean/sys/arch/amd64/amd64/trap.c:326
#5 0xffffffff802210e3 in alltraps ()
#6 0xffffffff80c69a8c in uvm_pglistalloc_contig_aggressive (rlist=0xffffa10109d79930, boundary=0, alignment=4096, high=4294967296, low=16777216, num=60) at
/usr/sources/cvs.netbsd.org/src-clean/sys/uvm/uvm_pglist.c:405
#7 uvm_pglistalloc_contig (waitok=1, rlist=0xffffa10109d79930, boundary=0, alignment=4096, high=4294967296, low=16777216, num=<optimized out>) at
/usr/sources/cvs.netbsd.org/src-clean/sys/uvm/uvm_pglist.c:499
#8 uvm_pglistalloc (size=size@entry=245760, low=low@entry=16777216, high=high@entry=4294967296, alignment=<optimized out>, alignment@entry=4096, boundary=0, rlist=rlist@entry=0xffffa10109d79930, nsegs=nsegs@entry=59, waitok=waitok@entry=1) at
/usr/sources/cvs.netbsd.org/src-clean/sys/uvm/uvm_pglist.c:695
#9 0xffffffff8052d385 in _bus_dmamem_alloc_range (size=245760, alignment=alignment@entry=4096, boundary=0, segs=segs@entry=0xffff8a717c6da500, nsegs=59, rsegs=0xffff8a717c6da4f8, flags=flags@entry=0, low=16777216, high=4294967296, t=0xffff8a717c6da500) at
/usr/sources/cvs.netbsd.org/src-clean/sys/arch/x86/x86/bus_dma.c:225
#10 0xffffffff8052d9e5 in _bus_dmamem_alloc (t=0xffff8a717c6da500, t=0xffff8a717c6da500, flags=0, rsegs=0xffff8a717c6da4f8, nsegs=<optimized out>, segs=0xffff8a717c6da500, boundary=<optimized out>, alignment=4096, size=18446614818756341760) at
/usr/sources/cvs.netbsd.org/src-clean/sys/arch/x86/x86/bus_dma.c:978
#11 _bus_dma_alloc_bouncebuf (t=t@entry=0xffffffff81844d60 <pci_bus_dma_tag>, map=map@entry=0xffff8a7072c30808, size=size@entry=245760, flags=flags@entry=0)
at /usr/sources/cvs.netbsd.org/src-clean/sys/arch/x86/x86/bus_dma.c:995
#12 0xffffffff8052dfa1 in _bus_dmamap_create (dmamp=0xffff8a6f5d0c7408, flags=0, boundary=0, maxsegsz=245760, nsegments=59, size=245760, t=0xffffffff81844d60 <pci_bus_dma_tag>)
at /usr/sources/cvs.netbsd.org/src-clean/sys/arch/x86/x86/bus_dma.c:344
#13 bus_dmamap_create (t=t@entry=0xffffffff81844d60 <pci_bus_dma_tag>, size=245760, nsegments=59, maxsegsz=245760, boundary=boundary@entry=0, flags=flags@entry=0, dmamp=dmamp@entry=0xffff8a6f5d0c7408)
at /usr/sources/cvs.netbsd.org/src-clean/sys/arch/x86/x86/bus_dma.c:1365
#14 0xffffffff8046416a in usb_block_allocmem (tag=tag@entry=0xffffffff81844d60 <pci_bus_dma_tag>, size=size@entry=245760, align=align@entry=0, flags=flags@entry=1, dmap=dmap@entry=0xffff8a7167a8c230)
at /usr/sources/cvs.netbsd.org/src-clean/sys/dev/usb/usb_mem.c:171
#15 0xffffffff80464363 in usb_allocmem (bus=<optimized out>, size=245760, align=align@entry=0, flags=1, p=0xffff8a7167a8c230) at
/usr/sources/cvs.netbsd.org/src-clean/sys/dev/usb/usb_mem.c:282
#16 0xffffffff8045f153 in usbd_alloc_buffer (size=244800, xfer=0xffff8a7167a8c1b8) at
/usr/sources/cvs.netbsd.org/src-clean/sys/dev/usb/usbdi.c:485
#17 usbd_create_xfer (pipe=0xffff8a7182d54900, len=len@entry=244800, flags=flags@entry=0, nframes=80, xp=xp@entry=0xffff8a711a1b69f8) at
/usr/sources/cvs.netbsd.org/src-clean/sys/dev/usb/usbdi.c:606
#18 0xffffffff804850ce in uvideo_stream_start_xfer (vs=0xffff8a711a1b6940) at /usr/sources/cvs.netbsd.org/src-clean/sys/dev/usb/uvideo.c:1587
#19 uvideo_start_transfer (addr=<optimized out>) at
/usr/sources/cvs.netbsd.org/src-clean/sys/dev/usb/uvideo.c:2137
#20 0xffffffff80d86c5c in video_stream_on (sc=sc@entry=0xffff8a70cf481d00, type=<optimized out>) at
/usr/sources/cvs.netbsd.org/src-clean/sys/dev/video.c:1667
#21 0xffffffff80d87d97 in video_stream_on (type=<optimized out>, sc=0xffff8a70cf481d00) at
/usr/sources/cvs.netbsd.org/src-clean/sys/dev/video.c:1659
#22 videoioctl (dev=<optimized out>, cmd=2147767826, data=0xffffa10109d79ee0, flag=7, l=<optimized out>) at
/usr/sources/cvs.netbsd.org/src-clean/sys/dev/video.c:2121
#23 0xffffffff80cdb6bf in cdev_ioctl (dev=49408, cmd=2147767826, data=0xffffa10109d79ee0, flag=7, l=0xffff8a719ab7ea40) at
/usr/sources/cvs.netbsd.org/src-clean/sys/kern/subr_devsw.c:935
#24 0xffffffff80d64d8f in VOP_IOCTL (vp=vp@entry=0xffff8a6ffa5077c0, command=command@entry=2147767826, data=data@entry=0xffffa10109d79ee0, fflag=<optimized out>, cred=<optimized out>)
at /usr/sources/cvs.netbsd.org/src-clean/sys/kern/vnode_if.c:646
#25 0xffffffff80d5bcac in vn_ioctl (fp=0xffff8a6ff9ec8680, com=2147767826, data=0xffffa10109d79ee0) at
/usr/sources/cvs.netbsd.org/src-clean/sys/kern/vfs_vnops.c:783
#26 0xffffffff80d00504 in sys_ioctl (l=<optimized out>, uap=0xffffa10109d7a000, retval=<optimized out>) at
/usr/sources/cvs.netbsd.org/src-clean/sys/kern/sys_generic.c:671
#27 0xffffffff8054713a in sy_call (rval=0xffffa10109d79fb0, uap=0xffffa10109d7a000, l=0xffff8a719ab7ea40, sy=0xffffffff81882f90 <sysent+1296>) at
/usr/sources/cvs.netbsd.org/src-clean/sys/sys/syscallvar.h:65
#28 sy_invoke (code=54, rval=0xffffa10109d79fb0, uap=0xffffa10109d7a000, l=0xffff8a719ab7ea40, sy=0xffffffff81882f90 <sysent+1296>) at
/usr/sources/cvs.netbsd.org/src-clean/sys/sys/syscallvar.h:94
#29 syscall (frame=0xffffa10109d7a000) at
/usr/sources/cvs.netbsd.org/src-clean/sys/arch/x86/x86/syscall.c:138
#30 0xffffffff8020b25d in handle_syscall ()
(gdb)
>How-To-Repeat:
Unknown, plugged in my uvideo device and used it
>Fix:
Unknown
>Release-Note:
>Audit-Trail:
From: "Chuck Silvers" <chs@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/56074 CVS commit: src/sys/uvm
Date: Fri, 26 Mar 2021 09:35:18 +0000
Module Name: src
Committed By: chs
Date: Fri Mar 26 09:35:18 UTC 2021
Modified Files:
src/sys/uvm: uvm_pglist.c
Log Message:
in uvm_pglistalloc_contig_aggressive(), avoid looking forward past
the end of the target range of the physseg.
fixes PR 56074.
To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/uvm/uvm_pglist.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: skrll@NetBSD.org
State-Changed-When: Wed, 22 Dec 2021 08:05:39 +0000
State-Changed-Why:
OK to close?
State-Changed-From-To: feedback->closed
State-Changed-By: reinoud@NetBSD.org
State-Changed-When: Fri, 05 Jul 2024 13:57:22 +0000
State-Changed-Why:
Haven't been able to reproduce after the patch
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.