-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
ICE on Windows: "incorrect function" #40282
Comments
If someone on Windows could attempt to reproduce today, that'd be nice. Especially if they could get a backtrace with source lines (building from rustc src should work, but uncertain due to Windows). |
I can't reproduce with a custom built rustc from yesterday's master:
It also appears I can't reproduce with an old nightly (but a month newer than the version OP reported) I had lying around:
Edit: The xargo version installed is different too, v0.3.7 instead of v.0.3.5, but the versions of |
Going to close, then. If anyone can reproduce, let us know! |
Hi all. I finally found the problem and solved it. And I think it might be related to other issues, so I put information here although it's closed. The "Incorrect function" is an error code from Win32 (MSDN), and its might be "used in generic device access error" (source). My case is that the %TEMP% is set to a folder on a Ramdisk where rustc/cargo would save some intermediate files during building (something like But it's not only about Ramdisk, I've found these unsolved issues (#43801 #31178) have the same ICE on VirtualBox shared folders and network drives. So it's actually an issue about IO operations on some "special" devices on Windows. Since I have not digged into the source code of cargo/rustc, I can't tell whether it's an issue for rustc, VirtualBox, Ramdisk and network drives or Win32 API. This error could not be reproduced if you just use Finally, if you are interested in this specific issue, here's how to reproduce it:
|
Found a similar issue #43215, although it's not "incorrect function" but "Access is denied.". The common problem of these issues (#31178, #43215 and #40282) is that |
Have the same issue when using a Ramdrive as temp folder on windows 10 and using rustc 1.53.0 |
The problem is not ramdrives exactly. It's just that some ramdrive drivers do not fully implement the kernel interface. This means some basic Windows API functions will fail. I have created a workaround for one of the issues caused by this but I don't know if it'll be accepted because it means you might see weird looking paths in the output. I am investigating other solutions too. |
In my case I'm using ImDisk's Ramdrive |
Yeah, that's the one that usually causes the issue. I know the Radeon ram disk works but the free version is limited to 4GB. |
It happens when I try to install xargo via
cargo install xargo
, but it's an internel compiler error so I think it should be reported here. I've searched for the error message "incorrect function", but there is no relevant issue. (#31178 seems to be related to VirtualBox)Logs (with RUST_BACKTRACE=full)
If I run this command multiple times, the panic happens randomly on different packages.
Failed on dbghelp-sys
Failed on
rustc_version
Details
rustc version:
The toolchain
stable-x86_64-pc-windows-msvc (rustc 1.15.1)
,nightly-x86_64-pc-windows-gnu
does not work either.It also failed on
rand
and other packages.When
RUST_LOG
is set todebug
, the output has 618563 lines and i could not found any helpful information different from the backtrace.I've tried a different binary package from Cargo like gcc and it is installed without problem.
I've also managed to clone
rustc-version
from the repo (https://github.com/Kimundi/rustc-version-rs/tree/v0.1.7) and dbghelp-sys from the repo (https://github.com/retep998/winapi-rs) and build them usingcargo build
,cargo build --release
.The command runs successfully on Linux
The text was updated successfully, but these errors were encountered: