sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.3k stars 447 forks source link

Configure Python with pydebug when SAGE_DEBUG is set #13864

Closed jpflori closed 11 years ago

jpflori commented 11 years ago

Instructions for getting a debug version of Python:

This gives you a Sage version that passes all tests, even with MALLOCCHECK=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

jpflori commented 11 years ago

Work Issues: tag problem

jpflori commented 11 years ago

Changed work issues from tag problem to none

vbraun commented 11 years ago

Reviewer: Volker Braun

vbraun commented 11 years ago

Dependencies: #13865

vbraun commented 11 years ago
comment:5

Looks good to me! I'm adding my proposed change to the documentation as a prerequisite to not deviate from whats documented...

simon-king-jena commented 11 years ago
comment:6

Sage claims that the spkg built successfully. However, I see things like

/home/simon/SAGE/debug/sage-5.5.rc0/spkg/build/python-2.7.3.p4/src/Modules/_curses_panel.c:17:19: fatal error: panel.h: Datei oder Verzeichnis nicht gefunden
compilation terminated.

Python build finished, but the necessary bits to build these modules were not found:
_bsddb             bsddb185           dbm             
dl                 gdbm               imageop         
sunaudiodev                                           
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

in the install log. Is that normal?

jpflori commented 11 years ago
comment:7

Yes it is (or at least I always had this behavior). I think these "optional" modules are only built if the needed prerequisites are present, but are not really required to get a working Python.

jdemeyer commented 11 years ago
comment:8

Replying to @jpflori:

I think these "optional" modules are only built if the needed prerequisites are present, but are not really required to get a working Python.

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 spkg-install.

simon-king-jena commented 11 years ago
comment:9

One observation, potentially related with what we discussed on #715:

Starting python and importing sage works:

> ./sage -python
Python 2.7.3 (default, Dec 26 2012, 19:09:45) 
[GCC 4.6.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sage
[39290 refs]

However, importing sage.categories.map.Map does not work:

>>> from sage.categories.map import Map
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name Map
[102454 refs]

I don't know whether this should work, but anyway: It doesn't.

jpflori commented 11 years ago
comment:10

I'd say (although I don't know why) it is because it is a Cython module. Did you try with a plain Python build?

vbraun commented 11 years ago
comment:11

I made a gdb spkg at #13866 so you can get a working debugger with the Python debug build.

vbraun commented 11 years ago
comment:12

Some debugging hint: Use python -v to print imports as they happen:

[vbraun@volker-desktop sage-5.6.beta0]$ ./sage -python -v
...
>>> import sage.all_cmdline
...
import sage.rings.padics.padic_ext_element # dynamically loaded from /home/vbraun/opt/sage-5.6.beta0/local/lib/python2.7/site-packages/sage/rings/padics/padic_ext_element.so
Fatal Python error: UNREF invalid object
/home/vbraun/opt/sage-5.6.beta0/local/lib/libcsage.so(print_backtrace+0x31)[0x7f0c88f3120d]
/home/vbraun/opt/sage-5.6.beta0/local/lib/libcsage.so(sigdie+0x14)[0x7f0c88f3123f]
/home/vbraun/opt/sage-5.6.beta0/local/lib/libcsage.so(sage_signal_handler+0x1da)[0x7f0c88f30deb]
jpflori commented 11 years ago
comment:13

Replying to @vbraun:

Some debugging hint: Use python -v to print imports as they happen:

[vbraun@volker-desktop sage-5.6.beta0]$ ./sage -python -v
...
>>> import sage.all_cmdline
...
import sage.rings.padics.padic_ext_element # dynamically loaded from /home/vbraun/opt/sage-5.6.beta0/local/lib/python2.7/site-packages/sage/rings/padics/padic_ext_element.so
Fatal Python error: UNREF invalid object
/home/vbraun/opt/sage-5.6.beta0/local/lib/libcsage.so(print_backtrace+0x31)[0x7f0c88f3120d]
/home/vbraun/opt/sage-5.6.beta0/local/lib/libcsage.so(sigdie+0x14)[0x7f0c88f3123f]
/home/vbraun/opt/sage-5.6.beta0/local/lib/libcsage.so(sage_signal_handler+0x1da)[0x7f0c88f30deb]

Could you add this to the dev doc in #13865, or here?

simon-king-jena commented 11 years ago
comment:14

Thank you! I was just about to ask how one can see what stuff is being imported. So, -v it is...

vbraun commented 11 years ago
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:

(sage-sh) vbraun@volker-desktop:sage-5.6.beta0$ gdb python
...
(gdb) run -v
...
>>> import sage.all_cmdline
...
Fatal Python error: UNREF invalid object

Program received signal SIGABRT, Aborted.
0x0000003da9835ba5 in raise () from /lib64/libc.so.6
(gdb) bt
#0  0x0000003da9835ba5 in raise () from /lib64/libc.so.6
#1  0x0000003da9837358 in abort () from /lib64/libc.so.6
#2  0x00007ffff7d1a63b in Py_FatalError (msg=0x7ffff7d63eb1 "UNREF invalid object")
    at Python/pythonrun.c:1677
#3  0x00007ffff7c49f18 in _Py_ForgetReference (op=0x21194c0) at Objects/object.c:2223
#4  0x00007ffff7c49f6b in _Py_Dealloc (op=0x21194c0) at Objects/object.c:2242
#5  0x00007fffd9de6e7c in initpadic_ZZ_pX_element () at sage/rings/padics/padic_ZZ_pX_element.cpp:9634
#6  0x00007ffff7d0a496 in _PyImport_LoadDynamicModule (
    name=0x7ffffffe4360 "sage.rings.padics.padic_ZZ_pX_element", 
    pathname=0x7ffffffe3260 "/home/vbraun/opt/sage-5.6.beta0/local/lib/python2.7/site-packages/sage/rings/padics/padic_ZZ_pX_element.so", fp=0x20d23b0) at ./Python/importdl.c:53
...
(gdb) frame 5
#5  0x00007fffd9de6e7c in initpadic_ZZ_pX_element () at sage/rings/padics/padic_ZZ_pX_element.cpp:9634
9634      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
(gdb) l
9629      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9630      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__one); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9631      __Pyx_GOTREF(__pyx_t_2);
9632      __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9633      __Pyx_GOTREF(__pyx_t_3);
9634      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9635      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9636      if (PyObject_SetAttr(__pyx_m, __pyx_n_s__big, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9637      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpflori commented 11 years ago
comment:16

See my long lonely rant at sage-devel https://groups.google.com/d/topic/sage-devel/Wt7uxbDkh_A/discussion, especially the links:

simon-king-jena commented 11 years ago
comment:17

Interestingly, the error on my laptop looks different from what Volker reported in comment:15:

(sage-sh) simon@linux-sqwp:sage-5.5.rc0$ gdb python
...
(gdb) run -v
...
>>> import sage.all_cmdline
...
import sage.libs.pari.gen # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/libs/pari/gen.so
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/integer.so", 2);
python: Modules/gcmodule.c:326: visit_decref: Assertion `gc->gc.gc_refs != 0' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff6d95d95 in raise () from /lib64/libc.so.6

Hence: No Fatal Python error: UNREF invalid object. Further:

(gdb) bt
#0  0x00007ffff6d95d95 in raise () from /lib64/libc.so.6
#1  0x00007ffff6d972ab in abort () from /lib64/libc.so.6
#2  0x00007ffff6d8e8fe in __assert_fail_base () from /lib64/libc.so.6
#3  0x00007ffff6d8e9a2 in __assert_fail () from /lib64/libc.so.6
#4  0x00007ffff7b12a19 in visit_decref (op=0x1462f40, data=0x0) at Modules/gcmodule.c:326
#5  0x00007fffeecdcfe1 in __pyx_tp_traverse_4sage_9structure_15category_object_CategoryObject (o=0x14b7d30, v=0x7ffff7b1295e <visit_decref>, a=0x0) at sage/structure/category_object.c:8971
#6  0x00007fffeef4724f in __pyx_tp_traverse_4sage_9structure_6parent_Parent (o=0x14b7d30, v=0x7ffff7b1295e <visit_decref>, a=0x0) at sage/structure/parent.c:21293
#7  0x00007fffef18a97c in __pyx_tp_traverse_4sage_9structure_10parent_old_Parent (o=0x14b7d30, v=0x7ffff7b1295e <visit_decref>, a=0x0) at sage/structure/parent_old.c:7253
#8  0x00007fffef39ab57 in __pyx_tp_traverse_4sage_9structure_11parent_base_ParentWithBase (o=0x14b7d30, v=0x7ffff7b1295e <visit_decref>, a=0x0) at sage/structure/parent_base.c:1892
#9  0x00007ffff7a4c572 in subtype_traverse (self=0x14b7d30, visit=0x7ffff7b1295e <visit_decref>, arg=0x0) at Objects/typeobject.c:838
...
#32 0x00007fffecc2bcbe in __Pyx_ImportModule (name=0x7fffecc2fc6c "sage.rings.integer") at sage/rings/complex_double.c:18370
#33 0x00007fffecc2b951 in __Pyx_ImportType (module_name=0x7fffecc2fc6c "sage.rings.integer", class_name=0x7fffecc2fc64 "Integer", size=64, strict=1) at sage/rings/complex_double.c:18319
#34 0x00007fffecc25b46 in initcomplex_double () at sage/rings/complex_double.c:16572
#35 0x00007ffff7ae9282 in _PyImport_LoadDynamicModule (name=0x7ffffffed660 "sage.rings.complex_double", 
...

So, "Volker's" error is in padic_ZZ_pX_element, but mine is in sage.rings.integer. Moreover, my gdb backtrace is a lot shorter, just 109 lines.

By the way:

>>> from sage.rings.integer_ring import IntegerRing

fails with an import error -- but there is no crash! So, there seems to be something else wrong, not just the refcount.

jpflori commented 11 years ago
comment:18

What you get is similar to what I get (without gdb). Although the failing place is different as I call ./sage -c "1+1" which must import something else (I'd say sage/all.py) as all_cmdline.py.

Not sure why Volker's output differs.

Anyway, I think we should now focus on trying all of this with #13832. (Don't forget to rebuild the Sage library after upgrading Cython.)

simon-king-jena commented 11 years ago
comment:19

Replying to @jpflori:

See my long lonely rant at sage-devel https://groups.google.com/d/topic/sage-devel/Wt7uxbDkh_A/discussion, especially the links:

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?

jpflori commented 11 years ago
comment:20

Replying to @simon-king-jena:

Replying to @jpflori:

See my long lonely rant at sage-devel https://groups.google.com/d/topic/sage-devel/Wt7uxbDkh_A/discussion, especially the links:

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?

Not really sure :) I touched everything in sage/structure hoping it will be enough.

If the bug persists, I'll report my minimal example on cython-users.

jpflori commented 11 years ago
comment:21

Ok now my first errors with the pexpect interfaces are gone! Great!

But I now get an error similar to Volker's one. I hope that it is just some files in sage/rings/which were not rebuilt.

simon-king-jena commented 11 years ago
comment:22

I'll need a bit longer to test, because I did sage -ba. I thought that, if Cython gets updated, then one certainly needs to rebuild all pyx files.

jpflori commented 11 years ago
comment:23

You're right, I just did not remember about the -a flag.

vbraun commented 11 years ago
comment:24

Replying to @simon-king-jena:

Interestingly, the error on my laptop looks different from what Volker reported in comment:15: ... dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/integer.so", 2); python: Modules/gcmodule.c:326: visit_decref: Assertion `gc->gc.gc_refs != 0' failed. ...

You die in a garbage collection cycle, presumably because you have < 32 GB RAM (= my desktop). So the garbage collector runs earlier.

We both get killed by integer arithmetic, which points to a circular import problem. The Integer class is a particularly bad case of stuff that tries to define and compute everything upon import. At the same time it is interleaved with the rationals class, so it is full of circular imports. Which almost certainly equals half-constructed objects during the circular import fest.

jpflori commented 11 years ago
comment:25

Ok now I also get:

./sage -sh
... gdb python
... r -v
...
import sage.rings.padics.padic_ext_element # dynamically loaded from /home/jp/boulot/sage/sage-5.6.beta0/local/lib/python2.7/site-packages/sage/rings/padics/padic_ext_element.so
Fatal Python error: UNREF invalid object

Program received signal SIGABRT, Aborted.
0x00007ffff6cdfdd5 in raise () from /lib/x86_64-linux-gnu/libc.so.6

with bt

(gdb) bt                                                                      
#0  0x00007ffff6cdfdd5 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff6ce2efb in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff7afa73c in Py_FatalError (
    msg=0x7ffff7b441d1 "UNREF invalid object") at Python/pythonrun.c:1677
#3  0x00007ffff7a2c31e in _Py_ForgetReference (op=0x1e18440)
    at Objects/object.c:2223
#4  0x00007ffff7a2c371 in _Py_Dealloc (op=0x1e18440) at Objects/object.c:2242
#5  0x00007fffde01b3ac in initpadic_ZZ_pX_element ()
    at sage/rings/padics/padic_ZZ_pX_element.cpp:9650
#6  0x00007ffff7aea57e in _PyImport_LoadDynamicModule (
    name=0x7ffffffe4910 "sage.rings.padics.padic_ZZ_pX_element", 
    pathname=0x7ffffffe3810 "/home/jp/boulot/sage/sage-5.6.beta0/local/lib/python2.7/site-packages/sage/rings/padics/padic_ZZ_pX_element.so", fp=0x1e13800)
    at ./Python/importdl.c:53
#7  0x00007ffff7ae64a5 in load_module (
    name=0x7ffffffe4910 "sage.rings.padics.padic_ZZ_pX_element", 
    fp=0x1e13800, 
    pathname=0x7ffffffe3810 "/home/jp/boulot/sage/sage-5.6.beta0/local/lib/python2.7/site-packages/sage/rings/padics/padic_ZZ_pX_element.so", type=3, 
    loader=0x0) at Python/import.c:1831
#8  0x00007ffff7ae8776 in import_submodule (mod=0x1acc600, 
    subname=0x7ffffffe4922 "padic_ZZ_pX_element", 
    fullname=0x7ffffffe4910 "sage.rings.padics.padic_ZZ_pX_element")
    at Python/import.c:2595
#9  0x00007ffff7ae7c9a in load_next (mod=0x1acc600, altmod=0x1acc600, 
    p_name=0x7ffffffe48f8, 
    buf=0x7ffffffe4910 "sage.rings.padics.padic_ZZ_pX_element", 
    p_buflen=0x7ffffffe4908) at Python/import.c:2415

and seems to be caused by

big = two**128 + one
#this should not fit in a long, since it's supposed to be bigger than any valid absolute precision.
jpflori commented 11 years ago
comment:26

Replying to @vbraun:

Replying to @simon-king-jena:

Interestingly, the error on my laptop looks different from what Volker reported in comment:15: ... dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/integer.so", 2); python: Modules/gcmodule.c:326: visit_decref: Assertion `gc->gc.gc_refs != 0' failed. ...

You die in a garbage collection cycle, presumably because you have < 32 GB RAM (= my desktop). So the garbage collector runs earlier.

Are you sure? I'd say this really looks like the weakref mess fixed up in 0.17.3.

We both get killed by integer arithmetic, which points to a circular import problem. The Integer class is a particularly bad case of stuff that tries to define and compute everything upon import. At the same time it is interleaved with the rationals class, so it is full of circular imports. Which almost certainly equals half-constructed objects during the circular import fest.

jpflori commented 11 years ago
comment:27

According to http://realmike.org/blog/2012/07/08/embedding-python-tutorial-part-1/ we might need to compile files by passing -DPy_DEBUG. Does this really changes anything in python headers? grep indeed finds occurences of it in $SAGE_LOCAL/include/python2.7

simon-king-jena commented 11 years ago
comment:28

Replying to @jpflori:

Replying to @vbraun:

Replying to @simon-king-jena:

Interestingly, the error on my laptop looks different from what Volker reported in comment:15: ... dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/integer.so", 2); python: Modules/gcmodule.c:326: visit_decref: Assertion `gc->gc.gc_refs != 0' failed. ...

You die in a garbage collection cycle, presumably because you have < 32 GB RAM (= my desktop). So the garbage collector runs earlier.

Are you sure? I'd say this really looks like the weakref mess fixed up in 0.17.3.

After upgrading to Cython 0.17.3, I get an error that seems to confirm what Volker stated.

So, now we have to try and find out where the padics problem comes from.

Note, however, that in pure python I still get a "harmless" import error when I want to do

Python 2.7.3 (default, Dec 26 2012, 19:09:45) 
[GCC 4.6.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from sage.rings.integer_ring import IntegerRing
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "integer.pxd", line 9, in init sage.rings.integer_ring (sage/rings/integer_ring.c:12178)
  File "integer.pyx", line 170, in init sage.rings.integer (sage/rings/integer.c:38390)
  File "/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/infinity.py", line 200, in <module>
    import sage.rings.rational
  File "fast_arith.pxd", line 5, in init sage.rings.rational (sage/rings/rational.c:27828)
  File "fast_arith.pyx", line 51, in init sage.rings.fast_arith (sage/rings/fast_arith.c:8060)
ImportError: cannot import name ZZ
[133346 refs]
>>> quit()

Hence, no crash, but something is wrong with the ring of integers,

simon-king-jena commented 11 years ago
comment:29

Question about the way to proceed:

This ticket provides the debug version of the python spkg, and it has a positive review. However, in the debug version, Sage does not even start.

So, shall we open a new ticket "Make Sage start when Python is build under SAGE_DEBUG", or shall we try to resolve the starting problem here?

I suggest to keep it here, thus changing the status into "needs work".

simon-king-jena commented 11 years ago
comment:30

For the record: These imports occur when one tries to import the integer ring, as reported by python -v:

>>> import sage
import sage # directory /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/__init__.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/__init__.py
import sage # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/__init__.pyc
[39292 refs]
>>> from sage.rings.integer_ring import IntegerRing
import sage.rings # directory /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/__init__.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/__init__.py
import sage.rings # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/__init__.pyc
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/integer_ring.so", 2);
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/ring.so", 2);
import sage.structure # directory /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/__init__.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/__init__.py
import sage.structure # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/__init__.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/dynamic_class.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/dynamic_class.py
import sage.structure.dynamic_class # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/dynamic_class.pyc
import sage.misc # directory /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/__init__.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/__init__.py
import sage.misc # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/__init__.pyc
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/cachefunc.so", 2);
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/function_mangling.so", 2);
import sage.misc.function_mangling # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/function_mangling.so
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/sageinspect.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/sageinspect.py
import sage.misc.sageinspect # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/sageinspect.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/ast.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/ast.py
import ast # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/ast.pyc
import _ast # builtin
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/inspect.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/inspect.py
import inspect # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/inspect.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/string.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/string.py
import string # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/string.pyc
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/strop.so", 2);
import strop # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/strop.so
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/dis.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/dis.py
import dis # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/dis.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/opcode.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/opcode.py
import opcode # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/opcode.pyc
import imp # builtin
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/tokenize.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/tokenize.py
import tokenize # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/tokenize.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/token.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/token.py
import token # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/token.pyc
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/operator.so", 2);
import operator # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/operator.so
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/collections.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/collections.py
import collections # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/collections.pyc
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/_collections.so", 2);
import _collections # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/_collections.so
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/keyword.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/keyword.py
import keyword # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/keyword.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/heapq.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/heapq.py
import heapq # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/heapq.pyc
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/itertools.so", 2);
import itertools # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/itertools.so
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/bisect.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/bisect.py
import bisect # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/bisect.pyc
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/_bisect.so", 2);
import _bisect # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/_bisect.so
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/_heapq.so", 2);
import _heapq # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/_heapq.so
import thread # builtin
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/functools.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/functools.py
import functools # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/functools.pyc
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/_functools.so", 2);
import _functools # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/_functools.so
import sage.misc.cachefunc # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/cachefunc.so
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/unique_representation.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/unique_representation.py
import sage.structure.unique_representation # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/unique_representation.pyc
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/classcall_metaclass.so", 2);
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/nested_class.so", 2);
import sage.misc.nested_class # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/nested_class.so
import sage.misc.classcall_metaclass # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/classcall_metaclass.so
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/lazy_attribute.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/lazy_attribute.py
import sage.misc.lazy_attribute # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/lazy_attribute.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/abstract_method.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/abstract_method.py
import sage.misc.abstract_method # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/abstract_method.pyc
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/parent_gens.so", 2);
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/parent_base.so", 2);
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/parent_old.so", 2);
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/parent.so", 2);
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/category_object.so", 2);
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/sage_object.so", 2);
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/cPickle.so", 2);
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/cStringIO.so", 2);
import cStringIO # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/cStringIO.so
import cPickle # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/cPickle.so
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/sage_unittest.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/sage_unittest.py
import sage.misc.sage_unittest # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/sage_unittest.pyc
import unittest # directory /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/__init__.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/__init__.py
import unittest # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/__init__.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/result.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/result.py
import unittest.result # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/result.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/StringIO.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/StringIO.py
import StringIO # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/StringIO.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/util.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/util.py
import unittest.util # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/util.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/case.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/case.py
import unittest.case # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/case.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/difflib.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/difflib.py
import difflib # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/difflib.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/pprint.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/pprint.py
import pprint # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/pprint.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/suite.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/suite.py
import unittest.suite # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/suite.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/loader.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/loader.py
import unittest.loader # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/loader.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/fnmatch.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/fnmatch.py
import fnmatch # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/fnmatch.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/main.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/main.py
import unittest.main # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/main.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/runner.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/runner.py
import unittest.runner # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/runner.pyc
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/time.so", 2);
import time # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/time.so
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/signals.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/signals.py
import unittest.signals # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/unittest/signals.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/weakref.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/weakref.py
import weakref # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/weakref.pyc
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/zlib.so", 2);
import zlib # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/zlib.so
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/bz2.so", 2);
import bz2 # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/bz2.so
import sage.structure.sage_object # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/sage_object.so
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/generators.so", 2);
import sage.structure.generators # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/generators.so
import sage.categories # directory /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/__init__.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/__init__.py
import sage.categories # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/__init__.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/primer.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/primer.py
import sage.categories.primer # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/primer.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/category.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/category.py
import sage.categories.category # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/category.pyc
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/c3.so", 2);
import sage.misc.c3 # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/c3.so
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/unknown.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/unknown.py
import sage.misc.unknown # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/unknown.pyc
import sage.structure.category_object # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/category_object.so
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/coerce_dict.so", 2);
import sage.structure.coerce_dict # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/coerce_dict.so
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/element.so", 2);
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/misc.so", 2);
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/sage_itertools.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/sage_itertools.py
import sage.misc.sage_itertools # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/sage_itertools.pyc
import sage.structure.misc # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/misc.so
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/lazy_format.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/lazy_format.py
import sage.misc.lazy_format # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/lazy_format.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/copy.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/copy.py
import copy # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/copy.pyc
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/coerce.so", 2);
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/map.so", 2);
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/homset.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/homset.py
import sage.categories.homset # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/homset.pyc
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/morphism.so", 2);
import sage.categories.morphism # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/morphism.so
import sage.categories.map # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/map.so
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/functor.so", 2);
import sage.categories.functor # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/functor.so
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/action.so", 2);
import sage.categories.action # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/action.so
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/coerce_exceptions.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/coerce_exceptions.py
import sage.structure.coerce_exceptions # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/coerce_exceptions.pyc
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/coerce_actions.so", 2);
import sage.structure.coerce_actions # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/coerce_actions.so
import sage.structure.coerce # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/coerce.so
import sage.structure.element # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/element.so
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/sets_cat.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/sets_cat.py
import sage.categories.sets_cat # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/sets_cat.pyc
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/lazy_import.so", 2);
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/shutil.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/shutil.py
import shutil # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/shutil.pyc
import pwd # builtin
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/grp.so", 2);
import grp # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/grp.so
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/tempfile.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/tempfile.py
import tempfile # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/tempfile.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/random.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/random.py
import random # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/random.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/__future__.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/__future__.py
import __future__ # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/__future__.pyc
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/math.so", 2);
import math # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/math.so
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/binascii.so", 2);
import binascii # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/binascii.so
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/hashlib.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/hashlib.py
import hashlib # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/hashlib.pyc
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/_hashlib.so", 2);
import _hashlib # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/_hashlib.so
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/_random.so", 2);
import _random # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/_random.so
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/fcntl.so", 2);
import fcntl # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/fcntl.so
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/lazy_import_cache.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/lazy_import_cache.py
import sage.misc.lazy_import_cache # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/lazy_import_cache.pyc
import sage.misc.lazy_import # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/lazy_import.so
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/category_singleton.so", 2);
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/constant_function.so", 2);
import sage.misc.constant_function # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/constant_function.so
import sage.categories.category_singleton # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/category_singleton.so
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/sets_with_partial_maps.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/sets_with_partial_maps.py
import sage.categories.sets_with_partial_maps # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/sets_with_partial_maps.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/objects.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/objects.py
import sage.categories.objects # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/objects.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/subquotients.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/subquotients.py
import sage.categories.subquotients # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/subquotients.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/covariant_functorial_construction.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/covariant_functorial_construction.py
import sage.categories.covariant_functorial_construction # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/covariant_functorial_construction.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/quotients.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/quotients.py
import sage.categories.quotients # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/quotients.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/subobjects.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/subobjects.py
import sage.categories.subobjects # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/subobjects.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/isomorphic_objects.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/isomorphic_objects.py
import sage.categories.isomorphic_objects # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/isomorphic_objects.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/algebra_functor.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/algebra_functor.py
import sage.categories.algebra_functor # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/algebra_functor.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/category_types.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/category_types.py
import sage.categories.category_types # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/category_types.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/latex.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/latex.py
import sage.misc.latex # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/latex.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/subprocess.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/subprocess.py
import subprocess # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/subprocess.pyc
import gc # builtin
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/select.so", 2);
import select # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/select.so
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/pickle.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/pickle.py
import pickle # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/pickle.pyc
import marshal # builtin
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/struct.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/struct.py
import struct # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/struct.pyc
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/_struct.so", 2);
import _struct # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/lib-dynload/_struct.so
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/temporary_file.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/temporary_file.py
import sage.misc.temporary_file # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/temporary_file.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/sage_eval.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/sage_eval.py
import sage.misc.sage_eval # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/sage_eval.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/preparser.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/preparser.py
import sage.misc.preparser # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/preparser.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/base64.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/base64.py
import base64 # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python/base64.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/sage_ostools.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/sage_ostools.py
import sage.misc.sage_ostools # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/sage_ostools.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/cartesian_product.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/cartesian_product.py
import sage.categories.cartesian_product # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/cartesian_product.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/realizations.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/realizations.py
import sage.categories.realizations # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/realizations.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/bindable_class.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/bindable_class.py
import sage.misc.bindable_class # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/bindable_class.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/with_realizations.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/with_realizations.py
import sage.categories.with_realizations # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/with_realizations.pyc
import sage.structure.parent # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/parent.so
import sage.structure.parent_old # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/parent_old.so
import sage.structure.parent_base # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/parent_base.so
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/defaults.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/defaults.py
import sage.misc.defaults # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/defaults.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/gens_py.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/gens_py.py
import sage.structure.gens_py # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/gens_py.pyc
import sage.structure.parent_gens # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/structure/parent_gens.so
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/prandom.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/prandom.py
import sage.misc.prandom # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/prandom.pyc
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/randstate.so", 2);
import sage.misc.randstate # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/randstate.so
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/rings.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/rings.py
import sage.categories.rings # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/rings.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/rngs.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/rngs.py
import sage.categories.rngs # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/rngs.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/commutative_additive_groups.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/commutative_additive_groups.py
import sage.categories.commutative_additive_groups # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/commutative_additive_groups.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/commutative_additive_monoids.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/commutative_additive_monoids.py
import sage.categories.commutative_additive_monoids # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/commutative_additive_monoids.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/commutative_additive_semigroups.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/commutative_additive_semigroups.py
import sage.categories.commutative_additive_semigroups # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/commutative_additive_semigroups.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/additive_magmas.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/additive_magmas.py
import sage.categories.additive_magmas # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/additive_magmas.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/semigroups.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/semigroups.py
import sage.categories.semigroups # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/semigroups.pyc
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/misc_c.so", 2);
import sage.misc.misc_c # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/misc_c.so
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/magmas.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/magmas.py
import sage.categories.magmas # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/magmas.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/semirings.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/semirings.py
import sage.categories.semirings # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/semirings.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/monoids.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/monoids.py
import sage.categories.monoids # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/monoids.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/commutative_rings.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/commutative_rings.py
import sage.categories.commutative_rings # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/commutative_rings.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/integral_domains.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/integral_domains.py
import sage.categories.integral_domains # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/integral_domains.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/domains.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/domains.py
import sage.categories.domains # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/domains.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/principal_ideal_domains.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/principal_ideal_domains.py
import sage.categories.principal_ideal_domains # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/principal_ideal_domains.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/unique_factorization_domains.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/unique_factorization_domains.py
import sage.categories.unique_factorization_domains # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/unique_factorization_domains.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/gcd_domains.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/gcd_domains.py
import sage.categories.gcd_domains # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/gcd_domains.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/euclidean_domains.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/euclidean_domains.py
import sage.categories.euclidean_domains # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/euclidean_domains.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/algebras.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/algebras.py
import sage.categories.algebras # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/algebras.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/dual.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/dual.py
import sage.categories.dual # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/dual.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/tensor.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/tensor.py
import sage.categories.tensor # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/tensor.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/modules.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/modules.py
import sage.categories.modules # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/modules.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/bimodules.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/bimodules.py
import sage.categories.bimodules # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/bimodules.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/left_modules.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/left_modules.py
import sage.categories.left_modules # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/left_modules.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/right_modules.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/right_modules.py
import sage.categories.right_modules # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/right_modules.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/fields.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/fields.py
import sage.categories.fields # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/fields.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/division_rings.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/division_rings.py
import sage.categories.division_rings # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/division_rings.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/field.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/field.py
import sage.rings.field # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/field.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/vector_spaces.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/vector_spaces.py
import sage.categories.vector_spaces # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/vector_spaces.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/commutative_algebras.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/commutative_algebras.py
import sage.categories.commutative_algebras # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/categories/commutative_algebras.pyc
import sage.rings.ring # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/ring.so
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/integer.so", 2);
import sage.libs # directory /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/libs
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/libs/__init__.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/libs/__init__.py
import sage.libs # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/libs/__init__.pyc
import sage.libs.pari # directory /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/libs/pari
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/libs/pari/__init__.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/libs/pari/__init__.py
import sage.libs.pari # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/libs/pari/__init__.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/libs/pari/all.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/libs/pari/all.py
import sage.libs.pari.all # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/libs/pari/all.pyc
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/libs/pari/gen.so", 2);
import sage.libs.pari.gen # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/libs/pari/gen.so
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/allocator.so", 2);
import sage.misc.allocator # dynamically loaded from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/misc/allocator.so
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/infinity.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/infinity.py
import sage.rings.infinity # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/infinity.pyc
# /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/ring_element.pyc matches /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/ring_element.py
import sage.rings.ring_element # precompiled from /home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/ring_element.pyc
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/rational.so", 2);
dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/fast_arith.so", 2);
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "integer.pxd", line 9, in init sage.rings.integer_ring (sage/rings/integer_ring.c:12178)
  File "integer.pyx", line 170, in init sage.rings.integer (sage/rings/integer.c:38390)
  File "/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/infinity.py", line 200, in <module>
    import sage.rings.rational
  File "fast_arith.pxd", line 5, in init sage.rings.rational (sage/rings/rational.c:27828)
  File "fast_arith.pyx", line 51, in init sage.rings.fast_arith (sage/rings/fast_arith.c:8060)
ImportError: cannot import name ZZ

Scary. All "usual suspects" are in place: Weak references, coercion, categories.

But what goes wrong? Is it a circular import? If so, what can be done to improve it?

jpflori commented 11 years ago
comment:31

Replying to @simon-king-jena:

Replying to @jpflori:

Replying to @vbraun:

Replying to @simon-king-jena:

Interestingly, the error on my laptop looks different from what Volker reported in comment:15: ... dlopen("/home/simon/SAGE/debug/sage-5.5.rc0/local/lib/python2.7/site-packages/sage/rings/integer.so", 2); python: Modules/gcmodule.c:326: visit_decref: Assertion `gc->gc.gc_refs != 0' failed. ...

You die in a garbage collection cycle, presumably because you have < 32 GB RAM (= my desktop). So the garbage collector runs earlier.

Are you sure? I'd say this really looks like the weakref mess fixed up in 0.17.3.

After upgrading to Cython 0.17.3, I get an error that seems to confirm what Volker stated.

Do you get the same one as before? i.e. with a failing assert?

Or the one that Volker got (and I now get)? i.e. with a Fatal UNREF?

Just asking ot be really sure we (or I :) ) did not get confused.

And I just tested that adding -DPy_DEBUG does not help with the FATAL thing.

jpflori commented 11 years ago
comment:32

Replying to @simon-king-jena:

Question about the way to proceed:

This ticket provides the debug version of the python spkg, and it has a positive review. However, in the debug version, Sage does not even start.

So, shall we open a new ticket "Make Sage start when Python is build under SAGE_DEBUG", or shall we try to resolve the starting problem here?

I suggest to keep it here, thus changing the status into "needs work".

If we have to fix circular imports before merging this, it will just never get merged. So although I don't think either it is the right solution, I propose to merge this to let people who want play with it.

jpflori commented 11 years ago
comment:33

Replying to @simon-king-jena:

For the record: These imports occur when one tries to import the integer ring, as reported by python -v: {{{line 200, in import sage.rings.rational File "fast_arith.pxd", line 5, in init sage.rings.rational (sage/rings/rational.c:27828) File "fast_arith.pyx", line 51, in init sage.rings.fast_arith (sage/rings/fast_arith.c:8060) ImportError: cannot import name ZZ }}}

Scary. All "usual suspects" are in place: Weak references, coercion, categories.

But what goes wrong? Is it a circular import? If so, what can be done to improve it?

I think it is indeed a circular import. I've been chasing those starting from ring_integer yesterday night, but it just gave be bad dreams. After three or four files where I had to remove various things imported from ring_integer and importing it, I got stuck in sage/libs/ntl/ntl_ZZ_p.pyx complaining about not being able to cast a ZZ_c* to a Py_Object and gave up.

jpflori commented 11 years ago
comment:34

For info I also get the FATAL UNREF in the same place on Sage 5.2 so this is unrelated to memleaks patches.

jpflori commented 11 years ago
comment:35

It seems that addition of Integer's is broken.

jpflori commented 11 years ago
comment:36

As well as substraction and multiplication and powering, but not negation...

Note that powering an Integer by an int seems fine.

vbraun commented 11 years ago
comment:37

Yes you can't do any arithmetic while the circular import is still on its way. For starters it invokes coercion so its a huge mess. The following lets me get past it

big = Integer('340282366920938463463374607431768211457')  # two**128 + one

Of course it dies in the next place where stupid computations are performed upon import.

vbraun commented 11 years ago
comment:38

Actually now I'm getting

ImportError: /home/vbraun/opt/sage-5.6.beta0/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_libsingular.so: undefined symbol: _Z7_p_TestP8spolyrecP9sip_sringi

Or, unmangled:

[vbraun@volker-desktop sage-5.6.beta0]$ echo _Z7_p_TestP8spolyrecP9sip_sringi | c++filt 
_p_Test(spolyrec*, sip_sring*, int)

This seems to be a singular debug function that is not exported into the Singular libraries.

vbraun commented 11 years ago
comment:39

Ah of course thats in a #ifdef PDEBUG block. I guess that means Polynomials DEBUG to Singular %-)

jpflori commented 11 years ago
comment:40

Replying to @vbraun:

Actually now I'm getting

ImportError: /home/vbraun/opt/sage-5.6.beta0/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_libsingular.so: undefined symbol: _Z7_p_TestP8spolyrecP9sip_sringi

Or, unmangled:

[vbraun@volker-desktop sage-5.6.beta0]$ echo _Z7_p_TestP8spolyrecP9sip_sringi | c++filt 
_p_Test(spolyrec*, sip_sring*, int)

I get the same indeed.

This seems to be a singular debug function that is not exported into the Singular libraries.

jpflori commented 11 years ago
comment:41

Replying to @vbraun:

Yes you can't do any arithmetic while the circular import is still on its way.

If I had statements at the end of integer_ring.pyx and integer.pyx they get executed before all this mess, so I thought that in this case it was not a circular import problem.

For starters it invokes coercion so its a huge mess.

I don't see any coercion involved, where did you spot it?

The following lets me get past it

big = Integer('340282366920938463463374607431768211457')  # two**128 + one

Of course it dies in the next place where stupid computations are performed upon import.

jpflori commented 11 years ago
comment:42

What is strange is that I can compute one + one in integer.pyx and that succeeds and when the "same" computation is performed later in padic_ZZ_pX_element.pyx it fails when Python tries to dealloc the result...

In fact it depends on where I compute one + one in integer.pyx, I'm getting lost now.

vbraun commented 11 years ago
comment:43

We (=distutils) usually compile Cython modules with -DNDEBUG, but apparently not in a debug build. This is what switches on Singular's debugging stuff.

Not sure EXACTLY why it blows up doing integer arithmetic, but according to Simon's import list it is also during import of the coercion system. Which will need to access sample elements of rings etc.

jpflori commented 11 years ago
comment:44

My problem is that I'm not sure the problem Simon pointed out (and I can reproduce) and which definitely involves circular import is related to the one you reported (and i can reproduce as well, nut obviously issuing a different "import" command).

jpflori commented 11 years ago
comment:45

Ok, I think I got the problem you reported (the one segfault doing basic arith with Integer's).

If I'm correct, the problem is that we hook up Integer creation and deletion and Python debug gets confused. Have a look at the end of integer.pyx. If you try to compute "one + one" before the call to hook_fast_tp_functions() it succeeds, but after that it will fail during deallocation.

jpflori commented 11 years ago
comment:46

In particular the reference to the previous and next object in the doubly linked list of allocated object must be complete garbage, what makes the debug Python raise the FATAL invalid error.

jpflori commented 11 years ago
comment:47

The question now is "can we -- or even should -- we fix this?".

The simplest way would be to detect at compile time that we're using a debug build and fill garbage, but satisfying for the debug checks, things in ob_prev and ob_next, let's say that they both point to the object itself?

jpflori commented 11 years ago
comment:48

Or we could not call the hook install function, but I guess that would be cheating... although I'm going to try right now to see if further problems can be discovered.

jpflori commented 11 years ago
comment:49

And got stuck as well by the Singular problem.

vbraun commented 11 years ago
comment:50

For the Singular problem, replace #ifdef NDEBUG in mod2.h with #if 0 and rebuild (sage -ba)