Maxima crashes on solve, finding determinants, and other operations

Bug #417433 reported by Azure
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
maxima (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: maxima

Maxima 5.17.1 http://maxima.sourceforge.net
Using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (aka GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) solve(x^2+5*x+2=0,x);
Universal error handler called recursively (:ERROR NIL
                                                  CONDITIONS::CLCS-UNIVERSAL-ERROR-HANDLER
                                                  ""
                                                  "Couldn't protect")
Universal error handler called recursively (:ERROR NIL
                                            CONDITIONS::CLCS-UNIVERSAL-ERROR-HANDLER
                                            "" "Couldn't protect")
Maxima encountered a Lisp error:

 Error in CONDITIONS::CLCS-UNIVERSAL-ERROR-HANDLER [or a callee]: Caught fatal error [memory may be damaged]

Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.
(%i2)

And a Computer Algebra System that can't solve isn't very useful.

ProblemType: Bug
Architecture: amd64
Date: Sat Aug 22 13:39:32 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: maxima 5.17.1-1ubuntu1
ProcEnviron:
 SHELL=/bin/zsh
 PATH=(custom, user)
 LANG=en_US.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-6.25-generic
SourcePackage: maxima
Uname: Linux 2.6.31-6-generic x86_64

Tags: apport-bug
Revision history for this message
Azure (azure-umich) wrote :
Changed in maxima (Ubuntu):
status: New → Confirmed
Revision history for this message
Andrius Štikonas (stikonas) wrote :

I can confirm this bug. Eg integrate(x**(-5/2)/sqrt(x+2), x, 1, 2); crashes maxima.

I was able to fix it by updating to maxima 5.19.2 Unfortunately, wxMaxima crashes with maxima 5.19.2.

Revision history for this message
f0ma (f0ma) wrote :

I also confirm this bug. IMHO this is not amd64 bug.

integrate((x+1)/(x^3-8),x);
integrate((4*x)^(1/2),x);

crashes maxima too.

Architecture: i386 (Intel Core2 Duo)
DistroRelease: Ubuntu 9.10
Package: maxima 5.17.1-1ubuntu1
ProcEnviron:
 SHELL=/bin/bash
 PATH=~
 LANG=ru_RU.UTF-8
Uname: Linux 2.6.31-14-generic

tags: removed: amd64
Revision history for this message
f0ma (f0ma) wrote :

as a temporary solution can install Debian maxima 5.17.1-1 package:

wget http://ftp.egr.msu.edu/debian/pool/main/m/maxima/maxima-share_5.17.1-1_all.deb
wget http://ftp.mx.debian.org/debian/pool/main/m/maxima/maxima-doc_5.17.1-1_all.deb
wget http://mirrors.kernel.org/debian/pool/main/m/maxima/maxima_5.17.1-1_i386.deb
sudo aptitude remove maxima maxima-doc maxima-share
sudo dpkg -i maxima_5.17.1-1_i386.deb maxima-doc_5.17.1-1_all.deb maxima-share_5.17.1-1_all.deb
sudo aptitude hold maxima maxima-doc maxima-share
sudo aptitude install wxmaxima

Revision history for this message
Seb (a804290d) wrote :

I confirm this bug on both i386 and amd64 architectures.

Ubuntu 9.10's maxima also fails to factor *any* number:

----------

Maxima 5.17.1 http://maxima.sourceforge.net
Using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (aka GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) factor(4);
Universal error handler called recursively (:ERROR NIL
                                                  CONDITIONS::CLCS-UNIVERSAL-ERROR-HANDLER
                                                  ""
                                                  "Couldn't protect")
Universal error handler called recursively (:ERROR NIL
                                            CONDITIONS::CLCS-UNIVERSAL-ERROR-HANDLER
                                            "" "Couldn't protect")
Maxima encountered a Lisp error:

 Error in CONDITIONS::CLCS-UNIVERSAL-ERROR-HANDLER [or a callee]: Caught fatal error [memory may be damaged]

Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.
(%i2)
----------

Switching to Debian's maxima packages (cf. f0ma's comment) solves the issue:

----------

Maxima 5.17.1 http://maxima.sourceforge.net
Using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (aka GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) factor(4);
                                       2
(%o1) 2
(%i2)
----------

Revision history for this message
Ilya Barygin (randomaction) wrote : Re: [Bug 417433] Re: Maxima crashes on solve, finding determinants, and other operations

I've got a workaround. Before starting maxima, run

sudo sysctl kernel.randomize_va_space=0

This turns off a security-hardening setting (see https://wiki.ubuntu.com/Security/Features#ASLR) which gcl doesn't play nice with. You may want to reset it after you're done with maxima, for me the default value is 2, you can find it out by running "sysctl kernel.randomize_va_space" prior to turning off.

So there's an underlying problem with gcl which FTBFS for me because of this problem. I think we should find a way to fix gcl first, then rebuild maxima against fixed gcl.

Revision history for this message
Azure (azure-umich) wrote : Re: [Bug 417433] Re: Maxima crashes on solve, finding determinants, and other operations

At Sat, 07 Nov 2009 15:06:42 -0000,
Ilya Barygin wrote:
> So there's an underlying problem with gcl which FTBFS for me because of
> this problem. I think we should find a way to fix gcl first, then
> rebuild maxima against fixed gcl.

Does Maxima /need/ to be built against GCL? I rebuilt it from source
against SBCL and it worked great: faster, better startup time,
everything worked. The only missing thing was readline, but rlwrap
fixed that.

Revision history for this message
Dieter Kaiser (crategus) wrote :

Hello,

I am a Maxima developer and I am wondering about the problems reported in this thread and other threads. I use Ubuntu 9.04 - Jaunty Jackalope - to develop Maxima and will update the next time to the new version 9.10.

I build Maxima sometimes several times a day from the CVS repository using different Lisps like sbcl, clisp, ecl, cmucl (but never gcl on Ubuntu). gcl I use only on a Windows system. Furthermore, I build wxMaxima from the svn repository.

Next, I am wondering why the package manager of Ubuntu shows me the release Maxima 5.13. Now we have Maxima 5.19.2. The release 5.20 will come in December. The latest versions have a lot of bug fixes and a lot of things have been improved.

So, how can I help that the Ubuntu community gets a working and actual Maxima release?

Dieter Kaiser

Revision history for this message
Scott Howard (showard314) wrote : Re: [Bug 417433] Re: Maxima crashes on solve, finding determinants, and other operations

First off, Thank you Dieter for your work on Maxima!

In response to your questions: Ubuntu gets their package from Debian.
However, Debian has not updated this package since last March.
http://packages.qa.debian.org/m/maxima.html

The best thing to do would be to contact the Debian maintainer, but
someone already has:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=533113
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=552280

I'm going to open a new bug report in Ubuntu for the upgrade and with
your information. Hopefully we can get it packaged and into Debian,
then Ubuntu.

Revision history for this message
Scott Howard (showard314) wrote :

the upgrade request is here: bug #480039

Revision history for this message
gene (eugenios) wrote :

Hi all,
I did not see this report, so I filed another one #481121 . I encountered a problem with integration, such as, integrate((x-1)/(x^3+1),x);

I am sure that the problem resides in the GCL! NOt in the Maxima itself. The reason is the fact, that I am running exact same version of Maxima on a FreeBSD compiled by me recently against CLISP 2.47. This build has none of these problems.

Revision history for this message
gene (eugenios) wrote :

Well, to put it more precisely, Maxima was configured and compiled using the ports utility with upgraded ports on FreeBSD 7.0-RELEASE.

I do wish we had these plethora of choices on Ubuntu too :(

Revision history for this message
gene (eugenios) wrote :

Thanks to f0ma! I followed your advice and it worked!

Revision history for this message
elrond (elrond.) wrote :

It seems to be the same problem as bug #303587, so I'm going to mark as duplicate

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.