Here's the bt for the latter example: #0 visit_decref (op=0xfdc9906aac2f2efe, data=0x0) at Modules/gcmodule.c:360 #1 0x00003fffad7f61e0 in __pyx_tp_traverse_4sage_4misc_9randstate_randstate ( o=0x3ffb1a37c5d0, v=@0x3fffb7f62aa8: 0x3fffb7eb91d0 <visit_decref>, a=0x0) at /home/jpflori/sage.git/src/build/cythonized/sage/misc/randstate.c:5496 #2 0x00003fffb7eb95dc in subtract_refs ( containers=0x3fffb7f4db10 <generations+96>) at Modules/gcmodule.c:385 #3 collect (generation=<optimized out>) at Modules/gcmodule.c:925 #4 0x00003fffb7eba490 in gc_collect (self=<optimized out>, args=<optimized out>, kws=<optimized out>) at Modules/gcmodule.c:1121 #5 0x00003fffb7dc77cc in PyCFunction_Call (func=0x3fffb0081878, arg=<optimized out>, kw=<optimized out>) at Objects/methodobject.c:85 #6 0x00003fffb7e5d728 in call_function (oparg=<optimized out>, pp_stack=0x3fffffffa228) at Python/ceval.c:4352
On Thursday, May 11, 2017 at 12:09:55 PM UTC+2, vdelecroix wrote: > > The bug also shows up with > {{{ > sage: a = matrix(QQ, 1) > sage: a.randomize() > sage: del a > sage: import gc > sage: gc.collect() > }}} > > On 11/05/2017 11:55, Dima Pasechnik wrote: > > given libpthread being involved, I guess it might have to do with GIL vs > > NOGIL stuff... > > > > > > On Thursday, May 11, 2017 at 10:50:39 AM UTC+1, vdelecroix wrote: > >> > >> Dear all, > >> > >> While working on [1] I stumbled on a strange segfault. Namely, with the > >> branch applied I got > >> > >> {{{ > >> sage: a = matrix(QQ, 1) > >> sage: a.randomize() > >> sage: quit > >> Exiting Sage (CPU time 0m1.48s, Wall time 0m5.80s). > >> > ------------------------------------------------------------------------ > >> .../cysignals/signals.so > >> .../cysignals/signals.so > >> .../cysignals/signals.so > >> .../libpthread.so.0 > >> .../libpython2.7.so.1.0 > >> .../sage/misc/randstate.so > >> <snip> > >> > ------------------------------------------------------------------------ > >> Unhandled SIGSEGV: A segmentation fault occurred. > >> > ------------------------------------------------------------------------ > >> }}} > >> > >> I indeed modified the randomization method to use flint random > >> generators, you can have a look at commits [2] and [3]. But I don't > >> understand at all where the error might come from. > >> > >> Any help would be more than welcome! > >> > >> [1] https://trac.sagemath.org/ticket/22970 > >> [2] > >> > >> > https://git.sagemath.org/sage.git/commit?id=b52e2c347a28b301485c6cc5bb221873ca5ac636 > > >> [3] > >> > >> > https://git.sagemath.org/sage.git/commit?id=d5ea72b364534c3ce4374c6d78b54852c8333cc3 > > >> > >> Best, > >> Vincent > >> > > > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.