Skip to content
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

Permission denied opening libiconv.dll #14314

Closed
Blacksmoke16 opened this issue Feb 21, 2024 · 1 comment · Fixed by #14315
Closed

Permission denied opening libiconv.dll #14314

Blacksmoke16 opened this issue Feb 21, 2024 · 1 comment · Fixed by #14315

Comments

@Blacksmoke16
Copy link
Member

Blacksmoke16 commented Feb 21, 2024

Got some Windows nightly CI failures starting somewhere between c0270c6 and 72aea71: https://github.com/athena-framework/athena/actions/runs/7982635580/job/21799257710

Error opening file with mode 'wb': 'C:\\Users\\runneradmin\\AppData\\Local\\crystal\\cache\\libiconv.dll': Permission denied (File::AccessDeniedError)
           from D:\a\crystal\crystal\src\crystal\system\win32\file.cr:24 in 'open'
           from D:\a\crystal\crystal\src\file.cr:162 in 'new'
           from D:\a\crystal\crystal\src\file.cr:725 in 'copy'
           from D:\a\crystal\crystal\src\file_utils.cr:94 in 'cp'
           from D:\a\crystal\crystal\src\compiler\crystal\compiler.cr:368 in 'copy_dlls'
           from D:\a\crystal\crystal\src\compiler\crystal\compiler.cr:335 in 'codegen'
           from D:\a\crystal\crystal\src\compiler\crystal\compiler.cr:204 in 'compile:combine_rpath'
           from D:\a\crystal\crystal\src\compiler\crystal\compiler.cr:197 in 'compile:combine_rpath'
           from D:\a\crystal\crystal\src\compiler\crystal\command.cr:360 in 'compile'
           from D:\a\crystal\crystal\src\compiler\crystal\command.cr:239 in 'run_command'
           from D:\a\crystal\crystal\src\compiler\crystal\command.cr:112 in 'run'
           from D:\a\crystal\crystal\src\compiler\crystal\command.cr:55 in 'run'
           from D:\a\crystal\crystal\src\compiler\crystal\command.cr:54 in 'run'
           from D:\a\crystal\crystal\src\compiler\crystal.cr:11 in '__crystal_main'
           from D:\a\crystal\crystal\src\crystal\main.cr:129 in 'main_user_code'
           from D:\a\crystal\crystal\src\crystal\main.cr:115 in 'main'
           from D:\a\crystal\crystal\src\crystal\main.cr:141 in 'main'
           from D:\a\crystal\crystal\src\crystal\system\win32\wmain.cr:37 in 'wmain'
           from D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288 in '__scrt_common_main_seh'
           from C:\Windows\System32\KERNEL32.DLL +8[51](https://github.com/athena-framework/athena/actions/runs/7982635580/job/21799257710#step:6:55)68 in 'BaseThreadInitThunk'
           from C:\Windows\SYSTEM32\ntdll.dll +518315 in 'RtlUserThreadStart'
         Error: you've found a bug in the Crystal compiler. Please open an issue, including source code that will allow us to reproduce the bug: https://github.com/crystal-lang/crystal/issues

Maybe related to #14292?

@HertzDevil
Copy link
Contributor

To reproduce on 1.11 stable:

# foo.cr
# run with `crystal run -Dpreview_dll foo.cr`
`crystal run -Dpreview_dll #{__DIR__}\\bar.cr`
# bar.cr

Essentially, the compiler is trying to copy a DLL to the cache directory while another temporary process is already running there. You are seeing this in the latest nightly because -Dpreview_dll is now the default behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants