On Nov 11, 2007 9:06 PM, Robert Miller <[EMAIL PROTECTED]> wrote: > I'm working on a new .pyx file, and everything has been working okay, > but something strange is now happening, and I can't quite get to the > bottom of it. > > Some side notes- I am running on OS X 10.5, a fresh install of > sage-2.8.12. It failed building, I think it was scipy, but other than > that it has been working ok.
Currently, Sage is not supposed to build completely on OS X 10.5 unless you install gfortran system-wide. (Don't ask me how to do that.) The only thing you loose as a result is scipy and maybe cvxopt (convex optimization). Absolutely everything should have been built. > So I have some new cython classes, and I've written some doctests. > When I run through the doctests by hand, I can't reproduce what > happens when I doctest: I run > ./sage -t -verbose ......./relevant_file.pyx > and I watch as every test passes, then it pauses for a while as it > handles a bus error. Curious to see what is going on, I do the > following: > > ./sage -t -gdb ......./relevant_file.pyx > > gdb says lots of things like > > warning: Could not find object file "/Volumes/HOME/sage/spkg/build/ > python-2.5.1.p8/src/Modules/python.o" - no debug information available > for "./Modules/python.c". > > before it loads, but it loads, That's I think completely normal on OS X. > and I type "r" to run the tests. It > complains more about symbols, such as > > Reading symbols for shared libraries warning: Could not find object > file "/Volumes/HOME/sage/spkg/build/python-2.5.1.p8/src/build/ > temp.macosx-10.3-i386-2.5/Volumes/HOME/sage/spkg/build/python-2.5.1.p8/ > src/Modules/mathmodule.o" - no debug information available for "/ > Volumes/HOME/sage/spkg/build/python-2.5.1.p8/src/Modules/ > mathmodule.c". > > Then it runs the tests. The problem is > > Program received signal EXC_BAD_ACCESS, Could not access memory. > Reason: KERN_PROTECTION_FAILURE at address: 0x00000015 > 0x000d1c50 in collect () > > So I backtrace: > > (gdb) bt > #0 0x000d1c50 in collect () > #1 0x000d276a in PyGC_Collect () > #2 0x000c18d0 in Py_Finalize () > #3 0x000c1376 in handle_system_exit () > #4 0x000c15e5 in PyErr_PrintEx () > #5 0x000c24ac in PyRun_SimpleFileExFlags () > #6 0x000d0d97 in Py_Main () > #7 0x00001fdc in _start () > #8 0x00001f09 in start () > > I have reproduced what __dealloc__ does in another function, and have > tried over and over to reproduce this error outside of doctest mode, > to no avail. The fact that the garbage collector is accessing bad > memory seems to indicate that it has already been freed or something, > but this only only happens during doctests, or at least so it seems. I > have run the doctests again and again under gdb by hand, and they > never produce a problem, so I have it narrowed down to only every > doctest in the file. The crappy thing is that I don't know how to have > gdb tell me what the gc was trying to collect, and I can't reproduce > the problem in an environment where I can narrow anything down. > > Given all these problems, I'm moving my project back to linux, for the > stability of a happy install, and the extra memory tools. However, > this situation is so confusing and bizarre I'd still like to figure > out what is happening... Any help is appreciated Questions: (1) Do you or do you not actually have the same problem when you build the same code under Linux? You don't say above. (2) What happens when you do grep "sage:" filename.pyx | sage -- William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---