#8208·wezterm

WebGpu front end leaks an Event handle per rendered frame on Windows (DX12, AMD)

Author: SingingTreeCreated Sep 26, 2026Updated Sep 26, 2026
Labelsbugneeds:triage

What Operating System(s) are you seeing this problem on?

Windows

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

20260917-114457-b09b56c2

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

wezterm-gui steadily collects unnamed Event handles (access 0x1F0003) while it's drawing frames. At the default max_fps the rate is about 4 per second whenever a TUI is animating. After a week of uptime the process had about 176k handles, almost all of them Events. Other handle types (File, Thread, Process and so on) stayed at normal levels.

The rate depends on how many frames are drawn: hot-reloading max_fps = 1 cut it by about 9 times. It doesn't depend on Lua config; disabling my update-status and format-tab-title handlers made no difference.

OpenGL does not appear to be affected.

To Reproduce

  1. Set front_end = "WebGpu" on Windows.
  2. Run something that redraws constantly, e.g. wezterm cli spawn --new-window -- wsl.exe -e top -d 0.1.
  3. Watch (Get-Process wezterm-gui).HandleCount over a minute.

Configuration

no config

No config needed. It reproduces with wezterm-gui -n --config "front_end='WebGpu'" start --always-new-process -- wsl.exe -e top -d 0.1

Expected Behavior

No handles leaked, as under OpenGL.

Logs

No relevant logs are produced, but I've dumped my GPU info in case helpful:

> wezterm.gui.enumerate_gpus()
[
    {
        "backend": "Vulkan",
        "device": 30032,
        "device_type": "DiscreteGpu",
        "driver": "AMD proprietary driver",
        "driver_info": "26.5.2 (LLPC)",
        "name": "AMD Radeon RX 9070 XT",
        "vendor": 4098,
    },
    {
        "backend": "Dx12",
        "device": 30032,
        "device_type": "DiscreteGpu",
        "driver": "32.0.31007.5012",
        "name": "AMD Radeon RX 9070 XT",
        "vendor": 4098,
    },
    {
        "backend": "Dx12",
        "device": 140,
        "device_type": "Cpu",
        "driver": "10.0.26100.9278",
        "name": "Microsoft Basic Render Driver",
        "vendor": 5140,
    },
    {
        "backend": "Gl",
        "device": 0,
        "device_type": "Other",
        "driver_info": "4.6.0 Compatibility Profile Context 26.5.2.260505",
        "name": "AMD Radeon RX 9070 XT",
        "vendor": 0,
    },
]

Anything else?

No response