Cargo/rustup/rustc crash when installing via rustup on Windows 10


#1

After installing rustup via rustup-init.exe from https://www.rustup.rs/, I get the following when trying to run cargo:

I get similar errors when trying to run rustup or rustc.

Here’s some info from the Windows Application Log:

Faulting application name: cargo.exe, version: 0.0.0.0, time stamp: 0x59122229
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x040ddc30
Faulting process id: 0x2a78
Faulting application start time: 0x01d2db2795df8220
Faulting application path: C:\Users\funsize\.cargo\bin\cargo.exe
Faulting module path: unknown
Report Id: b43340e0-7082-41b9-b71a-19baae7bf8f6
Faulting package full name: 
Faulting package-relative application ID:

And from the Windows Error Reporting file:

Version=1
EventType=BEX
EventTime=131408302216822694
ReportType=2
Consent=1
UploadTime=131408302218054820
ReportIdentifier=d3bd7cc9-471a-11e7-a93a-bcee7b5e7fc2
IntegratorReportIdentifier=b43340e0-7082-41b9-b71a-19baae7bf8f6
WOW64=1
NsAppName=cargo.exe
AppSessionGuid=00002a78-0001-001d-2082-df9527dbd201
TargetAppId=W:0006a483c4281f3b265382ab796e6417471e0000ffff!000096a77ed4d268bf6694b3367a8b485ba0316005ac!cargo.exe
TargetAppVer=2017//05//09:20:10:17!7496b1!cargo.exe
BootId=4294967295
Response.BucketId=0771f936c7df6d1f45627bed4752595c
Response.BucketTable=5
Response.LegacyBucketId=116391601885
Response.type=4
Sig[0].Name=Application Name
Sig[0].Value=cargo.exe
Sig[1].Name=Application Version
Sig[1].Value=0.0.0.0
Sig[2].Name=Application Timestamp
Sig[2].Value=59122229
Sig[3].Name=Fault Module Name
Sig[3].Value=StackHash_b4ee
Sig[4].Name=Fault Module Version
Sig[4].Value=0.0.0.0
Sig[5].Name=Fault Module Timestamp
Sig[5].Value=00000000
Sig[6].Name=Exception Offset
Sig[6].Value=PCH_01
Sig[7].Name=Exception Code
Sig[7].Value=c0000005
Sig[8].Name=Exception Data
Sig[8].Value=00000008
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=10.0.14393.2.0.0.256.48
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=1033
DynamicSig[22].Name=Additional Information 1
DynamicSig[22].Value=b4ee
DynamicSig[23].Name=Additional Information 2
DynamicSig[23].Value=b4ee5de6a2322745523997a782b35692
DynamicSig[24].Name=Additional Information 3
DynamicSig[24].Value=277e
DynamicSig[25].Name=Additional Information 4
DynamicSig[25].Value=277e19c30fbd5f6bb531ec9e027c37c3
UI[2]=C:\Users\funsize\.cargo\bin\cargo.exe
UI[3]=cargo.exe has stopped working
UI[4]=Windows can check online for a solution to the problem.
UI[5]=Check online for a solution and close the program
UI[6]=Check online for a solution later and close the program
UI[7]=Close the program
LoadedModule[0]=C:\Users\funsize\.cargo\bin\cargo.exe
LoadedModule[1]=C:\WINDOWS\SYSTEM32\ntdll.dll
LoadedModule[2]=C:\WINDOWS\System32\KERNEL32.DLL
LoadedModule[3]=C:\WINDOWS\System32\KERNELBASE.dll
LoadedModule[4]=C:\Program Files (x86)\AVG\Antivirus\aswhookx.dll
LoadedModule[5]=C:\WINDOWS\System32\ADVAPI32.dll
LoadedModule[6]=C:\WINDOWS\System32\msvcrt.dll
LoadedModule[7]=C:\WINDOWS\System32\sechost.dll
LoadedModule[8]=C:\WINDOWS\System32\RPCRT4.dll
LoadedModule[9]=C:\WINDOWS\System32\SspiCli.dll
LoadedModule[10]=C:\WINDOWS\System32\CRYPTBASE.dll
LoadedModule[11]=C:\WINDOWS\System32\bcryptPrimitives.dll
LoadedModule[12]=C:\WINDOWS\System32\CRYPT32.dll
LoadedModule[13]=C:\WINDOWS\System32\ucrtbase.dll
LoadedModule[14]=C:\WINDOWS\System32\MSASN1.dll
LoadedModule[15]=C:\WINDOWS\System32\ole32.dll
LoadedModule[16]=C:\WINDOWS\System32\combase.dll
LoadedModule[17]=C:\WINDOWS\System32\GDI32.dll
LoadedModule[18]=C:\WINDOWS\System32\gdi32full.dll
LoadedModule[19]=C:\WINDOWS\System32\USER32.dll
LoadedModule[20]=C:\WINDOWS\System32\win32u.dll
LoadedModule[21]=C:\WINDOWS\System32\PSAPI.DLL
LoadedModule[22]=C:\WINDOWS\System32\SHELL32.dll
LoadedModule[23]=C:\WINDOWS\System32\cfgmgr32.dll
LoadedModule[24]=C:\WINDOWS\System32\windows.storage.dll
LoadedModule[25]=C:\WINDOWS\System32\powrprof.dll
LoadedModule[26]=C:\WINDOWS\System32\shlwapi.dll
LoadedModule[27]=C:\WINDOWS\System32\kernel.appcore.dll
LoadedModule[28]=C:\WINDOWS\System32\shcore.dll
LoadedModule[29]=C:\WINDOWS\System32\profapi.dll
LoadedModule[30]=C:\WINDOWS\System32\WS2_32.dll
LoadedModule[31]=C:\WINDOWS\SYSTEM32\USERENV.dll
LoadedModule[32]=C:\WINDOWS\SYSTEM32\dbghelp.dll
LoadedModule[33]=C:\WINDOWS\SYSTEM32\ktmw32.dll
LoadedModule[34]=C:\WINDOWS\SYSTEM32\ncrypt.dll
LoadedModule[35]=C:\WINDOWS\SYSTEM32\Secur32.dll
LoadedModule[36]=C:\WINDOWS\SYSTEM32\bcrypt.dll
LoadedModule[37]=C:\WINDOWS\SYSTEM32\NTASN1.dll
LoadedModule[38]=C:\WINDOWS\System32\IMM32.DLL
State[0].Key=Transport.DoneStage1
State[0].Value=1
FriendlyEventName=Stopped working
ConsentKey=BEX
AppName=cargo.exe
AppPath=C:\Users\funsize\.cargo\bin\cargo.exe
NsPartner=windows
NsGroup=windows8
ApplicationIdentity=E6F3FA8DF6384C3B97D01E3A649E4CEC
MetadataHash=957958840

I have Visual Studio 2013 installed, which this page makes it seem like is sufficient, but I’m not married to it if a later version would be helpful.

Ideas? Suggestions?

Thanks!


#2

You may try disabling AVG Antivirus just to check if it would help - antiviruses are well known to break programs. If it was successfully disabled, LoadedModule[4]=C:\Program Files (x86)\AVG\Antivirus\aswhookx.dll entry should not appear in Windows Error Reporting file.


#3

Thanks, @xfix, for the response. I should have mentioned that I had already tried it with and without AVG enabled, with no obvious difference.

Here’s a WER file when run with AVG disabled. As you can see the AVG hook isn’t loaded, but cargo, etc. still crash.

Version=1
EventType=BEX
EventTime=131408931572541617
ReportType=2
Consent=1
UploadTime=131408931573741677
ReportIdentifier=5c41fa11-47ad-11e7-a93a-bcee7b5e7fc2
IntegratorReportIdentifier=b90f2b10-ccd5-4cb7-be02-3a41832748d3
WOW64=1
NsAppName=cargo.exe
AppSessionGuid=00001120-0001-001d-377b-381ebadbd201
TargetAppId=W:0006a483c4281f3b265382ab796e6417471e0000ffff!000096a77ed4d268bf6694b3367a8b485ba0316005ac!cargo.exe
TargetAppVer=2017//05//09:20:10:17!7496b1!cargo.exe
BootId=4294967295
Response.BucketId=0771f936c7df6d1f45627bed4752595c
Response.BucketTable=5
Response.LegacyBucketId=116391601885
Response.type=4
Sig[0].Name=Application Name
Sig[0].Value=cargo.exe
Sig[1].Name=Application Version
Sig[1].Value=0.0.0.0
Sig[2].Name=Application Timestamp
Sig[2].Value=59122229
Sig[3].Name=Fault Module Name
Sig[3].Value=StackHash_b4ee
Sig[4].Name=Fault Module Version
Sig[4].Value=0.0.0.0
Sig[5].Name=Fault Module Timestamp
Sig[5].Value=00000000
Sig[6].Name=Exception Offset
Sig[6].Value=PCH_01
Sig[7].Name=Exception Code
Sig[7].Value=c0000005
Sig[8].Name=Exception Data
Sig[8].Value=00000008
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=10.0.14393.2.0.0.256.48
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=1033
DynamicSig[22].Name=Additional Information 1
DynamicSig[22].Value=b4ee
DynamicSig[23].Name=Additional Information 2
DynamicSig[23].Value=b4ee5de6a2322745523997a782b35692
DynamicSig[24].Name=Additional Information 3
DynamicSig[24].Value=277e
DynamicSig[25].Name=Additional Information 4
DynamicSig[25].Value=277e19c30fbd5f6bb531ec9e027c37c3
UI[2]=C:\Users\funsize\.cargo\bin\cargo.exe
UI[3]=cargo.exe has stopped working
UI[4]=Windows can check online for a solution to the problem.
UI[5]=Check online for a solution and close the program
UI[6]=Check online for a solution later and close the program
UI[7]=Close the program
LoadedModule[0]=C:\Users\funsize\.cargo\bin\cargo.exe
LoadedModule[1]=C:\WINDOWS\SYSTEM32\ntdll.dll
LoadedModule[2]=C:\WINDOWS\System32\KERNEL32.DLL
LoadedModule[3]=C:\WINDOWS\System32\KERNELBASE.dll
LoadedModule[4]=C:\WINDOWS\System32\ADVAPI32.dll
LoadedModule[5]=C:\WINDOWS\System32\msvcrt.dll
LoadedModule[6]=C:\WINDOWS\System32\sechost.dll
LoadedModule[7]=C:\WINDOWS\System32\RPCRT4.dll
LoadedModule[8]=C:\WINDOWS\System32\SspiCli.dll
LoadedModule[9]=C:\WINDOWS\System32\CRYPTBASE.dll
LoadedModule[10]=C:\WINDOWS\System32\bcryptPrimitives.dll
LoadedModule[11]=C:\WINDOWS\System32\CRYPT32.dll
LoadedModule[12]=C:\WINDOWS\System32\ucrtbase.dll
LoadedModule[13]=C:\WINDOWS\System32\MSASN1.dll
LoadedModule[14]=C:\WINDOWS\System32\ole32.dll
LoadedModule[15]=C:\WINDOWS\System32\combase.dll
LoadedModule[16]=C:\WINDOWS\System32\GDI32.dll
LoadedModule[17]=C:\WINDOWS\System32\gdi32full.dll
LoadedModule[18]=C:\WINDOWS\System32\USER32.dll
LoadedModule[19]=C:\WINDOWS\System32\win32u.dll
LoadedModule[20]=C:\WINDOWS\System32\PSAPI.DLL
LoadedModule[21]=C:\WINDOWS\System32\SHELL32.dll
LoadedModule[22]=C:\WINDOWS\System32\cfgmgr32.dll
LoadedModule[23]=C:\WINDOWS\System32\windows.storage.dll
LoadedModule[24]=C:\WINDOWS\System32\powrprof.dll
LoadedModule[25]=C:\WINDOWS\System32\shlwapi.dll
LoadedModule[26]=C:\WINDOWS\System32\kernel.appcore.dll
LoadedModule[27]=C:\WINDOWS\System32\shcore.dll
LoadedModule[28]=C:\WINDOWS\System32\profapi.dll
LoadedModule[29]=C:\WINDOWS\System32\WS2_32.dll
LoadedModule[30]=C:\WINDOWS\SYSTEM32\USERENV.dll
LoadedModule[31]=C:\WINDOWS\SYSTEM32\dbghelp.dll
LoadedModule[32]=C:\WINDOWS\SYSTEM32\ktmw32.dll
LoadedModule[33]=C:\WINDOWS\SYSTEM32\ncrypt.dll
LoadedModule[34]=C:\WINDOWS\SYSTEM32\Secur32.dll
LoadedModule[35]=C:\WINDOWS\SYSTEM32\bcrypt.dll
LoadedModule[36]=C:\WINDOWS\SYSTEM32\NTASN1.dll
LoadedModule[37]=C:\WINDOWS\System32\IMM32.DLL
State[0].Key=Transport.DoneStage1
State[0].Value=1
FriendlyEventName=Stopped working
ConsentKey=BEX
AppName=cargo.exe
AppPath=C:\Users\funsize\.cargo\bin\cargo.exe
NsPartner=windows
NsGroup=windows8
ApplicationIdentity=E6F3FA8DF6384C3B97D01E3A649E4CEC
MetadataHash=1087214702

Anyone have other ideas as to what might be causing this?


#4

Interesting report!

Note that the file that is crashing here (C:\Users\funsize.cargo\bin\cargo.exe) is the rustup cargo proxy, not rustup itself (edit: *cargo itself).

This is curious because presumably rustup-init.exe ran successfully, and the rustup proxy is literally the same binary, so it’s something on the proxying path that is crashing.

I assume that cargo itself does not crash. You can test by running C:\Users\funsize.rustup\toolchains\x86_64-pc-windows-msvc\bin\cargo (or something like that).

If you installed via the normal route that your rustup should be a 32-bit executable (I can’t tell from your log), so as an experiment you might try the 64-bit version, which can be installed from https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-gnu/rustup-init.exe (don’t worry about the ‘gnu’ here - it just refers to the target used to build rustup itself; though you could also try the various ‘-msvc’ builds of rustup here).


#5

@khorn could you try uninstalling rustup (if that crashes, delete the .rustup and .cargo folders manually) and then disabling your antivirus before re-downloading and re-installing rustup?

It could be that because the initial installation ran under AVG, that it intercepted the creation of rustup.exe and the proxy binaries, and considered that behaviour to be suspicious, and deliberately disabled them.


#6

OK, I tried running rustup self uninstall, and it crashed as before.

I then deleted the .rustup and .cargo directories as @Diggsey suggested. disabled my antivirus, and reinstalled rustup using a fresh copy of rustup-init.exe (downloaded while antivirus was disabled).

Nothing seems to have changed. They (cargo/rustup/rustc) all still crash. Here’s a Windows log entry:

Faulting application name: rustc.exe, version: 0.0.0.0, time stamp: 0x59122229
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x0178dc30
Faulting process id: 0x10b8
Faulting application start time: 0x01d2de312eb251f3
Faulting application path: C:\Users\funsize\.cargo\bin\rustc.exe
Faulting module path: unknown
Report Id: 483298ce-cf35-47c6-89b9-058968fcaf23
Faulting package full name: 
Faulting package-relative application ID: 

And the associated WER log:

Version=1
EventType=BEX
EventTime=131411641968935619
ReportType=2
Consent=1
UploadTime=131411641970565943
ReportIdentifier=6c785f06-4a24-11e7-a93b-bcee7b5e7fc2
IntegratorReportIdentifier=483298ce-cf35-47c6-89b9-058968fcaf23
WOW64=1
NsAppName=rustc.exe
AppSessionGuid=000010b8-0001-001e-f351-b22e31ded201
TargetAppId=W:00068073d73c4edb46ec2908c32035c334880000ffff!000096a77ed4d268bf6694b3367a8b485ba0316005ac!rustc.exe
TargetAppVer=2017//05//09:20:10:17!7496b1!rustc.exe
BootId=4294967295
Response.BucketId=723c5fb9d160a6d267c381ae11053c65
Response.BucketTable=5
Response.LegacyBucketId=50
Response.type=4
Sig[0].Name=Application Name
Sig[0].Value=rustc.exe
Sig[1].Name=Application Version
Sig[1].Value=0.0.0.0
Sig[2].Name=Application Timestamp
Sig[2].Value=59122229
Sig[3].Name=Fault Module Name
Sig[3].Value=StackHash_2264
Sig[4].Name=Fault Module Version
Sig[4].Value=0.0.0.0
Sig[5].Name=Fault Module Timestamp
Sig[5].Value=00000000
Sig[6].Name=Exception Offset
Sig[6].Value=PCH_E1
Sig[7].Name=Exception Code
Sig[7].Value=c0000005
Sig[8].Name=Exception Data
Sig[8].Value=00000008
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=10.0.14393.2.0.0.256.48
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=1033
DynamicSig[22].Name=Additional Information 1
DynamicSig[22].Value=2264
DynamicSig[23].Name=Additional Information 2
DynamicSig[23].Value=2264db07e74365624c50317d7b856ae9
DynamicSig[24].Name=Additional Information 3
DynamicSig[24].Value=875f
DynamicSig[25].Name=Additional Information 4
DynamicSig[25].Value=875fa2ef9d2bdca96466e8af55d1ae6e
UI[2]=C:\Users\funsize\.cargo\bin\rustc.exe
UI[3]=rustc.exe has stopped working
UI[4]=Windows can check online for a solution to the problem.
UI[5]=Check online for a solution and close the program
UI[6]=Check online for a solution later and close the program
UI[7]=Close the program
LoadedModule[0]=C:\Users\funsize\.cargo\bin\rustc.exe
LoadedModule[1]=C:\WINDOWS\SYSTEM32\ntdll.dll
LoadedModule[2]=C:\WINDOWS\System32\KERNEL32.DLL
LoadedModule[3]=C:\WINDOWS\System32\KERNELBASE.dll
LoadedModule[4]=C:\WINDOWS\System32\ADVAPI32.dll
LoadedModule[5]=C:\WINDOWS\System32\msvcrt.dll
LoadedModule[6]=C:\WINDOWS\System32\sechost.dll
LoadedModule[7]=C:\WINDOWS\System32\RPCRT4.dll
LoadedModule[8]=C:\WINDOWS\System32\SspiCli.dll
LoadedModule[9]=C:\WINDOWS\System32\CRYPTBASE.dll
LoadedModule[10]=C:\WINDOWS\System32\bcryptPrimitives.dll
LoadedModule[11]=C:\WINDOWS\System32\CRYPT32.dll
LoadedModule[12]=C:\WINDOWS\System32\ucrtbase.dll
LoadedModule[13]=C:\WINDOWS\System32\MSASN1.dll
LoadedModule[14]=C:\WINDOWS\System32\ole32.dll
LoadedModule[15]=C:\WINDOWS\System32\combase.dll
LoadedModule[16]=C:\WINDOWS\System32\GDI32.dll
LoadedModule[17]=C:\WINDOWS\System32\gdi32full.dll
LoadedModule[18]=C:\WINDOWS\System32\USER32.dll
LoadedModule[19]=C:\WINDOWS\System32\win32u.dll
LoadedModule[20]=C:\WINDOWS\System32\PSAPI.DLL
LoadedModule[21]=C:\WINDOWS\System32\SHELL32.dll
LoadedModule[22]=C:\WINDOWS\System32\cfgmgr32.dll
LoadedModule[23]=C:\WINDOWS\System32\windows.storage.dll
LoadedModule[24]=C:\WINDOWS\System32\powrprof.dll
LoadedModule[25]=C:\WINDOWS\System32\shlwapi.dll
LoadedModule[26]=C:\WINDOWS\System32\kernel.appcore.dll
LoadedModule[27]=C:\WINDOWS\System32\shcore.dll
LoadedModule[28]=C:\WINDOWS\System32\profapi.dll
LoadedModule[29]=C:\WINDOWS\System32\WS2_32.dll
LoadedModule[30]=C:\WINDOWS\SYSTEM32\USERENV.dll
LoadedModule[31]=C:\WINDOWS\SYSTEM32\dbghelp.dll
LoadedModule[32]=C:\WINDOWS\SYSTEM32\ktmw32.dll
LoadedModule[33]=C:\WINDOWS\SYSTEM32\ncrypt.dll
LoadedModule[34]=C:\WINDOWS\SYSTEM32\Secur32.dll
LoadedModule[35]=C:\WINDOWS\SYSTEM32\NTASN1.dll
LoadedModule[36]=C:\WINDOWS\SYSTEM32\bcrypt.dll
LoadedModule[37]=C:\WINDOWS\System32\IMM32.DLL
State[0].Key=Transport.DoneStage1
State[0].Value=1
FriendlyEventName=Stopped working
ConsentKey=BEX
AppName=rustc.exe
AppPath=C:\Users\funsize\.cargo\bin\rustc.exe
NsPartner=windows
NsGroup=windows8
ApplicationIdentity=A87FC8B363413EE5EC9855C2B04D2060
MetadataHash=-467199516

#7

I should also mention that @brson was correct when he suggested that cargo, etc. themselves do not crash.

Running the executables in .rustup\toolchains\<toolchain-name>\bin seem to work fine. It’s the wrappers/proxies in .cargo\bin that are crashing.

Also, I’m installing the 64-bit version of rust, which for me at least is the default (specifically stable-x86_64-pc-windows-msvc).


#8

I’ve made essentially zero progress getting Rust installed on this particular machine. Is there anywhere else I can look to gather more info on why I’m seeing these crashes?

This almost seems like I’m missing a C/C++ runtime (like a VS Redistributable). Is that possible? If so, how would I tell?


#9

Hi @khorn, this issue is very surprising - it’s not one we’ve ever had reported before.

The really strange part is that the initial installation succeeds, since rustup.exe and rustup-init.exe are the exact same binary.

Could you download rustup-init.exe, use it to install rustup, and then do a comparison of the two files (~/.cargo/bin/rustup.exe vs rustup-init.exe) by computing a hash (Get-FileHash from powershell should work).

If the two files are different, then something is interfering in the rustup installation progress. I’m hesitant to say this, since it’s so rarely the case in practice, but if it’s not security software, it may be that you have some malware on your computer, which is infecting the newly created files.

If the two files are identical, then something else is going on. In that case, you should try to determine what exactly causes the crash to start happening - a likely candidate would be the name of the file rustup.exe vs rustup-init.exe. Other possibilities are the location of the executable, and the environment in which it is being run.


#10

You could try Dependency Walker to see if its missing any libraries.


#11

Again interesting that both the proxy codepath crashed and rustup self uninstall, since those are pretty different.

If you have the ability to capture a stacktrace that could be informative.

One possibility is that rustup is being compiled with CPU features your CPU doesn’t support. This is pretty unlikely though because rustc is supposed to use a fairly conservative CPU definition by default and I don’t believe the rustup build is doing anything to change the default CPU features. It would be good to see what instruction is faulting.


#12

Have you tried the 64-bit rustup? The 32-bit rustup is installed by default.


#13

Ok, the good news is I have figured out what the problem was.

Here’s how it went down:

I tried checking file hashes as @Diggsey’s suggested, and they were identical.

I had already tried using Dependency Walker, and found nothing (but good thinking @cuviper).

I also removed Visual Studio 2013 and installed the VC++ 2015 build tools. No luck.

I had even tried getting some kind of stack trace or getting some info out of the debugger (before I uninstalled it), but with no results (or at least none that meant anything to me).

And then yesterday evening, Microsoft attacked! Whatever algorithm that they use to decide when updates should be applied decided it was time to install the Creator’s Update…which totally disrupted my workday and then took a large part of the evening. Afterwards, I found lots of things acting strangely and ended up reinstalling a bunch of things.

The reason this turned out to be important is that I ended up spending a larger than normal anount of time in the Command Prompt, running lots of commands I don’t run on a daily basis. And then I thought about what @Diggsey said about “the environment in which it is being run”…

Turns out a number of things, only when run from the command prompt were displaying the same kind of behavior that the cargo, etc. wrapper doodad was, i.e. crashing immediately with a “this program has stopped working” dialog box.

So that was a pretty significant clue.

After some more investigation, it appears one of a couple of Command Prompt addons I had installed (ANSICON and Clink, for those interested) had stopped working correctly and were crashing certain programs when run from inside the Command Prompt. I had been loading these using the registry for years and had pretty much become used to them being there, so hadn’t thought about them consciously in some time.

Clearing the registry key that loads these addons fixed the problem. All of the Rust tools (cargo, rustc, rustup, etc.) seem to function as expected now.

So just to make this very plain for anyone who might find this in the future:

The problem was either having ANSICON or Clink loaded in my Command Processor. Removing these fixed the issue.

I don’t know which one was the culprit, as I just removed them both. But one of them definitely was.

Also the versions I had installed were pretty old, so it’s possible that newer versions might not cause this kind of problem, but I have not investigated this yet.

I also have no idea why these things would cause this behavior. They used to work without a problem, but Microsoft made some pretty fundamental changes to the Command Prompt recently, and presumably that interacted with one or both of them in some way such that certain executables no longer liked being run in the resulting environment.

Thanks to all who helped out and provided ideas. You got me there eventually!