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
Pari initialization segfaults in Cygwin since #22633 #22810
Comments
Replying to @embray:
The question now becomes: why? Does everything work fine if you remove the line For debugging, it would be useful to print the values of |
comment:2
Yes, that's what I'm trying to do now. |
comment:3
I guess that |
comment:4
The problem is not so much In this case the |
comment:5
I also found some relevant discussion here: http://cygwin.1069669.n5.nabble.com/mmap-MAP-FIXED-vs-mprotect-td98125.html But I think it's fine as long as you |
comment:6
Replying to @embray:
With multi-threading, there is a non-zero chance of things going wrong. For the record, calling |
Dependencies: #22675 |
comment:7
Right, I think that would be a bug too--the thread I linked to above has some comment about that. Honestly, I might just add a patch that reverts to the old mprotect-based approach on Cygwin. |
comment:9
I spent some more time poking at this, and what I found is that it suffices on Cygwin to This means, unfortunately, having to put an |
comment:10
Thanks for the analysis. Do you have a patch ready? |
comment:11
Incoming. |
comment:12
Remember to base this ticket on top of #22675. |
comment:13
Yep, that's the plan. |
Commit: |
Author: Erik Bray |
Branch: u/embray/cygwin/ticket-22810 |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:16
Seems to work now. |
Reviewer: Travis Scrimshaw |
comment:17
Jeroen, any more comments on this? Since this worked for me on Cygwin, I would set this to a positive review. However, you know much more about Pari than I do. |
comment:18
Replying to @tscrim:
Define "worked". Did you run the PARI testsuite? And the Sage doctests in If both of these pass, then it's fine for me. |
comment:19
I did all of the above, but Travis should confirm if possible. |
comment:20
Please by my CI, Travis (sorry, you probably get that all the time...) |
Changed reviewer from Travis Scrimshaw to Travis Scrimshaw, Jeroen Demeyer |
comment:21
I will be your CI. :P Built okay and tests pass. |
Changed branch from u/embray/cygwin/ticket-22810 to |
Changed commit from |
Upstream: Not yet reported upstream; Will do shortly. |
comment:23
This still needs to be reported upstream, however. |
comment:24
Right. Should I? |
Sorry, I thought I had tested the last version of the patch in #22633. But I think I just tested it in PARI/GP, but not in Sage itself, since my Sage build was broken at the time for other reasons.
The offending line is here. It seems that
MAP_FIXED
is not working correctly for some reason, but the resulting call topari_err
segfaults because the pari mainstack is left in an invalid state.I'm not sure if this is a bug in Cygwin or what, but I'm trying to put together a simplified test case.
Depends on #22675
Upstream: Not yet reported upstream; Will do shortly.
CC: @jdemeyer
Component: porting: Cygwin
Keywords: windows cygwin pari mmap
Author: Erik Bray
Branch:
00a5d73
Reviewer: Travis Scrimshaw, Jeroen Demeyer
Issue created by migration from https://trac.sagemath.org/ticket/22810
The text was updated successfully, but these errors were encountered: