Hi

On Tue, Oct 12, 2010 at 05:28:45PM +0200, Jan Groenewald wrote:
> r...@capepoint:/usr/local/src#sage -t "devel/sage/sage/interfaces/sage0.py"   
>            
> sage -t  "devel/sage/sage/interfaces/sage0.py"              
> [8.8 s]
> ----------------------------------------------------------------------
> All tests passed!
> Total time for all tests: 8.8 seconds
> r...@capepoint:/usr/local/src#dmesg |grep pari
> [ 8217.960337] python[12786]: segfault at 829 ip 00007feeafa24fa1 sp 
> 00007ffff3d54b90 error 4 in libpari-gmp.so.2[7feeaf830000+2c6000]


This is the piece of sage0.py that causes the segfault:

    We can have the child interpreter itself make another child Sage
    process, so now three copies of Sage are running::
    
        sage: s3 = s('Sage()')
        sage: a = s3(10)
        sage: a
        10
    
    This `a=10` is in a subprocess of a subprocesses of your
    original Sage.

Specifically, the line sage: a = s3(10). Not before, creating the subsubprocess
is OK, but USING it is a pari segfault. But not always, e.g. this passes and no
segfault either:

        sage: s3 = s('Sage()')
        sage: s3.parent()
        Sage

Running the following manually in a normal sage shell (not via sage -t) does 
NOT cause a segfault:

        s = Sage()
        s3 = s('Sage()')
        a = s3(10)

So it has something to do with the way it is called via sage -t?
Same result for an 10, 1, 1.0, or 'true' in the last line: when 
called via sage -t I get the segfault in dmesg.

Also, in a sage shell, 

        s = Sage()
        s. #<-- tab autocompletion works
        s3 = s('Sage()')
        s3. #<-- tab autocomplation hangs, keyboardinterrupt breaks it.
        s3.AA? #<-- works OK

Tasty. 

regards,
Jan


-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to