Ubuntu

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

Reported by tommy on 2008-11-30
264
This bug affects 47 people
Affects Status Importance Assigned to Milestone
gcl (Ubuntu)
Undecided
Unassigned
Nominated for Jaunty by Achim
Nominated for Karmic by Jorrit Kronjee
Nominated for Lucid by Jorrit Kronjee
maxima (Ubuntu)
Medium
Ilya Barygin
Nominated for Jaunty by Achim
Nominated for Karmic by Jorrit Kronjee
Nominated for Lucid by Jorrit Kronjee

Bug Description

Binary package hint: maxima

Ubuntu 8.10 (amd64)
maxima 5.13.0-3ubuntu1

A number of operations cause this error, but the quickest way I've found to reproduce it is to use "describe(plot_options);"

maxima provides output as it should, but also gives this error text:

---------

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.

---------

typing "describe(plot_options);" again causes a segmentation fault.

I came across this while trying to figure out why wxmaxima could not plot the error function (erf), even though erf(x) could be evaluated without problem.

Running "plot2d(erf(x), [x, -2, 2])" in wxmaxima causes the same error.

Related branches

tommy (yobbobandana) wrote :

Note: installing maxima 5.16.3-1 from Debian sid seems to have completely fixed this

Achim (ach1m) wrote :

I can confirm that the maxima_5.16.3-1 from debian sid solved the problem.
http://packages.debian.org/sid/maxima

Tested with
plot2d(erf(x), [x, -2, 2])
wxplot3d(1/(y^2+x^2+1), [x,-5,5], [y,-5,5], [gnuplot_pm3d,true])

Release: 8.10 x86_64
Codename: intrepid

Changed in maxima:
status: New → Confirmed
Jorrit Kronjee (jorrit-wafel) wrote :

I can confirm this as well.

Almacha (almacha) wrote :

This bug also occurs when trying to load the diag package. This is very annoying because this package contains the functions to compute the Jordan form of a matrix.

Version: 5.13.0-3ubuntu1
Arch: amd64

Here is the output:
(%i1) load(diag);

Maxima encountered a Lisp error:

 Error in CONDITIONS::CLCS-UNIVERSAL-ERROR-HANDLER [or a callee]: Couldn't protect

Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.

Norbert Schultz (zaiib) wrote :

also in jaunty; seems nobody interested. but the debian version works.

elrond (elrond.) wrote :

It occurs also in Karmic, package maxima 5.17.1-1ubuntu1. How to reproduce:

(%i1) atan(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) atan(x);
Segmentation fault

In this way maxima it's quite unusable.

use_linux (compu73rg33k) wrote :

This happened to me as well erradically while trying to plot trig functions. However I got a consistent failure of this type when trying to graph the following function:

H(w):=42/(-w^2+12*%i*w+4)
wxplot2d([%], [x,-5,5])

use_linux (compu73rg33k) wrote :

Note, I'm also on 9.10 (karmic)

Adam Berenyi (adam-berenyi) wrote :

I'm on 9.10, and maxima is pretty much useless.
For example:

(%i1) sqrt(4);

produces the following:

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.

Achim (ach1m) wrote :

As a workaround you can use the Debian packages:
http://wxmaxima.sourceforge.net/wiki/index.php/Packages

Regards
Achim

Rorzik (rorzik) wrote :

It's very clear that the /usr/lib/maxima/5.17.1/binary-gcl/maxima from the Debian binary works, while the one from the Ubuntu binary does not (I can copy just this file from one package or the other, do sqrt(4), and the error only shows up with the Ubuntu one). I compared the source packages from both Debian and Ubuntu, with all patches, and all meaningful files are completely identical. I believe the difference may be with the compile options, since nothing else appears different between the two. From looking at the binary, I can tell that the Ubuntu one was compiled with -D_FORTIFY_SOURCE=2, while the Debian one was compiled without this (-D_FORTIFY_SOURCE=0).

Unfortunately, gcl keeps segfaulting when I try to compile maxima, so I am unable to test whether this compile flag change would fix the problem. Perhaps someone else can get the compile to work and test this.

Adam Berenyi (adam-berenyi) wrote :

@Rorzik: I have been getting strange segfaults with multiple packages in karmic (convert in imagemagick for example). If the sources are identical in the ubuntu and debian versions, but there's a new bug in the gcc version that ubuntu uses, that could be responsible for many problems in this release... but I'm not really familiar with the packaging process.

elrond (elrond.) wrote :

I compile maxima source from Ubuntu repository with this option:

./configure --prefix=/usr --exec-prefix=/usr --enable-sbc

after running this commands (from https://help.ubuntu.com/community/Maxima )

sudo apt-get build-dep maxima
sudo dpkg-reconfigure gcl

and now it works.

Jorrit Kronjee (jorrit-wafel) wrote :

This problem occurs when address space randomization is enabled (which is enabled by default on newer kernels). When this option is set to 0 or 1, the error does not occur (default is 2). As a workaround, you should add the following line to /etc/sysctl.conf:

kernel.randomize_va_space = 1

After that, run sysctl -p

Good luck!

WhyteHorse (whytehorse) wrote :

Confirmed this bug in Ubuntu 9.10 and the fix by Jorrit(#14) does correct it.

mjb (max-brixner) wrote :

Also confirmed this bug in Karmic. Fix #14 works for me, too.

nfortech (fevzisumer) wrote :

Fix #14 works for me too, on 9.10
Thanks!

I also confirm this bug and fix by Jorrit(#14) works for me too, on 9.10.
Thanks!

Quang (quang) wrote :

Fix #14 works for me too. I'm on Karmic 64 bit. Thanks!

FriedChicken (domlyons) wrote :

#14 is not a fix, just a workaround. Address space randomization was enabled for security reasons.

S Mandal (sp-mandal) wrote :

Thanks. #14 works for me. But the distribution of wxmaxima should work out the box.

Rune Philosof (olberd) wrote :

I have tried compiling maxima with dpkg-buildpackage and it failed.
Then I tried compiling maxima with:
./configure --enable-clisp --disable-gcl
This worked.

Then I tried compiling gcl with dpkg-buildpackage and got this error:
Cannot build with randomized sbrk. Your options:
 - upgrade to a kernel/libc that knows about personality(ADDR_NO_RANDOMIZE)
 - recompile your kernel with CONFIG_COMPAT_BRK (if it has that option)
 - run sysctl kernel.randomize_va_space=0 before using gcl

So I'm guessing the problems with maxima is because gcl is compiled on a computer with this randomize address space disabled (or with the personality thing) and then we run it on computers with it enabled.

Jorrit Kronjee (jorrit-wafel) wrote :

@Olberd

Yes, the problem is most likely caused by gcl and not maxima.

One could try to download the CVS version of GCL and see if the problem is fixed there. This document says that it should be fixed in their latest prerelease: http://fricas.sourceforge.net/doc/INSTALL.txt

Rune Philosof (olberd) wrote :

As a workaround or fix for this bug some other library like clisp could be used instead of gcl.
Or at least until gcl works properly again.

nicolas kleinklaus (nknico) wrote :

Same proble here. On karmic too.

(%i9) t1:1/w*asin((-k*r-M*g)/(a*(k-M*w^2)));

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.

MarcRandolph (mrand) on 2009-12-18
Changed in maxima (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
WhyteHorse (whytehorse) wrote :

This bug affects me too. Somehow my Maxima got updated which broke texmacs+maxima that I had working. Please fix this so it doesn't break my maxima every time It updates... Thanks

Jorge Sampaio (jrgsampaio) wrote :

hi, guys. it seems that all this discussion if because gcl needs to have ANSI enabled to compile maxima. Instead of recompiling gcl with --enable-ansi, and have to work with the brk and sbrk problems, the best is to enable ANSI in gcl. For that, after installing gcl ($ sudo apt-get install gcl), reconfigure gcl with

$ sudo dpkg-reconfigure gcl

and answer yes to the question about ANSI. After finished, try compile maxima.

cheers...
Jorge

effell (effell) wrote :

Found same error running 32bit 2.6.31-16-generic karmic.

Confirming that work-around from #14 worked-around that. Many thanks!

(Looks like a bug afflicting old gcl versions. At
https://bugs.launchpad.net/ubuntu/+source/gclcvs/+bug/491988
Olberd pointed them back to this bug.)

Rune Philosof (olberd) wrote :

Jorge Sampaio: No matter what I reconfigure gcl to, Maxima fails the compile "dpkg-buildpackage -b" with this error:

make[2]: Går til katalog '/home/rune/src/maxima-5.17.1/src'
test -d binary-gcl || mkdir binary-gcl
gcl -batch -eval '(progn (load "../lisp-utils/defsystem.lisp") (load "../lisp-utils/make-depends.lisp") (funcall (intern "CREATE-DEPENDENCY-FILE" :mk) "binary-gcl/maxima" "gcl-depends.mk"))'

Warning:
REQUIRE is being redefined.
make[2]: *** [gcl-depends.mk] Segmentation fault
make[2]: *** Sletter filen 'gcl-depends.mk'
make[2]: Forlader katalog '/home/rune/src/maxima-5.17.1/src'

Rune Philosof (olberd) wrote :

I think the gcl bug got fixed in the debian version 2.6.7-46. http://packages.qa.debian.org/g/gcl/news/20091211T193537Z.html
I suggest upgrading the gcl.

tags: added: upgrade
Rune Philosof (olberd) on 2010-01-28
tags: removed: upgrade
tags: added: upgrade
Rune Philosof (olberd) wrote :

Sorry about that tag change.
Upgrading to version 2.6.7-53, I still could not compile gcl.
2.6.7-56 compiles.
I suggest upgrading to that version.
Btw, that version is also urgency=high.
But just uploaded today.

Ilya Barygin (randomaction) wrote :

This sounds very promising! I uploaded newest gcl and maxima to my PPA for testing: https://launchpad.net/~randomaction/+archive/ppa.

Ilya Barygin (randomaction) wrote :

Everything looks good to me after some testing.

Changed in gcl (Ubuntu):
assignee: nobody → Ilya Barygin (randomaction)
status: New → In Progress
Changed in maxima (Ubuntu):
assignee: nobody → Ilya Barygin (randomaction)
status: Triaged → In Progress
Changed in gcl (Ubuntu):
assignee: Ilya Barygin (randomaction) → nobody
status: In Progress → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package maxima - 5.20.1-5ubuntu1

---------------
maxima (5.20.1-5ubuntu1) lucid; urgency=low

  * Merge from Debian unstable (LP: #480039), remaining changes:
     - debian/maxima-doc.doc-base.plotting:
      + Use .shtml instead of .html to fix lintian errors.
     - debian/maxima-emacs.emacsen-install:
      + Install symlinks for source files rather than copying them. This
        makes find-function work.
      + Install symlink for *.lisp so that we don't need to add
        /usr/share/emacs/site-lisp/maxima to load-path.
    - debian/maxima-emacs.emacsen-startup:
      + Remove use of /usr/share/emacs/site-lisp/maxima, since this
        causes load-path shadows and is not needed anymore.
    - Comment out backward-delete-char-untabify in maxima.el.
  * Build against newer version of gcl which does work with
    kernel.randomize_va_space (LP: #303587).

maxima (5.20.1-5) unstable; urgency=low

  * fix FTBFS on sparc

maxima (5.20.1-4) unstable; urgency=low

  * -O0 on ia64, fixing testsuite for now.
  * no SGC on sparc, no testsuite error on sparc until gcl with -O2 is in testing
  * Bug fix: "Missing dependency on texlive-latex3", thanks to Andreas
    Rottmann (Closes: #565545).

maxima (5.20.1-3) unstable; urgency=low

  * more test suite error fixes

maxima (5.20.1-2) unstable; urgency=low

  * Fix testsuite errors

maxima (5.20.1-1) unstable; urgency=low

  * New upstream release
  * Bug fix: "integral of positive function is negative", thanks to Sanjoy
    Mahajan (Closes: #530442).
  * Bug fix: "double quote ('') operator does not work!", thanks
    to Andres Cimmarusti (Closes: #556134). Bug in documentation no
    longer present. Please reopen if you disagree.

maxima (5.20.0-1) unstable; urgency=low

  [ Camm Maguire ]
  * New upstream release
  * Bug fix: "replacing libreadline5-dev build dependency with
    libreadline-dev", thanks to Matthias Klose (Closes: #553812).
  * Bug fix: "crash after ctrl-C", thanks to Miroslaw Kwasniak (Closes:
    #450703). Build depend on >= gcl-2.6.7-26.
  * Bug fix: "xmaxima 5.10.0 can't find it's docs in
    /usr/share/maxima/5.13.0/doc", thanks to Siward de Groot (Closes:
    #489167).
  * Bug fix: "Wrong project address in the manpage", thanks to Simon
    Danner (Closes: #519853). Fixed upstream
  * Bug fix: "maxima should recommend or suggest maxima-emacs", thanks to
    Chris Walker (Closes: #502632).
  * Bug fix: "[maxima] maxima version 5.18.1 was out since April", thanks
    to Huy (Closes: #533113).
  * Bug fix: "upstream version of maxima is now 5.19.2, please update!",
    thanks to Andres Cimmarusti (Closes: #552280).
  * Bug fix: "/etc/emacs/site-start.d/50imaxima-imath.el missing", thanks
    to M G Berberich (Closes: #493725).
  * lintian fixes
  * change maintainer address
 -- Ilya Barygin <email address hidden> Tue, 16 Feb 2010 11:02:37 +0300

Changed in maxima (Ubuntu):
status: In Progress → Fix Released
loco_jimenez (lfjimenezr) wrote :

#14 Thanks, you solution for the problem work in my ubuntu karmic 32bit

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

Other bug subscribers

Remote bug watches

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