-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
make_any_gap_element() should not be called inside sig_on() #27140
Comments
comment:1
This is with the cypari2-2.0.3 update, for the record |
comment:2
The problem is that this
should not be run under CC @embray because he might know why this is done this way and whether this |
This comment has been minimized.
This comment has been minimized.
comment:3
Note that these GC-related failures are not "random" strictly speaking. They are deterministic, but require a very precise set of conditions to reproduce. |
comment:5
For reference, this is the code structure for the PARI interface:
It should be this way for GAP too. |
comment:7
Replying to @jdemeyer:
I need to take a closer look at the code but I'm sure you're right that it needs to be more precisely bracketed in its use of |
comment:8
After reading the GAP code on gap-system/gap#3096, I'm pretty sure that there are race conditions too with the current code structure. For extra safety, we could wrap the |
comment:9
I'm sure there are, but I wouldn't want to go nuts unless there's something provable there. You don't want to make GAP functions uninterruptible. |
comment:10
Replying to @embray:
No, I only want to protect
Of course, we could use macros to make this less painfull to write. |
comment:11
Yes, I just came back to comment to say I realized that's what you meant. That makes sense to me. I was thinking about what you wrote on the PR about I think I thought differently because cysignals, which obviously influenced a lot of this, uses it for |
comment:13
This fixes the New commits:
|
Commit: |
comment:14
As you can see, I also took the opportunity to use the coercion model |
Author: Jeroen Demeyer |
comment:16
From a somewhat quick look-over, everything seems fine to me. However, I do not claim to fully understand what goes on in |
comment:17
Replying to @tscrim:
The commit under review is the last one, which doesn't change |
comment:18
Replying to @jdemeyer:
Ah, sorry, I missed the changes to it on #27155 (read too quickly). Actually, I just have one little question: is this meant to be a comment, definition, or just a note to yourself?
|
comment:19
Replying to @tscrim:
See https://cython.readthedocs.io/en/latest/src/userguide/external_C_code.html#including-verbatim-c-code and cython/cython#1915 |
comment:20
Replying to @jdemeyer:
That was what I was thinking, but I didn't know Cython could do that. Thank you. LGTM. |
Reviewer: Travis Scrimshaw |
comment:21
I seem to recall looking at that code previously and wondering why it didn't use the coercion system for |
comment:22
Replying to @tscrim:
That's because it's relatively new! And long overdue. |
Changed branch from u/jdemeyer/make_any_gap_element___should_not_be_called_inside_sig_on__ to |
As explained in #27060, we shouldn't be allocating/deallocating Python objects inside
sig_on()
:Depends on #26992
Depends on #27155
CC: @jdemeyer @embray @tscrim
Component: group theory
Keywords: random_fail
Author: Jeroen Demeyer
Branch/Commit:
1570071
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/27140
The text was updated successfully, but these errors were encountered: