From owner-freebsd-current@freebsd.org Wed Mar 10 12:33:53 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 3BD615AF991 for ; Wed, 10 Mar 2021 12:33:53 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4DwWhw6mwvz3FXR for ; Wed, 10 Mar 2021 12:33:52 +0000 (UTC) (envelope-from hps@selasky.org) Received: by mailman.nyi.freebsd.org (Postfix) id E69485AF723; Wed, 10 Mar 2021 12:33:52 +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 E65C55AF460 for ; Wed, 10 Mar 2021 12:33:52 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (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 4DwWhw5NzZz3FCp; Wed, 10 Mar 2021 12:33:52 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id E1C72260C4C; Wed, 10 Mar 2021 13:33:50 +0100 (CET) Subject: Re: panic: malloc(M_WAITOK) with sleeping prohibited To: Peter Holm Cc: current@freebsd.org References: <20210310091548.GA76176@x8.osted.lan> <20210310114150.GA77805@x8.osted.lan> From: Hans Petter Selasky Message-ID: Date: Wed, 10 Mar 2021 13:33:34 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20210310114150.GA77805@x8.osted.lan> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DwWhw5NzZz3FCp 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 12:33:53 -0000 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 There will be a more comprehensive fix coming: https://reviews.freebsd.org/D29183 --HPS