-
-
Notifications
You must be signed in to change notification settings - Fork 549
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
Configure Python with pydebug when SAGE_DEBUG is set #13864
Comments
Work Issues: tag problem |
Changed work issues from tag problem to none |
Reviewer: Volker Braun |
Dependencies: #13865 |
comment:5
Looks good to me! I'm adding my proposed change to the documentation as a prerequisite to not deviate from whats documented... |
comment:6
Sage claims that the spkg built successfully. However, I see things like
in the install log. Is that normal? |
comment:7
Yes it is (or at least I always had this behavior). |
comment:8
Replying to @jpflori:
Exactly. Some of these optional modules (like "crypt" for example) are required for Sage, that's why we try to import them in Python's |
comment:9
One observation, potentially related with what we discussed on #715: Starting python and importing sage works:
However, importing sage.categories.map.Map does not work:
I don't know whether this should work, but anyway: It doesn't. |
comment:10
I'd say (although I don't know why) it is because it is a Cython module. |
comment:11
I made a gdb spkg at #13866 so you can get a working debugger with the Python debug build. |
comment:12
Some debugging hint: Use
|
comment:13
Replying to @vbraun:
Could you add this to the dev doc in #13865, or here? |
comment:14
Thank you! I was just about to ask how one can see what stuff is being imported. So, -v it is... |
comment:15
Well ideally we'd ship Sage in a state where it at least starts up with a debug build. If I find something thats particularly useful in debugging then I'll document it. For now:
|
comment:16
See my long lonely rant at sage-devel https://groups.google.com/d/topic/sage-devel/Wt7uxbDkh_A/discussion, especially the links:
|
comment:17
Interestingly, the error on my laptop looks different from what Volker reported in comment:15:
Hence: No
So, "Volker's" error is in By the way:
fails with an import error -- but there is no crash! So, there seems to be something else wrong, not just the refcount. |
comment:18
What you get is similar to what I get (without gdb). Not sure why Volker's output differs. Anyway, I think we should now focus on trying all of this with #13832. |
comment:19
Replying to @jpflori:
I don't find these links in the discussion at sage-devel, but indeed the announcement on cython-users looks promising! I am now trying to install the cython spkg from #13832. I guess after installing it I have to do sage -ba, right? |
comment:117
However, even with #13878, the following problem with pari/gp persists:
Is that a known problem? I sense that we will soon have another dependency... |
comment:118
The total result of make ptest on bsd.math is:
So, no crash in Sage, but I guess many (or all?) of these errors could be explained by crashes in PARI/GP. |
comment:119
I have created a #13921 for the gp crash. |
comment:120
Just wanted to point out that the original p4 spkg which actually sets pydebug when SAGE_DEBUG is set is not linked from anywhere anymore although the p5 spkg from #13867 is based on it, so let's just merge this second ticket quickly to actually be able to use Python in debug mode with a vanilla Sage. |
This comment has been minimized.
This comment has been minimized.
comment:121
With sage-5.7.beta2, another dependency is needed, namely #14059. Since several of the other dependencies were already merged, I changed the directions in the ticket description accordingly. |
comment:122
We are almost there. With sage-5.7.beta2 and the changes indicated in the ticket description and with MALLOC_CHECK_=3, make ptest yields:
I don't know if the time-out is meaningful. Is there a ticket already for the generic graph problem? |
comment:123
Not sure the crash is really related to the debug version. |
This comment has been minimized.
This comment has been minimized.
comment:124
Even though in generic_graph is triggered my MALLOC_CHECK_=3 and not by the debug version, I think it won't hurt to add #14067 as a dependency, since running tests with MALLOC_CHECK_=3 is (at least for me) associated with debugging. Moreover:
Hence, from my perspective, this ticket can be resolved as "fixed", as soon as all dependencies are merged. Since no patch will be merged from here, I suppose it has no author. |
Changed reviewer from Volker Braun to Volker Braun, Simon King |
Changed work issues from make sure Sage builds and starts to none |
Changed reviewer from Volker Braun, Simon King to Volker Braun, Simon King, Jean-Pierre Flori |
Changed author from Jean-Pierre Flori to none |
Instructions for getting a debug version of Python:
Download and untar sage-5.7.beta2
Copy the Python spkg from Remove debugging output from Python command line #13867 to spkg/standard and (to be on the safe side) remove the previously present Python spkg
Run
and wait.
(optionally) install the gdb spkg from Experimental gdb spkg #13866
Apply the patches from Fix failing assertion in linbox/matrix/permutation-matrix.h #13878, Fix refcount/deallocation of integers #14059 and generic_graph_pyx.pyx invalid free() with MALLOC_CHECK_=3 #14067 to the Sage library
Run
sage -br
This gives you a Sage version that passes all tests, even with MALLOC_CHECK_=3.
Depends on #10352
Depends on #13832
Depends on #13865
Depends on #13867
Depends on #13868
Depends on #13876
Depends on #13878
Depends on #13882
Depends on #13883
Depends on #13889
Depends on #13896
Depends on #13921
Depends on #14059
Depends on #14067
CC: @vbraun @simon-king-jena
Component: misc
Keywords: python spkg
Reviewer: Volker Braun, Simon King, Jean-Pierre Flori
Issue created by migration from https://trac.sagemath.org/ticket/13864
The text was updated successfully, but these errors were encountered: