-
-
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
LibGAP exits when out of memory and takes Sage with it #14779
Comments
comment:1
Actually this is in Sage-5.11.beta1 which still has libgap-4.5.7. Something in Sage changed, not libgap. |
comment:6
For Sage 8.2-beta6 I get nice error exception.
But checking for equality in a finitely presented group can still lead to the error described here.
|
comment:7
Checking for equality is undesideable, GAP does try coset enumeration. I suppose you are saying Sage should recover gracefully from this. It is hard as GAP manages memory itself, and crashes. |
comment:8
Yes, that's what I am saying. Whatever GAP does it shouldn't take Sage with it. |
comment:9
Replying to @vit-tucek:
Details please. Can you update the ticket description? |
Changed keywords from none to gap |
This comment has been minimized.
This comment has been minimized.
comment:11
This ticket is something that should be fixed after the GAP + libGAP convergence. Once GAP == libGAP has a proper error handler, this should be easy to fix. |
This comment has been minimized.
This comment has been minimized.
Dependencies: #22626 |
comment:13
This is likely OBE but it would be good to double-check what happens in this case with the new implementation. |
comment:14
It seems that I get a segmentation fault, which is to be expected. But at least it's caught by cysignals and raised as a Python exception and everything seems to recover fine. So I think that's what we want here? I'm not sure that there's a better solution. |
comment:15
I guess at the very least the Sage code for this equality comparison should catch the exception and do something more user-friendly with it. |
comment:17
With gappy this example results in:
But there is not actually a way to change the pre-set memory limit through the libgap/gappy interface. Of course, this needs to be done before initializing the GAP interpreter. But according to the GAP docs for
Apparently this doesn't happen with libgap/gappy since they do not enter the break loop. I'll have to figure out where exactly in GAP this is implemented and see if we can reproduce that functionality. I think it should just happen automatically, but with a warning. |
comment:18
Apparently this doubling just happens automatically when the allocator notices that it's trying to allocate more than the limit. At this point it breaks into the error loop, and if you From the libgap/gappy perspective this means you can just repeat the same operation and have more memory allowed for it. However, it seems to take forever in this case... I still think maybe we could catch this specific error and reproduce it as a warning (cypari2 does something similar when it needs to extend PARI's workspace). |
Changed keywords from gap to gap libgap |
comment:20
cf #34041 for the current state of affairs with this. |
The original example is no longer valid as of Sage 8.2-beta6. The following works nicely and the reason for why it was not working for Sage 5 and 6 was apparently never found.
This is correct and expected behaviour:
But the problem persists in some form as the following (real life) example shows.
Sage should gracefully recover from errors and crashes of external libraries. (Moreover, the notebook interface doesn't give you any clue as to what went wrong. In this case you don't even know that it was GAP who caused the crash.)
Depends on #22626
Component: group theory
Keywords: gap libgap
Issue created by migration from https://trac.sagemath.org/ticket/14779
The text was updated successfully, but these errors were encountered: