rust-lang / rust-lang/rustup

rustc.exe: 0xC0000142 (`STATUS_DLL_INIT_FAILED`) multiple times while performing `rustup update`

Open
#3,003 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
22h 40m
Merged PRs (30d)
46

Description

Problem

When updating through rustup update, multiple error windows appear, reporting 0xC0000142 when trying to start rustc.exe.
The update process completes itself successfully, and both rustc and cargo work without any visible flaws after it.

Output (note the errors on obtaining version at the end):

$> rustup update
info: syncing channel updates for 'stable-i686-pc-windows-gnu'
699.8 KiB / 699.8 KiB (100 %) 414.5 KiB/s in  1s ETA:  0s
info: latest update on 2022-05-19, rust version 1.61.0 (fe5b13d68 2022-05-18)
info: downloading component 'cargo'
  7.3 MiB /   7.3 MiB (100 %)   1.2 MiB/s in 14s ETA:  0s
info: downloading component 'rust-mingw'
  4.0 MiB /   4.0 MiB (100 %)   1.1 MiB/s in  4s ETA:  0s
info: downloading component 'rust-std'
 25.2 MiB /  25.2 MiB (100 %)   1.2 MiB/s in 22s ETA:  0s
info: downloading component 'rustc'
 70.6 MiB /  70.6 MiB (100 %)   1.1 MiB/s in  1m  3s ETA:  0s
info: removing previous version of component 'cargo'
info: removing previous version of component 'rust-mingw'
info: removing previous version of component 'rust-std'
info: removing previous version of component 'rustc'
info: installing component 'cargo'
info: installing component 'rust-mingw'
info: installing component 'rust-std'
 25.2 MiB /  25.2 MiB (100 %)   8.7 MiB/s in  3s ETA:  0s
info: installing component 'rustc'
 70.6 MiB /  70.6 MiB (100 %)   5.3 MiB/s in 13s ETA:  0s
  6 IO-ops /   6 IO-ops (100 %)   0 IOPS in  2s ETA: Unknown
info: syncing channel updates for 'stable-i686-pc-windows-msvc'
info: latest update on 2022-05-19, rust version 1.61.0 (fe5b13d68 2022-05-18)
info: downloading component 'cargo'
  3.7 MiB /   3.7 MiB (100 %)   1.1 MiB/s in 10s ETA:  0s
info: downloading component 'rust-std'
 24.5 MiB /  24.5 MiB (100 %)   1.2 MiB/s in 21s ETA:  0s
info: downloading component 'rustc'
 56.0 MiB /  56.0 MiB (100 %)   1.2 MiB/s in 47s ETA:  0s
info: removing previous version of component 'cargo'
info: removing previous version of component 'rust-std'
info: removing previous version of component 'rustc'
info: installing component 'cargo'
info: installing component 'rust-std'
 24.5 MiB /  24.5 MiB (100 %)   7.9 MiB/s in  2s ETA:  0s
info: installing component 'rustc'
 56.0 MiB /  56.0 MiB (100 %)   9.8 MiB/s in  5s ETA:  0s
info: syncing channel updates for 'stable-x86_64-pc-windows-gnu'
info: latest update on 2022-05-19, rust version 1.61.0 (fe5b13d68 2022-05-18)
info: downloading component 'cargo'
  7.0 MiB /   7.0 MiB (100 %)   1.2 MiB/s in  6s ETA:  0s
info: downloading component 'rust-mingw'
  4.2 MiB /   4.2 MiB (100 %)   1.2 MiB/s in  3s ETA:  0s
info: downloading component 'rust-std'
 25.3 MiB /  25.3 MiB (100 %)   1.1 MiB/s in 21s ETA:  0s
info: downloading component 'rustc'
 70.1 MiB /  70.1 MiB (100 %)   1.3 MiB/s in 57s ETA:  0s
info: removing previous version of component 'cargo'
info: removing previous version of component 'rust-mingw'
info: removing previous version of component 'rust-std'
info: removing previous version of component 'rustc'
info: installing component 'cargo'
info: installing component 'rust-mingw'
info: installing component 'rust-std'
 25.3 MiB /  25.3 MiB (100 %)   8.3 MiB/s in  2s ETA:  0s
info: installing component 'rustc'
 70.1 MiB /  70.1 MiB (100 %)   8.7 MiB/s in  7s ETA:  0s
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
info: latest update on 2022-05-19, rust version 1.61.0 (fe5b13d68 2022-05-18)
info: downloading component 'cargo'
  3.9 MiB /   3.9 MiB (100 %)   1.2 MiB/s in 13s ETA:  0s
info: downloading component 'rust-std'
 24.6 MiB /  24.6 MiB (100 %)   1.2 MiB/s in 20s ETA:  0s
info: downloading component 'rustc'
 56.7 MiB /  56.7 MiB (100 %)   1.2 MiB/s in 47s ETA:  0s
info: removing previous version of component 'cargo'
info: removing previous version of component 'rust-std'
info: removing previous version of component 'rustc'
info: installing component 'cargo'
info: installing component 'rust-std'
 24.6 MiB /  24.6 MiB (100 %)   7.8 MiB/s in  2s ETA:  0s
info: installing component 'rustc'
 56.7 MiB /  56.7 MiB (100 %)   8.1 MiB/s in 11s ETA:  0s
info: syncing channel updates for 'nightly-i686-pc-windows-gnu'
info: latest update on 2022-06-08, rust version 1.63.0-nightly (5435ed691 2022-06-07)
info: downloading component 'cargo'
  7.5 MiB /   7.5 MiB (100 %)   1.3 MiB/s in  7s ETA:  0s
info: downloading component 'rust-mingw'
  4.0 MiB /   4.0 MiB (100 %)   1.2 MiB/s in  4s ETA:  0s
info: downloading component 'rust-std'
 24.4 MiB /  24.4 MiB (100 %)   1.2 MiB/s in 21s ETA:  0s
info: downloading component 'rustc'
 68.7 MiB /  68.7 MiB (100 %)   1.2 MiB/s in 58s ETA:  0s
info: removing previous version of component 'cargo'
info: removing previous version of component 'rust-mingw'
info: removing previous version of component 'rust-std'
info: removing previous version of component 'rustc'
info: installing component 'cargo'
info: installing component 'rust-mingw'
info: installing component 'rust-std'
 24.4 MiB /  24.4 MiB (100 %)   8.6 MiB/s in  2s ETA:  0s
info: installing component 'rustc'
 68.7 MiB /  68.7 MiB (100 %)   9.3 MiB/s in 14s ETA:  0s
info: syncing channel updates for 'nightly-i686-pc-windows-msvc'
info: latest update on 2022-06-08, rust version 1.63.0-nightly (5435ed691 2022-06-07)
info: downloading component 'cargo'
  3.8 MiB /   3.8 MiB (100 %)   1.2 MiB/s in  4s ETA:  0s
info: downloading component 'rust-std'
 23.7 MiB /  23.7 MiB (100 %)   1.3 MiB/s in 19s ETA:  0s
info: downloading component 'rustc'
 54.1 MiB /  54.1 MiB (100 %)   1.2 MiB/s in 45s ETA:  0s
info: removing previous version of component 'cargo'
info: removing previous version of component 'rust-std'
info: removing previous version of component 'rustc'
info: installing component 'cargo'
info: installing component 'rust-std'
 23.7 MiB /  23.7 MiB (100 %)   8.7 MiB/s in  2s ETA:  0s
info: installing component 'rustc'
 54.1 MiB /  54.1 MiB (100 %)   9.0 MiB/s in 15s ETA:  0s
info: syncing channel updates for 'nightly-x86_64-pc-windows-gnu'
info: latest update on 2022-06-08, rust version 1.63.0-nightly (5435ed691 2022-06-07)
info: downloading component 'cargo'
  7.2 MiB /   7.2 MiB (100 %)   1.2 MiB/s in  6s ETA:  0s
info: downloading component 'rust-mingw'
  4.2 MiB /   4.2 MiB (100 %)   1.1 MiB/s in  4s ETA:  0s
info: downloading component 'rust-std'
 24.5 MiB /  24.5 MiB (100 %)   1.2 MiB/s in 21s ETA:  0s
info: downloading component 'rustc'
 68.4 MiB /  68.4 MiB (100 %)   1.2 MiB/s in 57s ETA:  0s
info: removing previous version of component 'cargo'
info: removing previous version of component 'rust-mingw'
info: removing previous version of component 'rust-std'
info: removing previous version of component 'rustc'
info: installing component 'cargo'
info: installing component 'rust-mingw'
info: installing component 'rust-std'
 24.5 MiB /  24.5 MiB (100 %)   8.7 MiB/s in  2s ETA:  0s
info: installing component 'rustc'
 68.4 MiB /  68.4 MiB (100 %)   9.8 MiB/s in  6s ETA:  0s
  4 IO-ops /   4 IO-ops (100 %)   0 IOPS in  2s ETA: Unknown
info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'
info: latest update on 2022-06-08, rust version 1.63.0-nightly (5435ed691 2022-06-07)
info: downloading component 'cargo'
  4.0 MiB /   4.0 MiB (100 %)   1.3 MiB/s in  3s ETA:  0s
info: downloading component 'rust-std'
 23.6 MiB /  23.6 MiB (100 %)   1.2 MiB/s in 20s ETA:  0s
info: downloading component 'rustc'
 54.9 MiB /  54.9 MiB (100 %)   1.3 MiB/s in 57s ETA:  0s
info: removing previous version of component 'cargo'
info: removing previous version of component 'rust-std'
info: removing previous version of component 'rustc'
info: installing component 'cargo'
info: installing component 'rust-std'
 23.6 MiB /  23.6 MiB (100 %)   8.4 MiB/s in  2s ETA:  0s
info: installing component 'rustc'
 54.9 MiB /  54.9 MiB (100 %)   8.5 MiB/s in  6s ETA:  0s
info: checking for self-updates

      stable-i686-pc-windows-gnu updated - (timeout reading rustc version) (from rustc 1.58.0 (02072b482 2022-01-11))
     stable-i686-pc-windows-msvc updated - (timeout reading rustc version) (from rustc 1.58.0 (02072b482 2022-01-11))
    stable-x86_64-pc-windows-gnu updated - (timeout reading rustc version) (from rustc 1.58.0 (02072b482 2022-01-11))
   stable-x86_64-pc-windows-msvc updated - (timeout reading rustc version) (from rustc 1.58.0 (02072b482 2022-01-11))
     nightly-i686-pc-windows-gnu updated - (timeout reading rustc version) (from rustc 1.60.0-nightly (ec4bcaac4 2022-01-15))
    nightly-i686-pc-windows-msvc updated - (timeout reading rustc version) (from (timeout reading rustc version))
   nightly-x86_64-pc-windows-gnu updated - (timeout reading rustc version) (from (error reading rustc version))
  nightly-x86_64-pc-windows-msvc updated - (timeout reading rustc version) (from (timeout reading rustc version))

info: cleaning up downloads & tmp directories
Steps
  1. rustup update
  2. wait for errors
Possible Solution(s)

I believe it's environment-dependent in some way.
Could you please advise me which additional information do you need and how can I get it?

Notes

OS: Windows 7 Ultimate (Service Pack 1) x64
The bug appears on two independent machines in at least the last year.

Rustup version
$> rustup --version
rustup 1.24.3 (ce5817a94 2021-05-31)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.61.0 (fe5b13d68 2022-05-18)`
Installed toolchains
$> rustup show
Default host: x86_64-pc-windows-msvc
rustup home:  C:\Users\chernov_dd\rust-lang\.rustup

installed toolchains
--------------------

stable-i686-pc-windows-gnu
stable-i686-pc-windows-msvc
stable-x86_64-pc-windows-gnu
stable-x86_64-pc-windows-msvc (default)
nightly-i686-pc-windows-gnu
nightly-i686-pc-windows-msvc
nightly-x86_64-pc-windows-gnu
nightly-x86_64-pc-windows-msvc

active toolchain
----------------

stable-x86_64-pc-windows-msvc (default)
rustc 1.61.0 (fe5b13d68 2022-05-18)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with rustup update on the reported Windows 7 setup, then inspect the rustup --version and rustup show context while observing the rustc.exe errors. No source file or test is identified; done means determining the cause and preventing the repeated initialization failures and version-read timeouts without breaking the update.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.