Only one distro is usable at a time.
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
Environment
Windows build number: Version 10.0.21318.1000
Your Distribution version: [Ubuntu 20.10 rolled forward from 20.04] + Fedora33 + CentOS7, ...
Whether the issue is on WSL 2 and/or WSL 1: [WSL2]
Steps to reproduce
- Start 1st distro wsl -d my1stDistro -u root
- Open new rootless version
- Start 2nd distro wsl -d my2nd distro -u root
Output: random error messages from ERROR xxx to "Catastrophic failure"
-->
It is expected in the account the current WSL 2 architecture. The chances that 2 distros can run without conflicts between TCP ports or filesystems configured in fstabs are absolute zero! This is also not the intention. But why it is allowed in WSL2 at all?
WSL logs:
Expected behavior
WSL v2 Distros must be switched instead of running in parallel. Already running distro must be stopped using Poweroff signal before attempting to start the new one.
Actual behavior
All kinds of error codes depending on what distros run.
Collected logs excerpt from Ubuntu:
[ 14.732952] init: (1) ERROR: UtilCreateProcessAndWait:656: /sbin/ldconfig failed with status 0x
[ 14.732954] 7
[ 14.748275] init: (1) ERROR: ConfigApplyWindowsLibPath:2420: Processing ldconfig failed
[ 14.759625] sd 0:0:0:1: rejecting I/O to offline device
[ 14.767138] EXT4-fs error (device sdb): __ext4_find_entry:1531: inode #24578: comm init: reading directory lblock 0
[ 14.782488] sd 0:0:0:1: rejecting I/O to offline device
[ 14.790301] Buffer I/O error on dev sdb, logical block 0, lost sync page write
[ 14.800809] EXT4-fs (sdb): I/O error while writing superblock
[ 14.809077] init: (1) ERROR: UtilMkdir:1449: mkdir(/mnt/wsl, 755) failed 5
[ 14.818985] init: (1) ERROR: ConfigInitializeInstance:1084: creat /etc/hostname failed: 30
[ 14.818987]
[ 14.833162] init: (1) ERROR: ConfigInitializeInstance:1105: creat /etc/hosts failed 30
[ 14.844773] sd 0:0:0:1: rejecting I/O to offline device
[ 14.852376] EXT4-fs warning (device sdb): ext4_dx_find_entry:1641: inode #1613: lblock 7: comm init: error -5 reading directory block
[ 14.869634] init: (3) ERROR: UtilCreateProcessAndWait:636: /bin/mount failed with 5
[ 14.880655] init: (1) ERROR: UtilCreateProcessAndWait:656: /bin/mount failed with status 0x
[ 14.880657] ff00
[ 14.895364] init: (1) ERROR: ConfigMountFsTab:2457: Processing fstab with mount -a failed.
[ 14.907383] sd 0:0:0:1: rejecting I/O to offline device
Starting [0;1;39mOpenBSD Secure Shell server[0m...
[[0;1;31mFAILED[0m] Failed to start [0;1;39mOpenBSD Secure Shell server[0m.
Ubuntu is able to bootstrap only if all other ditros are taken down!
The single VM is able to run only 1 distro at a time - it is OK. Why WSL allows starting more than 1 ?????
Two OpenSSH servers configured to start automatically in 2 distros will conflict 100% unless their configuration is corrected manually. Upon FS mount errors Ubuntu tries to make root FS read-only, i.e. makes the distro unusable.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the two-distro sequence with wsl -d my1stDistro -u root and wsl -d my2ndDistro -u root, then review the WSL2 distro and single-VM behavior described in the issue. Done means parallel starts no longer produce the reported filesystem, mount, and initialization errors, with the intended stop-or-switch behavior clearly enforced.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100