SEGV in mpmath.findroot

Showing 1-4 of 4 messages
SEGV in mpmath.findroot Georgi Guninski 10/1/12 7:19 AM
import mpmath
def F(x):
        return mpmath.zeta(x)+mpmath.zeta(x,derivative=1)


Unhandled SIGSEGV: A segmentation fault 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.
Re: [sage-support] SEGV in mpmath.findroot D. S. McNeil 10/1/12 7:36 AM
Hmm.  My backtrace showed:


and my standard Python version of mpmath, which I don't think is
gmp-aware, produces

/usr/local/lib/python2.7/dist-packages/mpmath/libmp/libelefun.pyc in
exp_fixed(x, prec, ln2)
   1410         return v << n
   1411     else:
-> 1412         return v >> (-n)

OverflowError: long int too large to convert to int

Re: [sage-support] SEGV in mpmath.findroot Georgi Guninski 10/1/12 7:58 AM
i get the same exception on standalone mpmath, don't know if it uses
Re: SEGV in mpmath.findroot Fredrik Johansson 10/2/12 2:50 AM

I have (hopefully) fixed the the crash in mpmath-git.

You still have a problem with your code: the root finder doesn't seem to be converging, so the evaluation points ends up far out in the complex plane. If it doesn't crash, it's still fairly soon going to take extremely long time or run out of memory. I would add a line to F to raise an exception if x doesn't look sane.