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

Unable to run on Windows ARM with Snapdragon X Elite #534

Open
cwhite92 opened this issue Aug 29, 2024 · 16 comments
Open

Unable to run on Windows ARM with Snapdragon X Elite #534

cwhite92 opened this issue Aug 29, 2024 · 16 comments
Labels
bug Something isn't working

Comments

@cwhite92
Copy link

Bug description

NixOS imports fine on Windows ARM but when attempting to run NixOS via wsl -d NixOS the following error is thrown on Windows ARM with a Snapdragon X Elite (Microsoft Surface 7):

Catastrophic failure
Error code: Wsl/Service/E_UNEXPECTED

Happy to get more detailed logs if needed (not sure how though). Not sure if it's relevant but Ubuntu and Kali Linux both seem to work fine.

To Reproduce

  1. Follow Quick Start instructions in README to import NixOS into WSL
  2. Attempt to run NixOS via wsl -d NixOS
  3. Above error is given

Logs

Catastrophic failure
Error code: Wsl/Service/E_UNEXPECTED

WSL version

WSL version: 2.2.4.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.61
MSRDC version: 1.2.5326
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26091.1-240325-1447.ge-release
Windows version: 10.0.26100.1591
@cwhite92 cwhite92 added the bug Something isn't working label Aug 29, 2024
@cwhite92 cwhite92 changed the title Unable to start on Windows ARM Unable to run on Windows ARM with Snapdragon X Elite Aug 29, 2024
@RoadRoller01

This comment was marked as off-topic.

@RoadRoller01
Copy link

i got wsl logs via collect-wsl-logs and i am analyze it right now

@nzbr
Copy link
Member

nzbr commented Sep 2, 2024

Just to be sure: Did you build your own tarball targeting aarch64-linux? The one from our releases is for x86_64 and will not run on ARM

@RoadRoller01
Copy link

@nzbr cool, but how?, i have nix on my other x86 machine, so how i can force it to build for aarch64?

@RoadRoller01
Copy link

hello i build via debian arm wsl, with this commit #530 and it still did not work, the error it appear to cause the problem is

PartA_PrivTags : 16777216
code : 
failurecount : 10
file : D:\a\1\s\src\windows\wslcore\lib\WslCoreInstance.cpp
function : 
hr : 0x8000FFFF
linenumber : 384
message : D:\a\1\s\src\windows\wslcore\lib\WslCoreInstance.cpp(474)\wslservice.exe!00007FF6FCC919CC: (caller: 00007FF6FCB756A0) Exception(10) tid(45f8) 8000FFFF Catastrophic failure
    Msg:[Expected 12 bytes, but received 0] 

threadid : 17912
wslVersion : 2.2.4.0

@RoadRoller01
Copy link

also there was an error that it did not found swap.vhdx so i copied debian swap.vhdx to it path , and it got fixed
WslCoreInstance error was always there before and after the fix

@malik-n
Copy link

malik-n commented Sep 5, 2024

@nzbr cool, but how?, i have nix on my other x86 machine, so how i can force it to build for aarch64?

If you are using a flake based config it should be something like

outputs = { self } @inputs:
  nixosConfigurations.<hostname> = {
    /* ... */
    system = "aarch64-linux";
  };

Or are you talking about cross compiling?

@nzbr
Copy link
Member

nzbr commented Sep 5, 2024

@RoadRoller01 where did you get those logs from? What does dmesg say (run it in another distro)

@RoadRoller01
Copy link

@RoadRoller01
Copy link

dmesg? do you mean the dmesg of the distro i am building the repository on? idk how it will help you yet i will tell you

@nzbr
Copy link
Member

nzbr commented Sep 5, 2024

The VM is shared, so dmesg in any distro on the same machine will show the kernel logs for all other distros as well

@RoadRoller01
Copy link

oooh okay 👍, i can’t do it right now, so i will send it tomorrow.

@RoadRoller01
Copy link

dmesg.txt
@nzbr that's it

@TophC7
Copy link

TophC7 commented Sep 23, 2024

I tried using this
https://nix-community.github.io/NixOS-WSL/building.html
to build an arm image but it did not work i still got the catastrophic failure
I changed the hosts configuration to system = "aarch64-linux"; as well so what am I missing how can I build this tar for wsl?

@nzbr
Copy link
Member

nzbr commented Oct 13, 2024

dmesg.txt @nzbr that's it

Thanks. Unfortunately there's no crash message from our systemd shim there, so this doesn't really help either. It probably doesn't get far enough to set that up

@thashepherd
Copy link

thashepherd commented Oct 17, 2024

WslLogs-2024-10-17_13-20-21.zip
I'm running into this issue as well. Note that I didn't attempt to rebuild for aarch64-linux or anything like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants