#11967: os x 10.7 Lion -- Sage segfaults on startup when initializing GiNaC
------------------------------------------+---------------------------------
       Reporter:  was                     |         Owner:  drkirkby      
           Type:  defect                  |        Status:  closed        
       Priority:  blocker                 |     Milestone:  sage-5.0      
      Component:  porting                 |    Resolution:  fixed         
       Keywords:  python osx lion darwin  |   Work issues:                
Report Upstream:  N/A                     |     Reviewers:  Jeroen Demeyer
        Authors:  John Palmieri           |     Merged in:  sage-5.0.beta4
   Dependencies:                          |      Stopgaps:                
------------------------------------------+---------------------------------
Description changed by jdemeyer:

Old description:

> (The problem has been solved -- see below -- though I haven't figured out
> what the right patch should be yet.  A solution to get Sage to startup
> without segfault is to delete local/lib/python2.6/config/libpython2.6.a
> and replace it by local/lib/libpython2.6.dylib, then rebuild the pynac
> spkg and the Sage library.)
>
> After getting Sage to building (as explained at #11881), we get
> {{{
> $ sage -gdb
> then "bt" for a backtrace:
> ...
>
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
> PyInt_FromLong (ival=Cannot access memory at address 0x0
> ) at intobject.c:91
> 91      intobject.c: No such file or directory.
>         in intobject.c
> (gdb) bt
> #0  PyInt_FromLong (ival=Cannot access memory at address 0x0
> ) at intobject.c:91
> #1  0x0000000107781951 in GiNaC::numeric::numeric ()
> #2  0x00000001077c865a in GiNaC::library_init::library_init ()
> #3  0x0000000107662029 in global constructors keyed to
> _ZN5GiNaC8py_funcsE ()
> #4  0x00007fff5fc0fd1a in
> __dyld__ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE
> ()
> #5  0x00007fff5fc0fa66 in
> __dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE
> ()
> #6  0x00007fff5fc0d258 in
> __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE
> ()
> #7  0x00007fff5fc0d1f1 in
> __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE
> ()
> #8  0x00007fff5fc0e02b in
> __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextERNS_21InitializerTimingListE
> ()
> #9  0x00007fff5fc03189 in __dyld__ZN4dyld15runInitializersEP11ImageLoader
> ()
> #10 0x00007fff5fc095cb in __dyld_dlopen ()
> #11 0x00007fff8fddb95b in dlopen ()
> #12 0x00000001000c957a in _PyImport_GetDynLoadFunc ()
> #13 0x00000001000b7095 in _PyImport_LoadDynamicModule ()
> #14 0x00000001000b56d3 in import_submodule ()
> #15 0x00000001000b58eb in load_next ()
> ...
> }}}
>
> --------
>
> New spkg:
> [http://sage.math.washington.edu/home/palmieri/SPKG/python-2.7.2.p2.spkg]

New description:

 (The problem has been solved -- see below -- though I haven't figured out
 what the right patch should be yet.  A solution to get Sage to startup
 without segfault is to delete local/lib/python2.6/config/libpython2.6.a
 and replace it by local/lib/libpython2.6.dylib, then rebuild the pynac
 spkg and the Sage library.)

 After getting Sage to building (as explained at #11881), we get
 {{{
 $ sage -gdb
 then "bt" for a backtrace:
 ...

 Program received signal EXC_BAD_ACCESS, Could not access memory.
 Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
 PyInt_FromLong (ival=Cannot access memory at address 0x0
 ) at intobject.c:91
 91      intobject.c: No such file or directory.
         in intobject.c
 (gdb) bt
 #0  PyInt_FromLong (ival=Cannot access memory at address 0x0
 ) at intobject.c:91
 #1  0x0000000107781951 in GiNaC::numeric::numeric ()
 #2  0x00000001077c865a in GiNaC::library_init::library_init ()
 #3  0x0000000107662029 in global constructors keyed to _ZN5GiNaC8py_funcsE
 ()
 #4  0x00007fff5fc0fd1a in
 __dyld__ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE
 ()
 #5  0x00007fff5fc0fa66 in
 __dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE
 ()
 #6  0x00007fff5fc0d258 in
 
__dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE
 ()
 #7  0x00007fff5fc0d1f1 in
 
__dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE
 ()
 #8  0x00007fff5fc0e02b in
 
__dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextERNS_21InitializerTimingListE
 ()
 #9  0x00007fff5fc03189 in __dyld__ZN4dyld15runInitializersEP11ImageLoader
 ()
 #10 0x00007fff5fc095cb in __dyld_dlopen ()
 #11 0x00007fff8fddb95b in dlopen ()
 #12 0x00000001000c957a in _PyImport_GetDynLoadFunc ()
 #13 0x00000001000b7095 in _PyImport_LoadDynamicModule ()
 #14 0x00000001000b56d3 in import_submodule ()
 #15 0x00000001000b58eb in load_next ()
 ...
 }}}

 --------

 New spkg:
 [http://sage.math.washington.edu/home/palmieri/SPKG/Old/python-2.7.2.p2.spkg]

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11967#comment:30>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to