Re: panic: malloc(M_WAITOK) with sleeping prohibited

From: Hans Petter Selasky <hps_at_selasky.org>
Date: Wed, 10 Mar 2021 13:33:34 +0100
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: <Intel(R) PRO/1000 PCI-Express Network Driver> 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_at_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: <vendor 0x0557 product 0x2419> at usbus0
> ukbd0 on uhub3
> ukbd0: <vendor 0x0557 product 0x2419, class 0/0, rev 1.10/1.00, addr 2> 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
Received on Wed Mar 10 2021 - 11:33:53 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:27 UTC