-
Notifications
You must be signed in to change notification settings - Fork 22
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
using GAP
fails when julia is using multiple threads
#960
Comments
I cannot reproduce this problem under Ubuntu 20.04 with Julia 1.8.5 and 1.9.0, with various values for the |
I have it working perfectly fine with 1.9.3, it seems to be an issue only with julia 1.10
… On Jan 19, 2024, at 12:59 PM, Thomas Breuer ***@***.***> wrote:
I cannot reproduce this problem under Ubuntu 20.04 with Julia 1.8.5 and 1.9.0, with various values for the -t command line option. Would it make sense to try other Julia versions with this setup?
—
Reply to this email directly, view it on GitHub <#960 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AANWIWO5Z2YNFV6UXNMWSKDYPJNYXAVCNFSM6AAAAABCBUNQWSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBQGI4DKNJYGQ>.
You are receiving this because you authored the thread.
|
A workaround to load GAP in a julia session with threads enabled is to disable gcthreads with The following seems to work fine with julia 1.10:
Tests also work in this configuration: |
Thanks for writing up a report, @mjrodgers I can reproduce it with Julia 1.10.0 on macOS. I will look into this, but possibly only after February 1st, due to the book |
There are multiple issues here in the GAP-Julia GC integration. One is the now incorrect usage of the variable Then there is the use of a bunch of global variables in there (in GAP's
|
Just hit the same bug when installing Oscar and got a segmentation fault. |
I made some progress on this today: turns out I have to change function I also added a mutex to protect access to Alas, there are still issues. So the next thing I did was to add a global GAP list and then any allocation is added to that list, and any GC marks that list -- this should prevent any GAP allocation from ever be garbage collected. (Clearly this is not useful for a production system, but it helps to exclude certain issues). But despite this, I am still seeing errors that are highly suggestive of GAP objects being GCed prematurely. Hrm. |
This should be fixed in GAP.jl 0.11.2 and later. |
Edit (@thoma): As a workaround, start julia with
--gcthreads=1
.When starting julia using multiple threads (
julia -t 4
),using GAP
can fail. This also seems to leave julia in a fragile state, and I get a segfault when quitting.Interestingly,
using GAP
seems to work fine if I launch julia using 3 threads, but 4 is a problem.I'm running on an Intel Mac running Sonoma 14.2.1, julia 1.10.0, GAP 0.10.1
The text was updated successfully, but these errors were encountered: