+
Skip to content

wsl will not run for users in more than 31 groups #12755

@josephtingiris

Description

@josephtingiris

Windows Version

Microsoft Windows [Version 10.0.26100.3476]

WSL Version

WSL version: 2.4.13.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

Linux version 5.15.167.4-microsoft-standard-WSL2 (root@f9c826d3017f) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) #1 SMP Tue Nov 5 00:21:55 UTC 2024

Distro Version

Ubuntu 24.04

Other Software

Base install, no extra software.

Repro Steps

Add a user to > 31 groups via /etc/group and then try to run wsl -u <user>. It will fail, i.e.

PS C:\Users\jting> wsl -u jtingiris
<3>WSL (5397) ERROR: No such file or directory @init.cpp:603 (CreateProcessCommon)
<3>WSL (5397 - Relay) ERROR: CreateProcessCommon:647: Create process failed
PS C:\Users\jting> wsl -u jtingiris ls
<3>WSL (5401) ERROR: No such file or directory @init.cpp:603 (CreateProcessCommon)
<3>WSL (5401 - Relay) ERROR: CreateProcessCommon:647: Create process failed

Expected Behavior

It should not fail. The maximum number of groups for linux > 2.6.4 is 64k, per:

https://www.kernel.org/doc/html/v6.12/admin-guide/sysctl/kernel.html#ngroups-max

Also see:

https://www.man7.org/linux/man-pages/man2/getgroups.2.html
https://www.j3e.de/ngroups.html

Actual Behavior

PS C:\Users\jting> wsl -u jtingiris
<3>WSL (5397) ERROR: No such file or directory @init.cpp:603 (CreateProcessCommon)
<3>WSL (5397 - Relay) ERROR: CreateProcessCommon:647: Create process failed
PS C:\Users\jting> wsl -u jtingiris ls
<3>WSL (5401) ERROR: No such file or directory @init.cpp:603 (CreateProcessCommon)
<3>WSL (5401 - Relay) ERROR: CreateProcessCommon:647: Create process failed

Diagnostic Logs

attached in a comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载