On Wed, Jul 16, 2025 at 12:04:12PM +0000, Lucas Gabriel Vuotto wrote:
> >Synopsis:    splassert: pool_do_put: want 0 have 1
> >Category:    kernel
> >Environment:
>       System      : OpenBSD 7.7
>       Details     : OpenBSD 7.7-current (GENERIC.MP) #53: Fri Jul 11 07:40:44 
> MDT 2025
>                        
> [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> 
>       Architecture: OpenBSD.amd64
>       Machine     : amd64
> >Description:
>       Yesterday, this happened. The OS didn't crash and I didn't
> notice anything in particular while it happened; it was just printed in
> xconsole. It didn't happen before since installing this snapshot from
> last Saturday, despite doing the same things with the computer.
> 
> Jul 16 01:36:57 nuc /bsd: splassert: pool_do_put: want 0 have 1
> Jul 16 01:36:57 nuc /bsd: Starting stack trace...
> Jul 16 01:36:57 nuc /bsd: pool_do_put(ffffffff82ac3468,fffffd86b1cee448) at 
> pool_do_put+0x43
> Jul 16 01:36:57 nuc /bsd: pool_put(ffffffff82ac3468,fffffd86b1cee448) at 
> pool_put+0x79
> Jul 16 01:36:57 nuc /bsd: i915_fence_release(ffff80002e7d75c0) at 
> i915_fence_release+0x86
> Jul 16 01:36:57 nuc /bsd: dma_fence_chain_release(ffff80002e81c800) at 
> dma_fence_chain_release+0x104
> Jul 16 01:36:57 nuc /bsd: dma_fence_chain_walk(ffff800003274900) at 
> dma_fence_chain_walk+0x1e5
> Jul 16 01:36:57 nuc /bsd: dma_fence_chain_enable_signaling(ffff800003274900) 
> at dma_fence_chain_enable_signaling+0x97
> Jul 16 01:36:57 nuc /bsd: dma_fence_chain_timo(ffff800003274900) at 
> dma_fence_chain_timo+0x21
> Jul 16 01:36:57 nuc /bsd: softclock_process_tick_timeout(ffff800003274970,1) 
> at softclock_process_tick_timeout+0x10f
> Jul 16 01:36:57 nuc /bsd: softclock(0) at softclock+0x10e
> Jul 16 01:36:57 nuc /bsd: softintr_dispatch(0) at softintr_dispatch+0x101
> Jul 16 01:36:57 nuc /bsd: dosoftint(0) at dosoftint+0x3f
> Jul 16 01:36:57 nuc /bsd: Xsoftclock() at Xsoftclock+0x27
> Jul 16 01:36:57 nuc /bsd: acpicpu_idle() at acpicpu_idle+0x228
> Jul 16 01:36:57 nuc /bsd: sched_idle(ffffffff829daff0) at sched_idle+0x24b
> Jul 16 01:36:57 nuc /bsd: end trace frame: 0x0, count: 243
> Jul 16 01:36:57 nuc /bsd: End of stack trace.
> Jul 16 01:47:49 nuc /bsd: splassert: pool_do_put: want 0 have 1
> Jul 16 01:47:49 nuc /bsd: Starting stack trace...
> Jul 16 01:47:49 nuc /bsd: pool_do_put(ffffffff82ac3468,fffffd856305e880) at 
> pool_do_put+0x43
> Jul 16 01:47:49 nuc /bsd: pool_put(ffffffff82ac3468,fffffd856305e880) at 
> pool_put+0x79
> Jul 16 01:47:49 nuc /bsd: i915_fence_release(ffff80000352b040) at 
> i915_fence_release+0x4c
> Jul 16 01:47:49 nuc /bsd: dma_fence_chain_release(ffff80000355e900) at 
> dma_fence_chain_release+0x104
> Jul 16 01:47:49 nuc /bsd: dma_fence_chain_walk(ffff800003471300) at 
> dma_fence_chain_walk+0x1e5
> Jul 16 01:47:49 nuc /bsd: dma_fence_chain_enable_signaling(ffff800003471300) 
> at dma_fence_chain_enable_signaling+0x97
> Jul 16 01:47:49 nuc /bsd: dma_fence_chain_timo(ffff800003471300) at 
> dma_fence_chain_timo+0x21
> Jul 16 01:47:49 nuc /bsd: softclock_process_tick_timeout(ffff800003471370,1) 
> at softclock_process_tick_timeout+0x10f
> Jul 16 01:47:49 nuc /bsd: softclock(0) at softclock+0x10e
> Jul 16 01:47:49 nuc /bsd: softintr_dispatch(0) at softintr_dispatch+0x101
> Jul 16 01:47:49 nuc /bsd: dosoftint(0) at dosoftint+0x3f
> Jul 16 01:47:49 nuc /bsd: Xsoftclock() at Xsoftclock+0x27
> Jul 16 01:47:49 nuc /bsd: acpicpu_idle() at acpicpu_idle+0x228
> Jul 16 01:47:49 nuc /bsd: sched_idle(ffffffff829daff0) at sched_idle+0x24b
> Jul 16 01:47:49 nuc /bsd: end trace frame: 0x0, count: 243
> Jul 16 01:47:49 nuc /bsd: End of stack trace.
> Jul 16 01:47:49 nuc /bsd: splassert: pool_do_put: want 0 have 1
> Jul 16 01:47:49 nuc /bsd: Starting stack trace...
> Jul 16 01:47:49 nuc /bsd: pool_do_put(ffffffff82ac3468,fffffd875c911b58) at 
> pool_do_put+0x43
> Jul 16 01:47:49 nuc /bsd: pool_put(ffffffff82ac3468,fffffd875c911b58) at 
> pool_put+0x79
> Jul 16 01:47:49 nuc /bsd: i915_fence_release(ffff80000352b040) at 
> i915_fence_release+0x86
> Jul 16 01:47:49 nuc /bsd: dma_fence_chain_release(ffff80000355e900) at 
> dma_fence_chain_release+0x104
> Jul 16 01:47:49 nuc /bsd: dma_fence_chain_walk(ffff800003471300) at 
> dma_fence_chain_walk+0x1e5
> Jul 16 01:47:49 nuc /bsd: dma_fence_chain_enable_signaling(ffff800003471300) 
> at dma_fence_chain_enable_signaling+0x97
> Jul 16 01:47:49 nuc /bsd: dma_fence_chain_timo(ffff800003471300) at 
> dma_fence_chain_timo+0x21
> Jul 16 01:47:49 nuc /bsd: softclock_process_tick_timeout(ffff800003471370,1) 
> at softclock_process_tick_timeout+0x10f
> Jul 16 01:47:49 nuc /bsd: softclock(0) at softclock+0x10e
> Jul 16 01:47:49 nuc /bsd: softintr_dispatch(0) at softintr_dispatch+0x101
> Jul 16 01:47:49 nuc /bsd: dosoftint(0) at dosoftint+0x3f
> Jul 16 01:47:49 nuc /bsd: Xsoftclock() at Xsoftclock+0x27
> Jul 16 01:47:49 nuc /bsd: acpicpu_idle() at acpicpu_idle+0x228
> Jul 16 01:47:49 nuc /bsd: sched_idle(ffffffff829daff0) at sched_idle+0x24b
> Jul 16 01:47:49 nuc /bsd: end trace frame: 0x0, count: 243
> Jul 16 01:47:49 nuc /bsd: End of stack trace.
> Jul 16 02:03:25 nuc /bsd: splassert: pool_do_put: want 0 have 1
> Jul 16 02:03:25 nuc /bsd: Starting stack trace...
> Jul 16 02:03:25 nuc /bsd: pool_do_put(ffffffff82ac3468,fffffd84207675a8) at 
> pool_do_put+0x43
> Jul 16 02:03:25 nuc /bsd: pool_put(ffffffff82ac3468,fffffd84207675a8) at 
> pool_put+0x79
> Jul 16 02:03:25 nuc /bsd: i915_fence_release(ffff800003687200) at 
> i915_fence_release+0x86
> Jul 16 02:03:25 nuc /bsd: dma_fence_chain_release(ffff800003509600) at 
> dma_fence_chain_release+0x104
> Jul 16 02:03:25 nuc /bsd: dma_fence_chain_walk(ffff800003684e00) at 
> dma_fence_chain_walk+0x1e5
> Jul 16 02:03:25 nuc /bsd: dma_fence_chain_enable_signaling(ffff800003684e00) 
> at dma_fence_chain_enable_signaling+0x97
> Jul 16 02:03:25 nuc /bsd: dma_fence_chain_timo(ffff800003684e00) at 
> dma_fence_chain_timo+0x21
> Jul 16 02:03:25 nuc /bsd: softclock_process_tick_timeout(ffff800003684e70,1) 
> at softclock_process_tick_timeout+0x10f
> Jul 16 02:03:25 nuc /bsd: softclock(0) at softclock+0x10e
> Jul 16 02:03:25 nuc /bsd: softintr_dispatch(0) at softintr_dispatch+0x101
> Jul 16 02:03:25 nuc /bsd: dosoftint(0) at dosoftint+0x3f
> Jul 16 02:03:25 nuc /bsd: Xsoftclock() at Xsoftclock+0x27
> Jul 16 02:03:25 nuc /bsd: acpicpu_idle() at acpicpu_idle+0x228
> Jul 16 02:03:25 nuc /bsd: sched_idle(ffffffff829daff0) at sched_idle+0x24b
> Jul 16 02:03:25 nuc /bsd: end trace frame: 0x0, count: 243
> Jul 16 02:03:25 nuc /bsd: End of stack trace.
> Jul 16 02:42:54 nuc /bsd: splassert: pool_do_put: want 0 have 1
> Jul 16 02:42:54 nuc /bsd: Starting stack trace...
> Jul 16 02:42:54 nuc /bsd: pool_do_put(ffffffff82ac3468,fffffd8555f12e20) at 
> pool_do_put+0x43
> Jul 16 02:42:54 nuc /bsd: pool_put(ffffffff82ac3468,fffffd8555f12e20) at 
> pool_put+0x79
> Jul 16 02:42:54 nuc /bsd: i915_fence_release(ffff80000302a000) at 
> i915_fence_release+0x86
> Jul 16 02:42:54 nuc /bsd: dma_fence_chain_release(ffff8000030aab00) at 
> dma_fence_chain_release+0x104
> Jul 16 02:42:54 nuc /bsd: dma_fence_chain_walk(ffff8000034b3900) at 
> dma_fence_chain_walk+0x1e5
> Jul 16 02:42:54 nuc /bsd: dma_fence_chain_enable_signaling(ffff8000034b3900) 
> at dma_fence_chain_enable_signaling+0x97
> Jul 16 02:42:54 nuc /bsd: dma_fence_chain_timo(ffff8000034b3900) at 
> dma_fence_chain_timo+0x21
> Jul 16 02:42:54 nuc /bsd: softclock_process_tick_timeout(ffff8000034b3970,1) 
> at softclock_process_tick_timeout+0x10f
> Jul 16 02:42:54 nuc /bsd: softclock(0) at softclock+0x10e
> Jul 16 02:42:54 nuc /bsd: softintr_dispatch(0) at softintr_dispatch+0x101
> Jul 16 02:42:54 nuc /bsd: dosoftint(0) at dosoftint+0x3f
> Jul 16 02:42:54 nuc /bsd: Xsoftclock() at Xsoftclock+0x27
> Jul 16 02:42:54 nuc /bsd: acpicpu_idle() at acpicpu_idle+0x228
> Jul 16 02:42:54 nuc /bsd: sched_idle(ffffffff829daff0) at sched_idle+0x24b
> Jul 16 02:42:54 nuc /bsd: end trace frame: 0x0, count: 243
> Jul 16 02:42:54 nuc /bsd: End of stack trace.
> 
> >How-To-Repeat:
>       Unknown. It just happened, and I can't pinpoint the timestamps
> to specific actions.
> >Fix:
>       Unknown.

diff to do the pool_put() from process context

Index: sys/dev/pci/drm/i915/i915_request.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/i915/i915_request.c,v
diff -u -p -r1.17 i915_request.c
--- sys/dev/pci/drm/i915/i915_request.c 7 Feb 2025 11:57:17 -0000       1.17
+++ sys/dev/pci/drm/i915/i915_request.c 8 Apr 2025 06:01:53 -0000
@@ -116,6 +116,13 @@ struct pool *i915_request_slab_cache(voi
 }
 #endif
 
+static void
+i915_rq_free(void *p)
+{
+       struct i915_request *rq = p;
+       pool_put(&slab_requests, rq);
+}
+
 static void i915_fence_release(struct dma_fence *fence)
 {
        struct i915_request *rq = to_request(fence);
@@ -177,7 +184,8 @@ static void i915_fence_release(struct dm
 #ifdef __linux__
        kmem_cache_free(slab_requests, rq);
 #else
-       pool_put(&slab_requests, rq);
+       task_set(&rq->free_task, i915_rq_free, rq);
+       task_add(systq, &rq->free_task);
 #endif
 }
 
Index: sys/dev/pci/drm/i915/i915_request.h
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/i915/i915_request.h,v
diff -u -p -r1.6 i915_request.h
--- sys/dev/pci/drm/i915/i915_request.h 16 Jan 2024 23:38:08 -0000      1.6
+++ sys/dev/pci/drm/i915/i915_request.h 8 Apr 2025 06:00:15 -0000
@@ -357,6 +357,8 @@ struct i915_request {
                struct list_head link;
                unsigned long delay;
        } mock;)
+
+       struct task free_task;
 };
 
 #define I915_FENCE_GFP (GFP_KERNEL | __GFP_RETRY_MAYFAIL | __GFP_NOWARN)

Reply via email to