#13636: %timeit unpickle_all() causes a SEGABRT
---------------------------------+------------------------------------------
       Reporter:  andrew.mathas  |         Owner:  was                          
 
           Type:  defect         |        Status:  needs_review                 
 
       Priority:  major          |     Milestone:  
sage-duplicate/invalid/wontfix
      Component:  pickling       |    Resolution:                               
 
       Keywords:                 |   Work issues:                               
 
Report Upstream:  N/A            |     Reviewers:                               
 
        Authors:                 |     Merged in:                               
 
   Dependencies:                 |      Stopgaps:                               
 
---------------------------------+------------------------------------------
Changes (by andrew.mathas):

  * status:  new => needs_review
  * milestone:  sage-5.7 => sage-duplicate/invalid/wontfix


Old description:

> The subject says it all:
> Sage gives a SEGABRT with the following:
> {{{
> sage: %timeit sage.structure.sage_object.unpickle_all()
>
> ------------------------------------------------------------------------
> Unhandled SIGABRT: An abort() occurred in Sage.
> This probably occurred because a *compiled* component of Sage has a bug
> in it and is not properly wrapped with sig_on(), sig_off(). You might
> want to run Sage under gdb with 'sage -gdb' to debug this.
> Sage will now terminate.
> ------------------------------------------------------------------------
> /usr/local/src/sage/sage-5.4.rc1/spkg/bin/sage: line 310: 60549 Abort
> trap: 6           sage-ipython "$@" -i
> }}}
> Note, however, that the following is OK:
> {{{
> sage: sage.structure.sage_object.unpickle_all()
> /usr/local/src/sage/sage-5.4.rc1/local/lib/python2.7/site-
> packages/IPython/iplib.py:2260: DeprecationWarning: This class is
> replaced by Matrix_modn_dense_float/Matrix_modn_dense_double.
> See http://trac.sagemath.org/4260 for details.
>   exec code_obj in self.user_global_ns, self.user_ns
> Successfully unpickled 594 objects.
> Failed to unpickle 0 objects.
> }}}
> as is calling `unpickle()` with an argument:
> {{{
> sage: sage: dir = tmp_dir()
> sage: sage: sage.structure.sage_object.picklejar('hello', dir)
> sage: sage: sage.structure.sage_object.unpickle_all(dir)
> Successfully unpickled 1 objects.
> Failed to unpickle 0 objects.
> sage: %timeit sage.structure.sage_object.unpickle_all(dir)
> 625 loops, best of 3: 91.5 µs per loop
> }}}
>
> I get this error for versions 5.3 and 5.4.rc1 running on a macbook pro
> with lion.
>
> I initially thought that perhaps timeit did not like calling itself,
> however, this seems to be OK because the following does work:
> {{{
> sage: def fred():^J    timeit('2^10000', preparse=False, number=100)
> ....:
> sage: fred()
> 100 loops, best of 3: 31 ns per loop
> sage: %timeit fred
> 625 loops, best of 3: 38.5 ns per loop
> }}}
> I tried running through sage -gdb but I don't know how to interpret the
> outout. Here is the tail of what it produces:
> {{{
> Reading symbols for shared libraries warning: .o file
> "/usr/local/src/sage/sage-5.3/devel/sage-
> main/build/temp.macosx-10.7-x86_64-2.7/sage/matrix/matrix_symbolic_dense.o"
> more recent than executable timestamp in
> "/usr/local/src/sage/sage-5.3/devel/sage-
> combinat/build/sage/matrix/matrix_symbolic_dense.so"
> warning: Could not open OSO file /usr/local/src/sage/sage-5.3/devel/sage-
> main/build/temp.macosx-10.7-x86_64-2.7/sage/matrix/matrix_symbolic_dense.o
> to scan for pubtypes for objfile /usr/local/src/sage/sage-5.3/devel/sage-
> combinat/build/sage/matrix/matrix_symbolic_dense.so
> . done
> Reading symbols for shared libraries warning: .o file
> "/usr/local/src/sage/sage-5.3/devel/sage-
> main/build/temp.macosx-10.7-x86_64-2.7/sage/rings/polynomial/symmetric_reduction.o"
> more recent than executable timestamp in
> "/usr/local/src/sage/sage-5.3/devel/sage-
> combinat/build/sage/rings/polynomial/symmetric_reduction.so"
> warning: Could not open OSO file /usr/local/src/sage/sage-5.3/devel/sage-
> main/build/temp.macosx-10.7-x86_64-2.7/sage/rings/polynomial/symmetric_reduction.o
> to scan for pubtypes for objfile /usr/local/src/sage/sage-5.3/devel/sage-
> combinat/build/sage/rings/polynomial/symmetric_reduction.so
> . done
>
> Program received signal SIGABRT, Aborted.
> 0x00007fff8d58f82a in __kill ()
> }}}

New description:

 **CLOSED AS DUPLICATE OF #10705**


 The subject says it all:
 Sage gives a SEGABRT with the following:
 {{{
 sage: %timeit sage.structure.sage_object.unpickle_all()

 ------------------------------------------------------------------------
 Unhandled SIGABRT: An abort() occurred in Sage.
 This probably occurred because a *compiled* component of Sage has a bug
 in it and is not properly wrapped with sig_on(), sig_off(). You might
 want to run Sage under gdb with 'sage -gdb' to debug this.
 Sage will now terminate.
 ------------------------------------------------------------------------
 /usr/local/src/sage/sage-5.4.rc1/spkg/bin/sage: line 310: 60549 Abort
 trap: 6           sage-ipython "$@" -i
 }}}
 Note, however, that the following is OK:
 {{{
 sage: sage.structure.sage_object.unpickle_all()
 /usr/local/src/sage/sage-5.4.rc1/local/lib/python2.7/site-
 packages/IPython/iplib.py:2260: DeprecationWarning: This class is replaced
 by Matrix_modn_dense_float/Matrix_modn_dense_double.
 See http://trac.sagemath.org/4260 for details.
   exec code_obj in self.user_global_ns, self.user_ns
 Successfully unpickled 594 objects.
 Failed to unpickle 0 objects.
 }}}
 as is calling `unpickle()` with an argument:
 {{{
 sage: sage: dir = tmp_dir()
 sage: sage: sage.structure.sage_object.picklejar('hello', dir)
 sage: sage: sage.structure.sage_object.unpickle_all(dir)
 Successfully unpickled 1 objects.
 Failed to unpickle 0 objects.
 sage: %timeit sage.structure.sage_object.unpickle_all(dir)
 625 loops, best of 3: 91.5 µs per loop
 }}}

 I get this error for versions 5.3 and 5.4.rc1 running on a macbook pro
 with lion.

 I initially thought that perhaps timeit did not like calling itself,
 however, this seems to be OK because the following does work:
 {{{
 sage: def fred():^J    timeit('2^10000', preparse=False, number=100)
 ....:
 sage: fred()
 100 loops, best of 3: 31 ns per loop
 sage: %timeit fred
 625 loops, best of 3: 38.5 ns per loop
 }}}
 I tried running through sage -gdb but I don't know how to interpret the
 outout. Here is the tail of what it produces:
 {{{
 Reading symbols for shared libraries warning: .o file
 "/usr/local/src/sage/sage-5.3/devel/sage-
 main/build/temp.macosx-10.7-x86_64-2.7/sage/matrix/matrix_symbolic_dense.o"
 more recent than executable timestamp in
 "/usr/local/src/sage/sage-5.3/devel/sage-
 combinat/build/sage/matrix/matrix_symbolic_dense.so"
 warning: Could not open OSO file /usr/local/src/sage/sage-5.3/devel/sage-
 main/build/temp.macosx-10.7-x86_64-2.7/sage/matrix/matrix_symbolic_dense.o
 to scan for pubtypes for objfile /usr/local/src/sage/sage-5.3/devel/sage-
 combinat/build/sage/matrix/matrix_symbolic_dense.so
 . done
 Reading symbols for shared libraries warning: .o file
 "/usr/local/src/sage/sage-5.3/devel/sage-
 
main/build/temp.macosx-10.7-x86_64-2.7/sage/rings/polynomial/symmetric_reduction.o"
 more recent than executable timestamp in
 "/usr/local/src/sage/sage-5.3/devel/sage-
 combinat/build/sage/rings/polynomial/symmetric_reduction.so"
 warning: Could not open OSO file /usr/local/src/sage/sage-5.3/devel/sage-
 
main/build/temp.macosx-10.7-x86_64-2.7/sage/rings/polynomial/symmetric_reduction.o
 to scan for pubtypes for objfile /usr/local/src/sage/sage-5.3/devel/sage-
 combinat/build/sage/rings/polynomial/symmetric_reduction.so
 . done

 Program received signal SIGABRT, Aborted.
 0x00007fff8d58f82a in __kill ()
 }}}

--

Comment:

 Replying to [comment:4 nbruin]:
 > Replying to [comment:3 andrew.mathas]:
 > > See #10705 for another seg fault associated with unpickle_all.
 > Well ... `%timeit` will run its code a couple of times to get accurate
 timing information, so if (as the ticket mentions) running
 `unpickle_all()` twice causes a crash then `%timeit unpickle_all()` should
 too.


 OK, let's close this as a duplicate then. I'll set it as needs review.
 Could you please "review" it Nils?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13636#comment:5>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to