-
-
Notifications
You must be signed in to change notification settings - Fork 294
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
Error in fallback path for catching logging errors #3012
Comments
cc @vchuravy didn't michel or someone else hit this? |
The displayed error comes from printing to
So I guess there's actually two issues here, one from failing to display the log, sending us to the catch block, and one from failing to print to |
As an experiment, I inserted In other words, the catch block is broken independently of GPUCompiler. The Then there's the more fundamental issue of why GPUCompiler logs end up in the catch block in the first place. But fixing the catch block would make this a lot easier to debug. |
The incompatibility with GPUCompiler logs is due to the Not sure how to reconcile the need to avoid task switching here with the reason for introducing #2026 in the first place. The issue with the catch block seems to go away if |
Actually, that last parenthetical issue can be fixed by using const original_stdout = IOContext(Core.stdout, :color => get(stdout, :color, false))
const original_stderr = IOContext(Core.stderr, :color => get(stderr, :color, false)) |
Since JuliaGPU/GPUCompiler.jl#622 was merged and released, GPUCompiler logs don't crash anymore, so I renamed this issue to refer specifically to the error in the logging fallback path which is fixed by #3013 |
GPUCompiler.jl implements slightly tweaked loggers for safe use in generated functions:
https://github.com/JuliaGPU/GPUCompiler.jl/blob/27d4b190243f9a4440e8c0bfda876af89dd1140e/src/utils.jl#L55-L73
Pluto.jl fails to display these logs, instead erroring with
ArgumentError: Base.TTY(RawFD(4294967295) invalid status, 0 bytes waiting) is not initialized
.MWE notebook (this does not require a GPU, GPUCompiler is only used via Enzyme): https://gist.github.com/danielwe/c30299b9c11bb0cc5ce182913b640da3
In the REPL this emits a warning:
In Pluto it errors:
Screencast.from.08-25-2024.11.33.19.AM.webm
The text was updated successfully, but these errors were encountered: