[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gcl-devel] Bug#747221: maxima fails to plot through gnuplot

From: Camm Maguire
Subject: Re: [Gcl-devel] Bug#747221: maxima fails to plot through gnuplot
Date: Mon, 12 May 2014 17:35:39 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Greetings, and thanks so much for your report!  

As you notice, Debian unstable is 'unstable' in the sense that new code
is tested in this venue.  Thanks to reports like yours, bugs can be
caught and fixed before Debian release.

The issue is a change to gcl, in which gcl sets the stack resource
limits too aggressively.  gnuplot is silently dying with insufficient
stack as a subprocess, launched by popen().  Would be great if there was
better error reporting here.

This patch fixes it:
diff --git INDEX:/gcl/o/alloc.c WORKDIR:/gcl/o/alloc.c
index b172d31..69b9ed0 100644
--- INDEX:/gcl/o/alloc.c
+++ WORKDIR:/gcl/o/alloc.c
@@ -1030,7 +1030,6 @@ gcl_init_alloc(void *cs_start) {
 #if defined(BSD) && defined(RLIMIT_STACK)
     struct rlimit rl;
-    unsigned long mss;
   /* Maybe the soft limit for data segment size is lower than the
    * hard limit.  In that case, we want as much as possible.
@@ -1041,12 +1040,9 @@ gcl_init_alloc(void *cs_start) {
       massert(!setrlimit(RLIMIT_DATA, &rl));
-    mss=rl.rlim_cur/64;
     massert(!getrlimit(RLIMIT_STACK, &rl));
-    if (rl.rlim_max != RLIM_INFINITY && rl.rlim_max < mss)
-      mss=rl.rlim_max;
-    if (rl.rlim_cur == RLIM_INFINITY || rl.rlim_cur != mss) {
-      rl.rlim_cur=mss;
+    if (rl.rlim_cur!=RLIM_INFINITY && (rl.rlim_max == RLIM_INFINITY || 
rl.rlim_max > rl.rlim_cur)) {
+      rl.rlim_cur = rl.rlim_max == RLIM_INFINITY ? rl.rlim_max : 
 #ifdef __MIPS__
       if (setrlimit(RLIMIT_STACK,&rl))
        fprintf(stderr,"Cannot set stack rlimit\n");/*FIXME work around make 
bug on mips*/

I will be uploading a new Debian version with this included and
rebuilding maxima shortly.  But first, I need let acl2 finish
autobuilding, which might take a week.

If you see anything else, please let me know.

Take care,

Andres Cimmarusti <address@hidden> writes:

> I went upstream with this bug report and here's what we found out:
> http://sourceforge.net/p/maxima/mailman/message/32317553/
> Bottom line is: every time gcl gets updated, maxima needs to be
> rebuilt so things work as expected. Maxima was last rebuilt on
> 2014-04-15, by then the Debian archive had version 2.6.10-4 or
> 2.6.10-5 of gcl. Since then, there's been 5 new versions of gcl
> uploaded (even if they are just 2.6.11pre test versions).
> I hope this fixes the problem. I will attempt to rebuild myself when I
> have some time and report back.

Camm Maguire                                        address@hidden
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]