-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Bug: Failed to raise an exception: END_OF_STACK #8387
Comments
It seems to break when trying to print the backtrace. What happens if you disable it? |
similar error on linux and mac, with
|
Someone reported this for |
Might be related to #4276 |
This might get fixed by #8728 |
I just compiled that code example on 0.33 and 0.34 in both standard and release build and they worked fine; however, this doesn't.
So maybe the original issue is fixed, but there's another underlying issue? |
This isn't a bug that broken pipe errors exist. I'm glad they display properly now though. |
@RX14 The error I posted isn't a bug? If that's the case, then should I open an issue to say that getting that error shouldn't tell us to open an issue about it? On a side note, I can't upgrade to Crystal 0.34 because my Lucky app keeps crashing. This error shows up a lot in my logs, so my thought was that it was related. I don't really understand the error though, so I have no idea. |
@jwoertink I think it's totally a bug. It's not bug in the compiler, though. Here's a minimal example that also fails: # foo.cr:
puts "Hello" $ crystal foo.cr | echo
Unhandled exception: Error writing file: Broken pipe (IO::Error)
from /usr/local/Cellar/crystal/0.34.0/src/crystal/system/unix/file_descriptor.cr:82:13 in 'unbuffered_write'
from /usr/local/Cellar/crystal/0.34.0/src/io/buffered.cr:218:5 in 'flush'
from /usr/local/Cellar/crystal/0.34.0/src/io/buffered.cr:179:7 in 'write_byte'
... Could you please fill a separate issue for this? |
I'm sorry, I keep forgetting this is not a bug, @RX14 is right and I even wrote this not so long ago: #7810 (comment) @jwoertink is right though, that the compiler shouldn't crash that way because the stdout is closed. And of course, the message is clear 🙂 I'd like to see those errors with Lucky to understand if that's related in any way. |
@waj https://forum.crystal-lang.org/t/unhandled-exception-error-writing-file-broken-pipe-errno/1396/4 These are the main top of the errors. Beyond those lines just gets in to app specific path stuff. I'm curious though, I can run that line of code through ruby, and even node without any errors. Do they just swallow that exception? I haven't tried another compiled language, so maybe that's the difference? |
@jwoertink let's talk in the issue you just opened so we keep the topic organized for future reference |
Code to reproduce:
You have to compile it with
--release
, then when you run it you get:This was extracted from a larger code that uses
String.build
, which essentially does the same asFoo
.I don't know what's going on, maybe stack corruption of some sort.
The text was updated successfully, but these errors were encountered: