Skip to content

binfmt config cleared on all distro when distro with systemd is terminated #13885

@MiKom

Description

@MiKom

Windows Version

Microsoft Windows [Version 10.0.26200.7462]

WSL Version

WSL version: 2.6.2.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

6.6.87.2-microsoft-standard-WSL2

Distro Version

Ubuntu 24.04

Other Software

No response

Repro Steps

  1. Install two distros with systemd. For example Ubuntu 24.04 and Ubuntu 22.04
  2. Run both of them in separate terminals
  3. terminate one of those in a third terminal (wsl.exe -t "Ubuntu 22.04")
  4. Observe ls /proc/sys/fs/binfmt_misc in the one left open

Expected Behavior

In the distro that is left open, the registered binfmt handlers aren't cleared

Actual Behavior

All binfmt handlers in the non-terminated distro are gone. Including WSLInterop. As if the binfmt handlers were shared somehow.

Diagnostic Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions