microsoft / microsoft/WSL

UID user collision between different WSL distributions

Open
#13,985 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

### Windows Version

Microsoft Windows [Version 10.0.26220.7344]

### WSL Version

2.6.2.0

### Are you using WSL 1 or WSL 2?

- [x] WSL 2
- [ ] WSL 1

### Kernel Version

6.6.87.2-1

### Distro Version

Archlinux

### Other Software

systemd 259-1

### Repro Steps

- Enable systemd in my Arch WSL
- Start `podman machine start`
- Start my work WSL
- My Arch work WSL can't start systemd because of UID collision with the user UID of the podman VM

### Expected Behavior

I can start the two VMs independently. I'd argue that two VMs should not interfere between each other.

### Actual Behavior

The `user@1000.service` can't start because it's already running in the other VM. Why are they conflicting?

```
wsl: Failed to start the systemd user session for 'rdb'. See journalctl for more details.
```

Changing the uid manually in one of the distributions solves the problem, but I'd assume the distributions would be isolated?

### Diagnostic Logs

```
Dec 25 15:51:47 CiD unknown: WSL (2 - Interop) ERROR: operator():2755: systemctl is-active user@1000.service returned: failed
Dec 25 15:51:47 CiD kernel: misc dxg: dxgk: dxgkio_is_feature_enabled: Ioctl failed: -22
Dec 25 15:51:47 CiD kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
Dec 25 15:51:47 CiD kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
Dec 25 15:51:47 CiD kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
Dec 25 15:51:47 CiD kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
Dec 25 15:51:47 CiD kernel: misc dxg: dxgk: dxgkio_is_feature_enabled: Ioctl failed: -22
Dec 25 15:51:47 CiD kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
Dec 25 15:51:47 CiD kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
Dec 25 15:51:47 CiD kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
Dec 25 15:51:47 CiD kernel: misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the collision using the reported Arch Linux WSL 2 setup: enable systemd, start the Podman machine, then start the work distribution. Inspect the systemd user-session startup path and the reported `user@1000.service` failure; done means both distributions can start independently without sharing or blocking each other's UID session.

Written by the indexing model from the issue text.

Assessment

Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.