WSL: localedef: ../sysdeps/unix/sysv/linux/spawni.c:360: __spawnix: Assertion `ec >= 0' failed.
- A brief description
When running
locale-genit always failed with the following assertion failure:
localedef: …/sysdeps/unix/sysv/linux/spawni.c:360: __spawnix: Assertion `ec >= 0’ failed.
This is because by default charmaps (/usr/share/i18n/charmaps) are gzipped and localedef invokes posix_spawn in order to decompress those files.
-
Expected results No errors when running locale-gen with gzipped charmap files.
-
Actual results (with terminal output if applicable)
localedef: ../sysdeps/unix/sysv/linux/spawni.c:360: __spawnix: Assertionec >= 0’ failed.` -
Your Windows build number 15063
-
Steps / All commands required to reproduce the error from a brand new installation
- Edit the locale list at
/etc/locale.gen. - Run `locale-gen’ as root.
-
Strace of the failing command None. This bug is easy to be reproduced and the line numbers are available.
-
Required packages and commands to install glibc 2.25
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Reactions: 10
- Comments: 59 (8 by maintainers)
For those who land here and don’t know a lot about linux, unpacking the relevant file (e.g.
gunzip --keep /usr/share/i18n/charmaps/UTF-8.gz) avoids the problem and locale-gen runs.I’ve been working hard at fixing this. Supporting CLONE_VM correctly has required some significant refactoring. Please hold on a little longer.
Good news – we’ve got this fixed in an internal build now, and I’m successfully running Ubuntu 17.10 on my machine.
Sorry this didn’t make 17025 – I’ll post an update once this makes it into an insider build.
Windows Insider Build 17046 has improved CLONE_VFORK and CLONE_VM support.
No 😦. We’ve had some unfortunate delays getting WSL fixes into the insider builds lately. We’ll get that unblocked as soon as we can.
Okay let’s do this one. The crux is the following from man
clone(2):On WSL the caller isn’t being suspended. Actual fail in glibc is here, which got introduced Sept 28th with this commit. Test case below, which is a variation on #1005. It can be run on Xenial. Get the ‘Oops’ path on WSL but not Real Linux. No
stracebecause the syscalls all succeed; unlike #1005 it is behavioral.These errors are all expected pre-build 17046. If you see these errors on 17046 or newer, please let us know.
The behavior is not yet fully compatible. There are still some flags including CLONE_NEWUSER and CLONE_SIGHAND that do not work, and some supported flag combinations that either are not 100% compatible or haven’t yet been verified to be. Some of these we are already looking at and others will be prioritized, as per usual, when interesting scenarios emerge involving them.
For those of you not on the Insider channel, I made a workaround script. If you want to update to Ubuntu 17.10, that should do the trick, but be warned it could have unintended side effects in scenarios I haven’t tested, and could cause problems when you do eventually receive the fix from Microsoft.
This bug is annoying, i have to recompile glibc every time i upgrade it. It wastes me a lot of time.
@oblitum - You can vote for that here.
@therealkenc I can’t say for others but my motivation is enough to have my working Arch now rather than Ubuntu 😉
The same thing also happens when I use clang, from what I can tell.
The same error shows up when attempting to run Fish Shell on an alternative OS. Perhaps it’s related somehow?
https://github.com/alwsl/alwsl/issues/37
absolutely. holding bash only fixes the
do-release-upgradeerroring out on zesty → artful.glad to see a fix is inbound tho.
@ardhitama here too. “solved” it temporarily by holding offending packages before
do-release-upgrade:Extra tidbits, it also affects me after upgrading to
Ubuntu 17.10when doing the firstapt upgrade. With following error:@tuxzz You can make a backup of
/usr/lib/locale/locale-archive, when glibc upgrades, restore it.It’s only “easy to reproduce” if you are on 16.10. I went back to Xenial unfortunately, but wasn’t hitting it at the time I looked in early March (see #1660 - message). Link a gist of
sudo strace -ff locale-genand someone can take a look.