find_root() in 10.4 vs 10.7

asked 2025-10-23 12:38:53 +0100

dyne2meter gravatar image

updated 2025-10-23 18:18:41 +0100

[EDIT TO ADD: This issue is now reported in Issues at the Github repository]

I just upgraded my Sage from 10.4 to 10.7 using the 3-manifolds package, but I have kept the old version for comparisons during the first days of the upgrade.

In the jupyter notebook running the 10.4 kernel the following code for value of an annuity runs without a hitch:

find_root(7000 == 5000*(1+0.045/12)^x, 0, 10000)

However in another notebook running the 10.7 kernel, the same code fails with no output and a message that the kernel has died and is restarting. The hardware/software platform is an old MacPro (ca. 2008) running MacOS 10.13 (High Sierra). I've had no trouble finding roots of ordinary polynomial functions on suitable intervals using either kernel.

My guess is confirmed when I run the same code in the REPL and get back:

------------------------------------------------------------------------
(no backtrace available)
------------------------------------------------------------------------
Unhandled SIGILL: An illegal instruction 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.
------------------------------------------------------------------------
/usr/local/bin/sage: line 39: 88268 Illegal instruction: 4  /usr/bin/env PYTHONUSERBASE="$USERBASE" SSL_CERT_FILE="$SSL_CERT_FILE" "$SYMLINK"/venv/bin/sage "$@"

I learned from this asksage thread that reporting to trac.sagemath.org (that is, the equivalent at the Github repository) could be helpful.

By the way, I tried doctesting a few of the sage sources, and picked up many similar messages. Some tests completed successfully, some did not, but many failed with this SIGILL error. In light of that fact, it would seem these bugs can be fixed (albeit laboriously).

Many thanks, as usual to the folks of the 3-manifolds project!

edit retag flag offensive close merge delete

Comments

I'm guessing that with such old hardware, you are probably better off trying to build Sage yourself. The appropriate place to report general issues is https://github.com/sagemath/sage, but for pre-built binaries, maybe the 3-manifolds people are the right ones to contact.

John Palmieri gravatar imageJohn Palmieri ( 2025-10-23 19:02:19 +0100 )edit

I just discovered that the same code runs without a hitch for the 10.7 version under MacOS 10.14 on rather newer hardware (ca. 2016). It's amazing that somebody can make such a complicated system work at all for these dinosaurs! I have built sage from source back in the 9.x days, but I doubt I can do it any more. If I have a rainy afternoon and not enough to do, I might still try the build.

dyne2meter gravatar imagedyne2meter ( 2025-10-24 08:53:04 +0100 )edit

As long as homebrew is available for the machine, the build process might not be too bad.

John Palmieri gravatar imageJohn Palmieri ( 2025-10-25 00:26:14 +0100 )edit

Homebrew for that OS fails to build and install gcc15 (and probably a few other essential packages), and the Sage build process with what I can install in Homebrew dies fairly early. I might retry and post the error messages around where it dies, but I think that because I won't have gcc a lot of other things are going to go south. Several outdated Homebrew packages fail to upgrade.

dyne2meter gravatar imagedyne2meter ( 2025-10-31 09:56:39 +0100 )edit