-
-
Notifications
You must be signed in to change notification settings - Fork 26
Add general signal hook but keep pari #181
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
Merged
dimpase
merged 1 commit into
sagemath:main
from
mkoeppe:add_general_signal_hook_but_keep_pari
Sep 25, 2023
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is a typo in this line: it should have been
instead.
In fact, I was having some issues with cysignals 1.12.2 (some doctest failures having to do with alarms, etc) and changing this seems to sovle them.
@kliem can you confirm this is correct?
@antonio-rojas I think this is the fix we were missing. I'm testing, will do a PR tomorrow. Because of the
PARI_SIGINT_pending = 0;
line, the typo doesn't cause trouble (i.e., until that line is removed).To be clear, this is the patch I'm testing on top of 1.12.2:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't quite work for me. Now instead of crashing, tests hang and timeout after 30 minutes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything works "fine" for me (still getting occasional random failures, but that's not new).
The only difference between cysignals 1.11.4 and 1.12.2 in this respect is this change. Although with 1.11.4, in effect, it is both
custom_set_pending_signal(0);
andcustom_signal_unblock();
but I don't think the unblock there is correct.Are you using sagemath/cypari2#167 (included in cypari2 2.2.1)? This could make a difference, maybe. I'm not sure if this code is compiled with legacy_implicit_noexcept, you could check the generated .c file to see if it's "clean" as it should be.
The other patch I'm using on cysignals (already for 1.11.4) is: https://github.com/void-linux/void-packages/blob/master/srcpkgs/python3-cysignals/patches/verify_exc_value.patch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting the same with cypari2 2.2.0 (+pari 2.17 patches)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've released cypari2 2.2.1 - which supports pari 2.17
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, not sure what happened before (possibly some memory issues), but it seems to be working now, except that the random failure I reported in sagemath/sage#38749 (comment) is now permanent (regardless of the used seed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! I have a PR almost ready to submit (including a test to trigger this bug with cypari2).
As for the remaining issue, I'm getting the same, and I'm working on it. This appears to be related to #215. The implementation of
sig_occurred()
seems to be incorrect, in the sense thatsig_occurred()
will sometimes return an old exception that has been already handled.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it a basically a 1-line PR (+ the test)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I wanted to test it further. I'm also working on the remaining issue which seems more tricky, but I think I have a reasonable fix. Hopefully this might get rid of all the stupid heisenbugs that have been pestering us.
I was actually trying to push this to GH a moment ago, but it seems there is a major outage right now (git pull/push from/to github, are not working atm).