From owner-freebsd-current@freebsd.org Wed Mar 10 13:15:08 2021 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4700A5688A6 for ; Wed, 10 Mar 2021 13:15:08 +0000 (UTC) (envelope-from pho@holm.cc) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4DwXcW74xZz3Hhn for ; Wed, 10 Mar 2021 13:15:07 +0000 (UTC) (envelope-from pho@holm.cc) Received: by mailman.nyi.freebsd.org (Postfix) id F307D56898E; Wed, 10 Mar 2021 13:15:07 +0000 (UTC) Delivered-To: current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F2CC55684C2 for ; Wed, 10 Mar 2021 13:15:07 +0000 (UTC) (envelope-from pho@holm.cc) Received: from relay05.pair.com (relay05.pair.com [216.92.24.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DwXcW6VHPz3HcQ for ; Wed, 10 Mar 2021 13:15:07 +0000 (UTC) (envelope-from pho@holm.cc) Received: from x8.osted.lan (unknown [80.208.71.94]) by relay05.pair.com (Postfix) with ESMTP id D59321A2986; Wed, 10 Mar 2021 08:15:06 -0500 (EST) Received: from x8.osted.lan (localhost [127.0.0.1]) by x8.osted.lan (8.15.2/8.15.2) with ESMTPS id 12ADF63V078964 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 10 Mar 2021 14:15:06 +0100 (CET) (envelope-from pho@x8.osted.lan) Received: (from pho@localhost) by x8.osted.lan (8.15.2/8.15.2/Submit) id 12ADF4U2078963; Wed, 10 Mar 2021 14:15:04 +0100 (CET) (envelope-from pho) Date: Wed, 10 Mar 2021 14:15:04 +0100 From: Peter Holm To: Hans Petter Selasky Cc: current@freebsd.org Subject: Re: panic: malloc(M_WAITOK) with sleeping prohibited Message-ID: <20210310131504.GA78928@x8.osted.lan> References: <20210310091548.GA76176@x8.osted.lan> <20210310114150.GA77805@x8.osted.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4DwXcW6VHPz3HcQ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Mar 2021 13:15:08 -0000 On Wed, Mar 10, 2021 at 01:33:34PM +0100, Hans Petter Selasky wrote: > On 3/10/21 12:41 PM, Peter Holm wrote: > > On Wed, Mar 10, 2021 at 10:52:53AM +0100, Hans Petter Selasky wrote: > >> On 3/10/21 10:15 AM, Peter Holm wrote: > >>> I just got this panic: > >>> > >>> igb0: port 0xd020-0xd03f mem 0xfb320000-0xfb33ffff,0xfb344000-0xfb347fff irq 16 at device 0.0 on pci8 > >>> igb0: Using 1024 TX descriptors and 1024 RX descriptors > >>> igb0: queue equality override not set, capping rx_queues at 6 and tx_queues at 6 > >>> igb0: Using 6 RX queues 6 TX queues > >>> igb0: Using MSI-X interrupts with 7 vectors > >>> igb0: > >>> db> > >>> db> show panic > >>> panic: malloc(M_WAITOK) with sleeping prohibited > >>> db> bt > >>> Tracing pid 12 tid 100172 td 0xfffffe010dce2100 > >>> kdb_enter() at kdb_enter+0x37/frame 0xfffffe00e4f72980 > >>> vpanic() at vpanic+0x1b2/frame 0xfffffe00e4f729d0 > >>> panic() at panic+0x43/frame 0xfffffe00e4f72a30 > >>> malloc_dbg() at malloc_dbg+0xd4/frame 0xfffffe00e4f72a50 > >>> malloc() at malloc+0x34/frame 0xfffffe00e4f72ab0 > >>> linux_alloc_current() at linux_alloc_current+0x3d/frame 0xfffffe00e4f72b00 > >>> linux_irq_handler() at linux_irq_handler+0x3a/frame 0xfffffe00e4f72b20 > >>> ithread_loop() at ithread_loop+0x279/frame 0xfffffe00e4f72bb0 > >>> fork_exit() at fork_exit+0x80/frame 0xfffffe00e4f72bf0 > >>> fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe00e4f72bf0 > >>> --- trap 0, rip = 0, rsp = 0, rbp = 0 --- > >>> db> x/s version > >>> version: FreeBSD 14.0-CURRENT #0 main-n245371-ce53f92e6c81: Wed Mar 10 10:00:29 CET 2021\012 pho@mercat1.netperf.freebsd.org:/usr/src/sys/amd64/compile/PHO\012 > >>> db> > >> > >> This should fix it: > >> https://cgit.freebsd.org/src/commit/?id=d1cbe79089868226625c12ef49f51214d79aa427 > >> > >> --HPS > > > > Yes, thank you. Now I see this: > > > > ugen0.3: at usbus0 > > ukbd0 on uhub3 > > ukbd0: on usbus0 > > kbd2 at ukbd0 > > panic: malloc(M_WAITOK) with sleeping prohibited > > cpuid = 0 > > time = 1615375651 > > KDB: stack backtrace: > > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00e4974890 > > vpanic() at vpanic+0x181/frame 0xfffffe00e49748e0 > > panic() at panic+0x43/frame 0xfffffe00e4974940 > > malloc_dbg() at malloc_dbg+0xd4/frame 0xfffffe00e4974960 > > malloc() at malloc+0x34/frame 0xfffffe00e49749c0 > > linux_alloc_current() at linux_alloc_current+0x3d/frame 0xfffffe00e4974a10 > > linux_timer_callback_wrapper() at linux_timer_callback_wrapper+0x37/frame 0xfffffe00e4974a30 > > softclock_call_cc() at softclock_call_cc+0x15d/frame 0xfffffe00e4974b00 > > softclock() at softclock+0x66/frame 0xfffffe00e4974b20 > > ithread_loop() at ithread_loop+0x279/frame 0xfffffe00e4974bb0 > > fork_exit() at fork_exit+0x80/frame 0xfffffe00e4974bf0 > > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe00e4974bf0 > > --- trap 0, rip = 0, rsp = 0, rbp = 0 --- > > KDB: enter: panic > > [ thread pid 12 tid 100088 ] > > Try this: > https://cgit.freebsd.org/src/commit/?id=dfb33cb0ef48084da84072244e8ca486dfcf3a96 > Works for me. Thank you! - Peter > There will be a more comprehensive fix coming: > https://reviews.freebsd.org/D29183 > > --HPS