Skip to content

Cargo config.toml - "access is denied" #3986

@Inari-Whitebear

Description

@Inari-Whitebear

System:
OS: Windows Home 10 (Anniversary Update)
toolchain: nightly-x86_64-pc-windows-gnu (default)
cargo: cargo 0.19.0-nightly (fa7584c14 2017-04-26)

I have a project at D:\Dev\Rust\arduino-cli. I have tried creating a "config" folder in D:\Dev\Rust\arduino-cli.cargo and it won't work properly. Trying to use C:\Users\Inari.cargo\config doesn't work either.
When that config folder in .cargo is present, cargo just refuses to work, whether or not I put a file inside.

D:\Dev\Rust\arduino-rs>cargo build --verbose
error: Couldn't load Cargo configuration

Caused by:
  Access is denied. (os error 5)

I tried turning Windows Defender off, it didn't help. I tried running Dr.Memory's strace thingy, relevant things form that I can find there is a bunch of this:

NtQueryVolumeInformationFile.FileFsVolumeInformation
	arg 0: 0x1d4 (type=HANDLE, size=0x8)
	arg 1: 0x0000000000f4b318 (type=IO_STATUS_BLOCK*, size=0x8)
	arg 2: 0x0000000000f4b3a0 (type=<struct>*, size=0x8)
	arg 3: 0x18 (type=unsigned int, size=0x4)
	arg 4: 0x1 (type=named constant, size=0x4)
    succeeded =>
	arg 1: status=0x0, info=0x12 (type=IO_STATUS_BLOCK*, size=0x8)
	arg 2: _FILE_FS_VOLUME_INFORMATION {_LARGE_INTEGER {0x1d0d12c03ab2ab1}, int=0xda0486f5, int=0x0, byte|bool=0x1, array(2)={0x0, 0x0}} (type=<struct>*, size=0x8)
	retval: 0x0 (type=NTSTATUS, size=0x4)
NtQueryInformationFile.FileAllInformation
	arg 0: 0x1d4 (type=HANDLE, size=0x8)
	arg 1: 0x0000000000f4b318 (type=IO_STATUS_BLOCK*, size=0x8)
	arg 2: 0x0000000000f4b330 (type=<struct>*, size=0x8)
	arg 3: 0x68 (type=unsigned int, size=0x4)
	arg 4: 0x12 (type=named constant, size=0x4)
    failed (error=0x80000005) =>
	arg 1: status=0x80000005, info=0x68 (type=IO_STATUS_BLOCK*, size=0x8)
	arg 2: _FILE_ALL_INFORMATION {_FILE_BASIC_INFORMATION {_LARGE_INTEGER {0x1d12a1051f2f630}, _LARGE_INTEGER {0x1d2c321e13a5fd0}, _LARGE_INTEGER {0x1d2c321e13a5fd0}, _LARGE_INTEGER {0x1d2c321e13a5fd0}, int=0x10}, _FILE_STANDARD_INFORMATION {_LARGE_INTEGER {0x1000}, _LARGE_INTEGER {0x1000}, int=0x1, byte|bool=0x0, byte|bool=0x1}, _FILE_INTERNAL_INFORMATION {_LARGE_INTEGER {0x5a000000016df4}}, _FILE_EA_INFORMATION {int=0x0}, _FILE_ACCESS_INFORMATION {int=0x100080}, _FILE_POSITION_INFORMATION {_LARGE_INTEGER {0x0}}, _FILE_MODE_INFORMATION {int=0x20}, _FILE_ALIGNMENT_INFORMATION {int=0x1}, _FILE_NAME_INFORMATION {int=0x26, array(2)={0x5c, 0x0}}} (type=<struct>*, size=0x8)
	retval: 0x80000005 (type=NTSTATUS, size=0x4)

The NtQueryVolumeInformationFile.FileFsVolumeInformation succeeds, but the NtQueryInformationFile.FileAllInformation following it fails. (Full log: https://gist.github.com/Inari-Whitebear/ee1cfb6aec0b464cf2b94ac56ba8dd26 )

I also tried running procmon, it seems to disagree and instead says the NtQueryInformationFile.FileAllInformation calls fail repeatedly with BUFFER_OVERFLOW results. I was told on IRC those are expected, it just means the caller hasn't provided a big enough buffer for the result. The callers apparently would just recall it with a bigger buffer. But it never seems to succeed. (Procmon log (CSV): https://gist.github.com/Inari-Whitebear/6674b8975617edfbb24700f44ae71042 )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions