I am on the latest (26.6.2) and also have this issue with kernel_task growing to many gigabytes over time even if all windows are closed. I ran a spindump on kernel_task, and got some AI help on the analysis:
What the dump shows
The kernel's 6.6 GB footprint is GPU driver memory (AGX/IOGPUFamily/IOSurface), not a general kernel leak — and the client holding it open is Safari's GPU process, com.apple.WebKit.GPU, not Safari itself.
Key evidence:
1. The kernel-side stacks are all GPU driver, idle-blocked on cleanup The only non-idle kernel work in the trace touches:
- AGXAccelerator::idleUMAEvent → AGXUSCPrivMemPool:😛erformShrinkLocked → IOGPUSysMemory::free (lines 277–286)
- IOGPUScheduler::work_completed → IOFence::complete → IOSurfaceRoot::fence_completed (lines 635–641)
- IOMobileFramebufferAP::io_fence_callback (line 801)
Plus 65 InterruptEventSourceBridge and 40 AppleT8110DART (the memory-address-translation unit) threads in kernel_task — every active GPU client context keeps DART mappings and driver objects wired into the kernel. The kernel runs 670 stacks in IOWorkLoop::threadMain waiting on these. That's why the memory shows up
attributed to kernel_task: IOSurface buffers and GPU command-queue memory are kernel-resident on behalf of whichever process has the GPU contexts open.
2. The smoking gun: stale WebGPU work queues in WebKit.GPU [pid 44258]
That process has 57 threads, including ~14 "WebGPU work queue" threads and ~10 ANGLE-Worker threads whose last ran timestamps are 1.8–8.4 hours old (e.g. last ran 30284.598s ago). These are GPU contexts created by pages/WebGPU content and never torn down — the work queues are alive, the kernel-side IOGPU objects and IOSurfaces they pinned can't be freed, and they keep the DART translation contexts (those 40 AppleT8110DART threads) resident.
3. Corroborating detail: 13 WebContent processes for "one tab"
Most are suspended but still alive (several with 128–575 MB footprints), plus a second, older com.apple.WebKit.GPU [pid 2139] alongside the current one — Safari isn't reaping its per-site processes, and each keeps kernel resources mapped.
Why quitting Safari "fixes" it
When Safari exits, its WebKit.GPU process dies, its IOGPU user clients close, and the kernel finally frees the AGX allocator memory (AGXUSCPrivMemPool) and IOSurfaces. The memory doesn't "hang" in kernel_task while Safari lives because the kernel retains it on behalf of the still-open WebKit.GPU client —
this is a WebKit/Safari WebGPU-context leak, not a kernel bug.
I've filed this as a bug using Apple's Feedback Assistant