-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Segmentation fault #121
Comments
After a bit of playing around with it, it turned out that the code wrapped in sig_on / off was throwing another (unrelated) exception. Once this exception was fixed, the So I would suggest at least a reformulation of the error message, pointing out that the reason could be an unhandled exception. |
@tobiasdiez I'm not sure what you mean. In this case cysignals is working as designed: some code in |
I think, I also realized this after reporting. The thing is that the stacktrace as well as the exception message are not giving any hints that this exception is coming from some other code that is executed after sig_on. It really looks like |
This is just how cysignals and cython work. When you use __pyx_t_1 = sig_on(); if (unlikely(__pyx_t_1 == ((int)0))) __PYX_ERR(0, 99, __pyx_L4_error) Here Upon first call, So from Cython's perspective--and particularly its code for generating a stack frame for the trackback, it thinks line 99 is where the exception occurred. I don't know there's much that can be done about this, and it's a good case for why there should be relatively few lines of C code between a It is possible to have cysignals generate C backtrace during signal handling, but cysignals has to be compiled with the But I wonder if it wouldn't be too harmful if the functionality could be available without More likely, it might be good to just clarify this somewhat in the documentation. |
Thanks for the explanation. Maybe it's already enough to add something like "the following error occurred between sig_on / sig_off" in the error message? |
After installing
cysignals 1.10.2
viapip
(on Ubuntu 20.10), callingsig_on()
results inSegmentation fault
error without giving any further details.See https://github.com/tobiasdiez/sage/runs/1411148176?check_suite_focus=true.
How to further debug/fix this issue?
The text was updated successfully, but these errors were encountered: