Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import uuid in Python always causes Illegal instruction (core dumped) on arm64's Windows + Ubuntu 18.04 #3362

Closed
makotokato opened this issue Jul 7, 2018 · 8 comments

Comments

@makotokato
Copy link

@makotokato makotokato commented Jul 7, 2018

  • Your Windows build number: Microsoft Windows [Version 10.0.17134.137]
  • What you're doing and what's happening:
  1. Setup WSL (Ubuntu 18.04) on Windows/arm64 (I tested on ASUS NovaGo)
  2. Install python or python3
  3. Run import uuid in Python shell.
makoto@DESKTOP:/mnt/c/$ python
Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import uuid
Illegal instruction (core dumped)
makoto@DESKTOP:/mnt/c/$ python3
Python 3.6.5 (default, Apr  1 2018, 05:46:30)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import uuid
Illegal instruction (core dumped)
  • What's wrong / what should be happening instead:
    This script causes Illegal instruction (core dumped). It works on x64 Windows + WSL.

  • Strace of the failing command, if applicable: attaced as python.strace
    python.strace.zip

@ghost
Copy link

@ghost ghost commented Jul 7, 2018

Use sudo when youre in outside wsl environment like /mnt or /media fs

@therealkenc
Copy link
Collaborator

@therealkenc therealkenc commented Jul 7, 2018

I can't repro this here (this is arm64). There is no particular reason you need sudo when operating in /mnt so please don't perpetuate that.

@makotokato
Copy link
Author

@makotokato makotokato commented Jul 8, 2018

@Alternate-Egoist Even if I use sudo, this still occurs. At least, my environment (ASUS NovaGo / Windows ARM64) can reproduce this (The following log is after installing WSL).

Installing, this may take a few minutes...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: makoto
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Installation successful!
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

makoto@DESKTOP-PTOHAAM:~$ python3
Python 3.6.5 (default, Apr  1 2018, 05:46:30)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import uuid
Illegal instruction (core dumped)
makoto@DESKTOP-PTOHAAM:~$ uname -a
Linux DESKTOP-PTOHAAM 4.4.0-17134-Microsoft #137-Microsoft Thu Jun 14 18:46:00 PST 2018 aarch64 aarch64 aarch64 GNU/Linux
makoto@DESKTOP-PTOHAAM:~$ sudo python3 -c 'import uuid'
Illegal instruction (core dumped)
makoto@DESKTOP-PTOHAAM:~$
@therealkenc
Copy link
Collaborator

@therealkenc therealkenc commented Jul 8, 2018

Disregard the sudo. It is going to be an arm64 thing. The strace doesn't tell much because the SIGILL happens entirely in userspace immediately after what looks like a successful mmap().

[...]
5335  read(5, "", 4096)                 = 0
5335  close(5)                          = 0
5335  mmap(NULL, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdd956a0000
5335  --- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPN, si_addr=0x7fdd94f05de8} ---
5335  +++ killed by SIGILL (core dumped) +++

There was an Arm fix in 17692. Might give that a whirl. If you were feeling highly motivated you could deep dive with gdb. But you've provided a straightforward enough repro, and the devs can probably confirm easy enough.

[ed] Actually dotnet/core#1561 was SIGILL too. Smart money says try 17692.

@benhillis
Copy link
Member

@benhillis benhillis commented Jul 10, 2018

I believe @therealkenc is correct, this is an issue @Brian-Perkins fixed recently, we are currently in the process of backporting it to 1803.

@glandium
Copy link

@glandium glandium commented Mar 28, 2019

we are currently in the process of backporting it to 1803.

I guess this was never backported to 1803, since I'm running an up-to-date arm64 1803, and it's still happening. And I don't seem to be able to update to 1809.

@Brian-Perkins
Copy link
Collaborator

@Brian-Perkins Brian-Perkins commented Mar 28, 2019

This fix was actually just released (March 19) as part of KB4489894.

@glandium
Copy link

@glandium glandium commented Mar 28, 2019

Mmmm the most recent Windows update gives me is KB4489868.

Edit: installing with the standalone updater fixed the issue (although now for some reason the signin screen is in English instead of Japanese like it was before).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants