You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Premature exits when downloading toolchain components on Windows, error code 0xC0000005 STATUS_ACCESS_VIOLATION #4173
I'm currently not able to use either Cargo and Rustc for developing my project. I have Rustup 1.27.1 installed on my local machine. I tried to set environment variables and reinstalling it, and restarting the machine, but didn't find the solutions at all.
The error message was:
error: rustup could not choose a version of rustc to run, because one wasn't specified explicitly, and no default is configured.
Sharing a screenshot of my CLI as a proof. Please help me to resolve this issue ASAP.
Steps
Download a installation version (rustup-init.exe) from the official Rust website
@debski-patrick It looks like another program is killing rustup, possibly an antivirus... If, say, rustup itself is the reason why the return code is 1 (abnormal), then it should have at least emitted a warning/error of some sort.
Both Windows 10 and 11 are supported. I personally use Windows 11. It would be super useful if someone with this problem could attach a debugger and see why the process is exiting prematurely.
One thing you can try, if it's failing when it should be downloading then maybe setting the environment variable RUSTUP_USE_CURL to 1 could help. Though that's purely a guess.
changed the title [-]rustup could not choose a version of rustc to run, because one wasn't specified explicitly, and no default is configured[/-][+]Premature exits when downloading toolchain components on Windows, error code 0xC0000005 `STATUS_ACCESS_VIOLATION`[/+]on Dec 1, 2025
@djctracing_subscriber is already online since the last release, so it really depends on whether the part you want to diagnose is printing useful stuff to the terminal or not, I believe.
Just to 2nd @ChrisDenton's suggestion from earlier this year, some kind of native crash information would be extremely beneficial in tracking down this problem if anyone who can reproduce this is able to provide it.
That could be a minidump from an already-crashed instance of rustup or an in-progress crash backtrace from a program like WinDbg attached to rustup once the segfault exception is raised. Even knowing the name of whichever function is causing the crash would be a good start since it at least narrows down where in rustls-platform-verifier is worth further examination.
Activity
ChrisDenton commentedon Feb 3, 2025
It seems like
rustup install stableexited prematurely. Maybe it was killed by some security software?Try doing
rustup install stable & echo %errorlevel%and seeing if the result is non-zero.andrew-ray-edelen commentedon Feb 4, 2025
I'm getting "1" as a result. What should I do for now?
ChrisDenton commentedon Feb 4, 2025
Yeah, that means it's failing unexpectedly which likely means the process is being killed.
Do you know what security software you have installed? It's possible you could add an exclusion for
rustup.exe.andrew-ray-edelen commentedon Feb 4, 2025
What is an example of security software you are talking?
rami3l commentedon Feb 5, 2025
@debski-patrick It looks like another program is killing
rustup, possibly an antivirus... If, say,rustupitself is the reason why the return code is1(abnormal), then it should have at least emitted a warning/error of some sort.andrew-ray-edelen commentedon Feb 5, 2025
Here are some of my apps that seem to be related to the security wise:
Which one do you think blocks installing
Rustamong the above?azurespheredev commentedon Feb 10, 2025
Rustis not compatible with the version of Windows you're running. Try to re-install your OS to Windows 10 and it will work fine.andrew-ray-edelen commentedon Feb 10, 2025
It worked. Thank you! @azurespheredev
codecrown-pro commentedon Apr 21, 2025
I have the same issue, so the windows 11 is not support the rustup? Please let me know
ChrisDenton commentedon Apr 21, 2025
Both Windows 10 and 11 are supported. I personally use Windows 11. It would be super useful if someone with this problem could attach a debugger and see why the process is exiting prematurely.
One thing you can try, if it's failing when it should be downloading then maybe setting the environment variable
RUSTUP_USE_CURLto1could help. Though that's purely a guess.bllackhu commentedon Dec 1, 2025
Windows 11, via command prompt, it appears setting RUSTUP_USE_CURL=1 helps here.
Finished successfully.
rami3l commentedon Dec 1, 2025
@djc Looks like this can be tracked in #3790 then. Reopening...
[-]rustup could not choose a version of rustc to run, because one wasn't specified explicitly, and no default is configured[/-][+]Premature exits when downloading toolchain components on Windows, error code 0xC0000005 `STATUS_ACCESS_VIOLATION`[/+]rami3l commentedon Dec 1, 2025
@djc BTW do you think increasing the amount of log lines will help with your diagnosis?
djc commentedon Dec 1, 2025
Might help. Do we have that in the release already? Would be great if we can get a minidump to narrow this down, too.
rami3l commentedon Dec 1, 2025
@djc
tracing_subscriberis already online since the last release, so it really depends on whether the part you want to diagnose is printing useful stuff to the terminal or not, I believe.@bllackhu Could you try changing the value of the
RUSTUP_LOGenvironment variable to e.g.traceand see what you can get, like explained in https://rust-lang.github.io/rustup/dev-guide/tracing.html#console-based-tracing?complexspaces commentedon Dec 1, 2025
Just to 2nd @ChrisDenton's suggestion from earlier this year, some kind of native crash information would be extremely beneficial in tracking down this problem if anyone who can reproduce this is able to provide it.
That could be a minidump from an already-crashed instance of
rustupor an in-progress crash backtrace from a program like WinDbg attached torustuponce the segfault exception is raised. Even knowing the name of whichever function is causing the crash would be a good start since it at least narrows down where inrustls-platform-verifieris worth further examination.