maxima crashes: Couldn't protect - out of memory allocating 7 bytes

Bug #261056 reported by Giovanni Dall'Olio on 2008-08-25
64
This bug affects 10 people
Affects Status Importance Assigned to Milestone
maxima (Debian)
Fix Released
Unknown
maxima (Ubuntu)
Medium
Unassigned
Nominated for Intrepid by Josh Lee
Nominated for Jaunty by MarkoKnöbl

Bug Description

Binary package hint: maxima

Package:
maxima:
  Installato: 5.13.0-3ubuntu1
  Candidato: 5.13.0-3ubuntu1
  Tabella versione:

System:
Description: Ubuntu intrepid (development branch)
Release: 8.10

I believe this is the same bug as reported in http://<email address hidden>/msg531166.html for debian.

maxima crashes when I run it on shell and gives me the following output:
"""
Maxima 5.13.0 http://maxima.sourceforge.net
Using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (aka GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
This is a development version of Maxima. The function bug_report()
provides bug reporting information.
(%i1)
Maxima encountered a Lisp error:

 Error in PROGN [or a callee]: Couldn't protect

Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.
(%i1)
out of memory allocating 7 bytes after a total of 125611132 bytes
"""
Also, xmaxima doesn't seem to work, while wxmaxima is working properly.

Ivan Stetsenko (stetzen) wrote :

The same problem here. Intrepid, maxima from repository.

franco (mysteremetal) wrote :

i have the same problem with wxmaxima

Maxima encountered a Lisp error:

 Error in PROGN [or a callee]: Couldn't protect

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

Iulian Udrea (iulian) on 2008-11-11
Changed in maxima:
importance: Undecided → Medium
status: New → Confirmed
Fabus (fabian-gebert-hh) wrote :

same here

Johan Christiansen (johandc) wrote :

Same here :(

When running from WxMaxima, it seems that maxima crashes the first time, but then starts at it should.

The maxima package from Debian sid doesn't have this bug, and it works unmodified in Intrepid. (http://packages.debian.org/unstable/math/maxima) The version is 5.16.3-1.

Changed in maxima:
status: Unknown → New

.deb packages for Maxima 5.17.0 and wxMaxima 0.8.1 compiled for Ubuntu 8.10 are available there:

http://zeus.nyf.hu/%7Eblahota/maxima_5.17.0-1_i386.deb
http://zeus.nyf.hu/%7Eblahota/wxmaxima_0.8.1-1_i386.deb

(from http://zeus.nyf.hu/~blahota/linux/)

Those packages solved the problem on my computer, while .deb packages from sid didn't.

Can someone confirm?

Tim Abbott (tabbott) wrote :

I can confirm that the packages on http://zeus.nyf.hu/~blahota/linux/ fix the crash problems.

These crash problems prevent sagemath from working on jaunty.

Tim Abbott (tabbott) wrote :

I also can confirm that compiling the package from sid on jaunty still crashes.

Eric: where is the source you used to build the .debs you posted?

Tim Abbott (tabbott) wrote :

Ahh, it looks like the key difference is that the package Eric posted use clisp, while the version in Debian uses gcl. So, I'm guessing some gcl bug is the cause of the crashes.

Note that I'm not the one who build those packages : I simply found them via goole.
István Blahota (https://launchpad.net/~blahota) did the job.

Slightly different error message:

$ maxima

Maxima 5.13.0 http://maxima.sourceforge.net
Using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (aka GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
This is a development version of Maxima. The function bug_report()
provides bug reporting information.
(%i1)
Maxima encountered a Lisp error:

 Error in PROGN [or a callee]: Couldn't protect

Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.
(%i1) xmalloc: out of virtual memory
--END--

moormaster (moormaster) wrote :

apt-get source maxima
cd maxima-5.17.1
dpkg-buildpackage

-> make[2]: *** [gcl-depends.mk] Segmentation fault

how did they compile this package to be used with gcl? :D

doing

./configure --enable-clisp
make

solves the "Couldn't protect" problem.

I have also tried to build maxima using gcl but then the configure script complains about the missing ansi support in the gcl version which resided in the ubuntu repository...

When can we expect a working .deb package in the ubuntu repositories? ^^

Still occurs with Ubuntu Karmic (x86). Replacing the package with the package from Debian Sid solves the problem.

But that is not a real solution, of course.

Changed in maxima (Debian):
status: New → Fix Released
Wrwrwr (wrwrwr) wrote :

Disabling randomization of the virtual address space may also help:

setarch i386 -R maxima

ii maxima 5.17.1-1ubuntu1
Linux 2.6.31-22-generic #60-Ubuntu SMP Thu May 27 02:41:03 UTC 2010 x86_64 GNU/Linux (partly updated Jaunty)

themusicgod1 (themusicgod1) wrote :

Maxima complains about missing ansi when compiling with gcj even when gcj is compiled with --enable-ansi

themusicgod1 (themusicgod1) wrote :

ie even when gcl is compiled with --enable-ansi (see attached log)

this is the test that does it

gcl -batch -eval '#+ansi-cl (format t "MAXIMA_GCL_ANSI_TEST_SUCCESS~%") #-ansi-cl (format t "MAXIMA_GCL_ANSI_TEST_FAILURE~%")' -eval '(si::bye)'

result :
MAXIMA_GCL_ANSI_TEST_FAILURE

but why?

PeterPall (peterpall) wrote :

You can try using clisp instead of gcl (slow, but memory-efficient) or sbcl (fast): Gcl had a few breaking changes in the last few revisions.

themusicgod1 (themusicgod1) wrote :

> I have also tried to build maxima using gcl but then the configure script complains about the missing ansi support in the gcl version which resided in the ubuntu repository...

Turns out, and this is probably true going back to even karmic, that gcl *did* come with ansi-cl support... the readme says as much, but you need environment variable GCL_ANSI to be defined (AND EXPORTED) in order for ansi-cl to be available.

themusicgod1@eva1:~$ export GCL_ANSI=""
themusicgod1@eva1:~$ gcl -batch -eval '#+ansi-cl (format t "MAXIMA_GCL_ANSI_TEST_SUCCESS~%") #-ansi-cl (format t "MAXIMA_GCL_ANSI_TEST_FAILURE~%")' -eval '(si::bye)'
MAXIMA_GCL_ANSI_TEST_FAILURE
themusicgod1@eva1:~$ export GCL_ANSI="true"
themusicgod1@eva1:~$ gcl -batch -eval '#+ansi-cl (format t "MAXIMA_GCL_ANSI_TEST_SUCCESS~%") #-ansi-cl (format t "MAXIMA_GCL_ANSI_TEST_FAILURE~%")' -eval '(si::bye)'
MAXIMA_GCL_ANSI_TEST_SUCCESS

maxima does build (at least for me) with GCL_ANSI defined and set to true in the above manner, even when I compile maxima with gcl and then remove gcl from my system

Anyway. The aforementioned debian bug suggests this is a kernel security setting issue:

"Greetings! Your kernel is not allowing pages to be marked executable,
or maybe writable:

  if(mprotect(pagetochar(pbeg),n*PAGESIZE,
       (writable & SGC_WRITABLE ? PROT_READ_WRITE_EXEC : PROT_READ_EXEC)))
    FEerror("Couldn't protect",0);"

Camm Maguire asked for more details why...8 years ago. Without details on why it's kind of hard to progress on this. Marking incomplete.

Changed in maxima (Ubuntu):
status: Confirmed → Incomplete
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.