ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 26 Feb 2022 18:13:10 +0100EllipticCurve.rank (mwrank) leads to segmentation fault in Sage 9.5/9.0, but to a regular exception in Sage 8.2. Is this a bug of Sage 9.5/9.0?https://ask.sagemath.org/question/61296/ellipticcurverank-mwrank-leads-to-segmentation-fault-in-sage-9590-but-to-a-regular-exception-in-sage-82-is-this-a-bug-of-sage-9590/Hello,
when I try to calculate the rank of elliptic curves, Sage 8.2 works well and tells me in some cases by throwing exceptions, that it could not calculate it. See code example below.
In Sage 9.5 (as well as in Sage 9.0) the same code leads to a segmentation fault. To be more precise, the 1st try of EllipticCurve.rank() leads to a "divison by zero" exception, And the 2nd try (for the same curve or for a curve that leads to the same problem) then leads to segmentation fault.
You may reproduce it on SageMathCell (sagecell.sagemath.org). Simply copy the code below and evaluate.
If you agree that this is a bug - what should I do to open a ticket?
Best Regards
Daniel Lauer
--
<pre><code>
print("Version of Sage: {}".format(version()))
print("\n(1) Everything okay in this simple case of calling EllipticCurve.rank():")
E = EllipticCurve([0,4321,0,1234,0])
print("E = {}".format(E))
k = E.rank(only_use_mwrank=True)
print("rank = {}\n".format(k))
print("\n(2) Still okay: Same method for different curve will lead to an exception. That's okay.")
print(" Problem B (prio 2) is: The exception is a different one, now.")
print(" In Sage 8.2, it was 'rank not provably correct (lower bound: 0)' -- and I think, this is the correct one.")
print(" In Sage 9.0 and 9.5 the exception is 'division by zero'")
E = EllipticCurve([0,20752947797,0,74237199888641440000,0])
print("E = {}".format(E))
try:
k = E.rank(only_use_mwrank=True)
print("rank = {}\n".format(k))
except Exception as exc:
print("Exception: {}".format(str(exc)))
print("\n(3) So, let's do a rank computation for a different curve. This works well in all versions of Sage.")
E = EllipticCurve([0,5432,0,2345,0])
print("E = {}".format(E))
k = E.rank(only_use_mwrank=True)
print("rank = {}\n".format(k))
print("\n(4) Now problem A (prio 1) will occur: If we start a rank computation that shows the same problem as in (2), ...")
print(" ... in Sage 8.2, everything is fine: the same exception will be returned, again.")
print(" ... in Sage 9.0 and 9.5, Sage crashes with 'segmentation fault'")
E = EllipticCurve([0,20752947797,0,74237199888641440000,0])
#E = EllipticCurve([0,108066172377/1024,0,6926399795059430625/4096,0]) # the same behaviour if we choose this elliptic curve here instead of the former one
print("E = {}".format(E))
try:
k = E.rank(only_use_mwrank=True)
print("rank = {}\n".format(k))
except Exception as exc:
print("Exception: {}".format(str(exc)))
print("\n(5) Further code: ...")
print(" ... in Sage 8.2, everything is fine: the code is executed.")
print(" ... in Sage 9.0 and 9.5 this code is never reached because of segmentation fault.")
</code></pre>
Daniel LauerSat, 26 Feb 2022 18:13:10 +0100https://ask.sagemath.org/question/61296/segmentation fault when find gcd of fraction and sqrthttps://ask.sagemath.org/question/60032/segmentation-fault-when-find-gcd-of-fraction-and-sqrt/ sage: (3/2).gcd(sqrt(2))
------------------------------------------------------------------------
(no backtrace available)
------------------------------------------------------------------------
Unhandled SIGSEGV: A segmentation fault occurred.
This probably occurred because a *compiled* module has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Python will now terminate.
------------------------------------------------------------------------
[1] 90215 segmentation fault sage
sage crashed when I want to get gcd of a fraction and an sqrtvnbThu, 02 Dec 2021 05:11:55 +0100https://ask.sagemath.org/question/60032/Unknown installation problem in Windows 7https://ask.sagemath.org/question/54245/unknown-installation-problem-in-windows-7/ I installed Sagemath 9.1 from the executable. Almost nothing works: when I execute from desktop icon it just crashes, if I do from icon that says Notebook it crashes after saying
"Use Control-C to stop ...."
If I execute the shell, I can use without problem "sage -python", "sage -gap", etc, but if I execute
sage -c
then it says
------------------------------------------------------------------------
Unhandled SIGSEGV: A segmentation fault occurred.
This probably occurred because a *compiled* module has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Python will now terminate.
------------------------------------------------------------------------
/opt/sagemath-9.1/src/bin/sage-python line 2: 1615 Segmentation fault (overflow memory)sage -python "$@"
Do you have any suggestions about how to solve the problem? I reinstalled Sagemath several times, but everytime there is the same problem. X1729Sun, 15 Nov 2020 14:35:41 +0100https://ask.sagemath.org/question/54245/could someone please try this integral? segmentation fault generatedhttps://ask.sagemath.org/question/42717/could-someone-please-try-this-integral-segmentation-fault-generated/Could someone please try this integral on their PC? I am getting sage core dump from it.
Wanted to see if it just my sage or if it happens to others. Make sure to save your sage work before trying this.
>sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 8.3.beta6, Release Date: 2018-06-17 │
│ Type "notebook()" for the browser-based notebook interface. │
│ Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable. ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage: var('x m a b')
(x, m, a, b)
sage: integrate(x^m/sqrt(a + b*x^(2 - m)),x)
;;;
;;; Detected access to protected memory, also kwown as 'bus or segmentation fault'.
;;; Jumping to the outermost toplevel prompt
;;;
When I use other algorithm, no core dump
sage: integrate(x^m/sqrt(a + b*x^(2 - m)),x,algorithm="giac")
integrate(x^m/sqrt(b*x^(-m + 2) + a), x)
I am on Linux Manjaro 17.1. Intel PC. Installed sage, compiled from sources, using Manjaro package manager pacman.
And just in case, I also posted bug report here https://trac.sagemath.org/ticket/25636
Thank you
--NasserNasserFri, 22 Jun 2018 22:25:30 +0200https://ask.sagemath.org/question/42717/