Closed giuliano108 closed 3 years ago
I've strace
'd init
:
# strace -p 1 -s 1024 -f -o /root/init.txt
and got:
223 socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0 <unfinished ...>
223 <... socket resumed>) = 17
223 connect(17, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 24 <unfinished ...>
223 <... connect resumed>) = 0
223 sendmsg(17, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="<redacted>", iov_len=12}, {iov_base="root\0", iov_len=5}], msg_iovlen=2, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL <unfinished ...>
223 <... sendmsg resumed>) = 17
223 readv(17, <unfinished ...>
223 <... readv resumed>[{iov_base="<redacted>", iov_len=11}, {iov_base="<redacted>", iov_len=1024}], 2) = 24
223 lseek(17, -12, SEEK_CUR <unfinished ...>
223 <... lseek resumed>) = -1 ESPIPE (Illegal seek)
223 close(17 <unfinished ...>
223 <... close resumed>) = 0
223 getpid( <unfinished ...>
223 <... getpid resumed>) = 223
223 writev(3, [{iov_base="<3>init: (223) ERROR: CreateProcessEntryCommon:600: initgroups failed 29\n", iov_len=73}, {iov_base=NULL, iov_len=0}], 2 <unfinished ...>
It looks like Microsoft's /init
tries to do something with /var/run/nscd/socket
, which results in an ESPIPE
error. That's consistent with the initgroups failed 29
message we saw:
$ errno -l | grep ESPIPE
ESPIPE 29 Illegal seek
Stopping nscd
makes it possible to open multiple wsl -d guix
terminals at the same time
This fails right after "booting" the WSL Guix distro with wsl -d guix --exec /busybox sh /root/boot.sh
(as Guix-on-WSL2.md suggests you do):
PS C:\Users\Giuliano> wsl.exe -d guix --exec /busybox sh
PS C:\Users\Giuliano>
If, from within Guix, I run:
bash-5.0# herd stop nscd
Service nscd has been stopped.
bash-5.0#
Then i can open a second terminal:
PS C:\Users\Giuliano> wsl.exe -d guix --exec /busybox sh
/mnt/c/Users/Giuliano #
Quoting from Guix-on-WSL2.md: