Crash report: integral of ln(1+4/5*sin(x)) crashes Maxima and Sage

77 views
Skip to first unread message

Benjamin Jones

unread,
Jun 7, 2012, 5:13:44 PM6/7/12
to sage-s...@googlegroups.com
On Mac OS X 10.6.8 intel core i7 and sage-5.0 (also sage-5.1.beta2) I can crash sage (and Maxima) by evaluating:

sage: integrate(ln(1+4/5*sin(x)), x, -3.1415, 3.1415)


;;;
;;; Binding stack overflow.
;;; Jumping to the outermost toplevel prompt
;;;

...

;;;
;;; Binding stack overflow.
;;; Jumping to the outermost toplevel prompt
;;;


/Users/jonesbe/sage/sage-5.1.beta2/spkg/bin/sage: line 335: 86594 Illegal instruction     sage-ipython "$@" -i

The same happens with the indefinite integral and the exact definite integral from -pi to pi. 

Has anyone seen similar crashes using sage-5.0 or earlier?

Oleksandr Kazymyrov

unread,
Jun 7, 2012, 7:55:41 PM6/7/12
to sage-s...@googlegroups.com
I have the same problem on:
sage: version()
'Sage Version 5.0, Release Date: 2012-05-14'
hamsin@hamsin
-PC:~$ uname -a
Linux hamsin-PC 3.2.0-24-generic #39-Ubuntu SMP Mon May 21 16:52:17 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Renan Birck Pinheiro

unread,
Jun 7, 2012, 8:21:03 PM6/7/12
to sage-s...@googlegroups.com
2012/6/7 Benjamin Jones <benjami...@gmail.com>


The same happens with the indefinite integral and the exact definite integral from -pi to pi. 

Has anyone seen similar crashes using sage-5.0 or earlier?


I have the same problem with sage-5.0 (built from source) on Arch Linux.

Renan
--
Renan Birck Pinheiro - Grupo de Microeletrônica - Engenharia Elétrica - UFSM - Santa Maria, Brazil

http://renanbirck.blogspot.com / skype: renan.ee.ufsm / +55 55 91162798


Justin C. Walker

unread,
Jun 7, 2012, 8:21:01 PM6/7/12
to sage-s...@googlegroups.com

On Jun 7, 2012, at 14:13 , Benjamin Jones wrote:

> On Mac OS X 10.6.8 intel core i7 and sage-5.0 (also sage-5.1.beta2) I can
> crash sage (and Maxima) by evaluating:
>
> sage: integrate(ln(1+4/5*sin(x)), x, -3.1415, 3.1415)
[snip]
> Has anyone seen similar crashes using sage-5.0 or earlier?

I have duplicated this with Sage 5.0 on Mac OS X 10.6.8 (Dual 6-core Xeons) and 10.7.4 (quad core Core i7).

With 4.8 (10.6.8), sage just echos back what I typed in (no process is spawned while this is being "processed").

The first version that gives the crash (rather than just echoing) seems to be 5.0-b3 (b2 just echos).

HTH

Justin

--
Justin C. Walker, Curmudgeon at Large
Director
Institute for the Enhancement of the Director's Income
-----------
Nobody knows the trouble I've been
-----------



kcrisman

unread,
Jun 7, 2012, 8:52:14 PM6/7/12
to sage-s...@googlegroups.com


On Thursday, June 7, 2012 8:21:01 PM UTC-4, Justin C. Walker wrote:

On Jun 7, 2012, at 14:13 , Benjamin Jones wrote:

> On Mac OS X 10.6.8 intel core i7 and sage-5.0 (also sage-5.1.beta2) I can
> crash sage (and Maxima) by evaluating:
>
> sage: integrate(ln(1+4/5*sin(x)), x, -3.1415, 3.1415)
[snip]
> Has anyone seen similar crashes using sage-5.0 or earlier?

I have duplicated this with Sage 5.0 on Mac OS X 10.6.8 (Dual 6-core Xeons) and 10.7.4 (quad core Core i7).

With 4.8 (10.6.8), sage just echos back what I typed in (no process is spawned while this is being "processed").

The first version that gives the crash (rather than just echoing) seems to be 5.0-b3 (b2 just echos).


Hmm, strange, as one Maxima upgrade


was in b2 but the other


was in b8.

Justin C. Walker

unread,
Jun 7, 2012, 9:04:25 PM6/7/12
to sage-s...@googlegroups.com

On Jun 7, 2012, at 17:52 , kcrisman wrote:
>
> On Thursday, June 7, 2012 8:21:01 PM UTC-4, Justin C. Walker wrote:
>>
>> On Jun 7, 2012, at 14:13 , Benjamin Jones wrote:
>>
>>> On Mac OS X 10.6.8 intel core i7 and sage-5.0 (also sage-5.1.beta2) I
>> can
>>> crash sage (and Maxima) by evaluating:
>>>
>>> sage: integrate(ln(1+4/5*sin(x)), x, -3.1415, 3.1415)
>> [snip]
>>> Has anyone seen similar crashes using sage-5.0 or earlier?
>>
>> I have duplicated this with Sage 5.0 on Mac OS X 10.6.8 (Dual 6-core
>> Xeons) and 10.7.4 (quad core Core i7).
>>
>> With 4.8 (10.6.8), sage just echos back what I typed in (no process is
>> spawned while this is being "processed").
>>
>> The first version that gives the crash (rather than just echoing) seems to
>> be 5.0-b3 (b2 just echos).
>>
>>
> Hmm, strange, as one Maxima upgrade

> was in b2 but the other

> was in b8.

I'm not sure that this is maxima:
- the only crash reports I see are for python
- I don't see maxima starting up when this is tested
- I do see a python stack-athon
The latter is what seems to be behind the crash (the segfault is attributed to python in the error message).

Justin

--
Justin C. Walker, Curmudgeon at Large
Institute for the Absorption of Federal Funds
-----------
If it weren't for carbon-14, I wouldn't date at all.
-----------


Justin C. Walker

unread,
Jun 7, 2012, 9:09:02 PM6/7/12
to sage-s...@googlegroups.com

On Jun 7, 2012, at 18:04 , Justin C. Walker wrote:

>
> On Jun 7, 2012, at 17:52 , kcrisman wrote:
>>
>> On Thursday, June 7, 2012 8:21:01 PM UTC-4, Justin C. Walker wrote:
>>>
>>> On Jun 7, 2012, at 14:13 , Benjamin Jones wrote:
>>>
>>>> On Mac OS X 10.6.8 intel core i7 and sage-5.0 (also sage-5.1.beta2) I
>>> can
>>>> crash sage (and Maxima) by evaluating:
>>>>
>>>> sage: integrate(ln(1+4/5*sin(x)), x, -3.1415, 3.1415)
>>> [snip]
>>>> Has anyone seen similar crashes using sage-5.0 or earlier?
>>>
>>> I have duplicated this with Sage 5.0 on Mac OS X 10.6.8 (Dual 6-core
>>> Xeons) and 10.7.4 (quad core Core i7).
>>>
>>> With 4.8 (10.6.8), sage just echos back what I typed in (no process is
>>> spawned while this is being "processed").
>>>
>>> The first version that gives the crash (rather than just echoing) seems to
>>> be 5.0-b3 (b2 just echos).
>>>
>>>
>> Hmm, strange, as one Maxima upgrade
>
>> was in b2 but the other
>
>> was in b8.
>
> I'm not sure that this is maxima:
> - the only crash reports I see are for python
> - I don't see maxima starting up when this is tested


> - I do see a python stack-athon
> The latter is what seems to be behind the crash (the segfault is attributed to python in the error message).

FWIW, running "sage -gdb" (5.0-b3), I get this after the crash:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000008
0x000000010c91b867 in ecl_bds_unwind ()
(gdb)

Is Maxima used as a library, or used with pexpect? I've lost track.

Justin

--
Justin C. Walker, Curmudgeon at Large
Institute for the Absorption of Federal Funds
--
Democracy is two wolves and a lamb
voting on what to have for lunch.
Liberty is a well-armed lamb contesting
the vote.



kcrisman

unread,
Jun 7, 2012, 10:10:03 PM6/7/12
to sage-s...@googlegroups.com


Is Maxima used as a library, or used with pexpect?  I've lost track.


For this kind of thing, should be library.

Dan Drake

unread,
Jun 8, 2012, 12:21:50 AM6/8/12
to sage-s...@googlegroups.com
On Thu, 07 Jun 2012 at 02:13PM -0700, Benjamin Jones wrote:
> On Mac OS X 10.6.8 intel core i7 and sage-5.0 (also sage-5.1.beta2) I can
> crash sage (and Maxima) by evaluating:

I tested this on 4.8 and all of the 5.0 betas I have around. This is on
an 8-core Xeon machine running Ubuntu 12.04 (but the binaries were built
when it was 10.04):

drake@sagenb:~/s$ for d in sage-* ; do echo -n $d && $d//sage -c
"x=var('x');print integrate(ln(1+4/5*sin(x)), x, -3.1415, 3.1415)" ; done

resulted in

sage-4.8: integrate(log(4/5*sin(x) + 1), x, -3.1415, 3.1415)
sage-5.0.beta1: integrate(log(4/5*sin(x) + 1), x, -3.1415, 3.1415)
sage-5.0.beta2 integrate(log(4/5*sin(x) + 1), x, -3.1415, 3.1415)

All these failed:

sage-5.0.beta3
sage-5.0.beta4
sage-5.0.beta5
sage-5.0.beta6
sage-5.0.beta7
sage-5.0.beta8
sage-5.0.beta9
sage-5.0.beta11
sage-5.0.beta12
sage-5.0.beta13
sage-5.0.beta14
sage-5.0.rc0
sage-5.0.rc1
sage-5.0

sage-5.1.beta0
sage-5.1.beta1
sage-5.1.beta2

So we should look between 5.0.beta2 and 5.0.beta3, I guess.

Dan

--
--- Dan Drake
----- http://mathsci.kaist.ac.kr/~drake
-------
signature.asc

Benjamin Jones

unread,
Jun 8, 2012, 1:32:02 AM6/8/12
to sage-s...@googlegroups.com
Well, Maxima 5.26.0 just hangs...

Maxima 5.26.0 http://maxima.sourceforge.net
using Lisp ECL 11.1.1
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) integrate(ln(1+4/5*sin(x)), x)
... (waited almost an hour)
^C
Maxima encountered a Lisp error:


Console interrupt

--
Benjamin Jones

Dima Pasechnik

unread,
Jun 8, 2012, 4:43:27 AM6/8/12
to sage-s...@googlegroups.com


On Friday, 8 June 2012 07:32:02 UTC+2, Benjamin Jones wrote:
Well, Maxima 5.26.0 just hangs...

Maxima 5.26.0 http://maxima.sourceforge.net
using Lisp ECL 11.1.1
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) integrate(ln(1+4/5*sin(x)), x)

you forgot ';' !
For me it works:
sage: maxima_console()
;;; Loading #P"/usr/local/src/sage/sage-5.1.beta1/local/lib/ecl/sb-bsd-sockets.fas"
;;; Loading #P"/usr/local/src/sage/sage-5.1.beta1/local/lib/ecl/sockets.fas"
;;; Loading #P"/usr/local/src/sage/sage-5.1.beta1/local/lib/ecl/defsystem.fas"
;;; Loading #P"/usr/local/src/sage/sage-5.1.beta1/local/lib/ecl/cmp.fas"
using Lisp ECL 11.1.1
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) integrate(ln(1+4/5*sin(x)), x);
                             /
                             [    4 sin(x)
(%o1)                        I ln(-------- + 1) dx
                             ]       5
                             /
(%i2) 

Justin C. Walker

unread,
Jun 8, 2012, 5:05:07 AM6/8/12
to sage-s...@googlegroups.com

On Jun 7, 2012, at 19:10 , kcrisman wrote:

>
>>
>>
>>
>> Is Maxima used as a library, or used with pexpect? I've lost track.
>>
>>
> For this kind of thing, should be library.

Is that a 'no'?

--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Enhancement of the Director's Income
--------
Experience is what you get
when you don't get what you want.
--------



Volker Braun

unread,
Jun 8, 2012, 5:07:02 AM6/8/12
to sage-s...@googlegroups.com
This is definitely a maxima bug, it seems that it goes into a recursion in binary-ecl/sin.c. Did you open a ticket for it?

Justin C. Walker

unread,
Jun 8, 2012, 5:14:08 AM6/8/12
to sage-s...@googlegroups.com

On Jun 8, 2012, at 02:07 , Volker Braun wrote:

> This is definitely a maxima bug, it seems that it goes into a recursion in
> binary-ecl/sin.c. Did you open a ticket for it?

Why don't I see 'maxima' in the crash logs? And why don't I see 'maxima' starting up as a subprocess?

Justin

--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Absorption of Federal Funds
--------
If you're not confused,
You're not paying attention
--------



Dima Pasechnik

unread,
Jun 8, 2012, 5:22:12 AM6/8/12
to sage-s...@googlegroups.com


On Friday, 8 June 2012 11:07:02 UTC+2, Volker Braun wrote:
This is definitely a maxima bug, it seems that it goes into a recursion in binary-ecl/sin.c. Did you open a ticket for it?
no, it is a wierd interface bug.
I tried this integral in maxima-console, it works there just fine!

kcrisman

unread,
Jun 8, 2012, 9:23:16 AM6/8/12
to sage-s...@googlegroups.com
I get the same problem as well.

 
So we should look between 5.0.beta2 and 5.0.beta3, I guess.


Merged in sage-5.0.beta3:

#7509: William Stein, Wilfried Huss: notebook -- make it possible to debug Python code in the notebook, e.g., something like pdb that works in the notebook [Reviewed by David Roe]
#8458: Lukáš Lánský: iterator for graphs() doesn't return independent graphs [Reviewed by Nathann Cohen]
#8879: Michael Orlitzky: Clean up whitespace in padic hyperelliptic curve file [Reviewed by Karl-Dieter Crisman]
#10175: Volker Braun: symmetric and exterior powers of characters [Reviewed by David Roe]
#10441: Lukáš Lánský: Error creating an empty multi-edge (di)graph [Reviewed by Nathann Cohen]
#10628: Maarten Derickx, Simon King: initialization of matrices from vectors or list of lists can be way faster [Reviewed by Simon King]
#10868: Michael Orlitzky: A wrong (easy) limit [Reviewed by Aly Deines]
#10916: Lukáš Lánský: Multiple loops and edges are lost upon pickling [Reviewed by Nathann Cohen]
#10923: Thierry Monteil, Michael Orlitzky: Bad sign in integral() [Reviewed by Benjamin Jones, Karl-Dieter Crisman]
#10940: Frederic Han: giac interface [Reviewed by David Kohel]
#11483: Michael Orlitzky, Jason Grout: enable abs_integrate package from maxima [Reviewed by Karl-Dieter Crisman]
#11591: Michael Orlitzky: Incorrect results for integrals involving exponential functions [Reviewed by Aly Deines]
#11739: Lukáš Lánský: add_vertex w/o params should return the new vertex [Reviewed by Paul Zimmermann]
#11920: Jeroen Demeyer: Sympow needs to disable fused-multiply-add and should create datafiles [Reviewed by Leif Leonhardy, Volker Braun]
#11981: Daniel Krenn: map_coefficients (of multivariate polynomial ring) cannot change base_ring [Reviewed by Julian Rueth]
#12105: Johan Bosman: RuntimeError: Segmentation fault with nth_root [Reviewed by Karl-Dieter Crisman]
#12144: William Stein: better document a technical confusing point in the Hidden Markov Model code [Reviewed by Jason Grout]
#12261: David Roe: Bring Doctest coverage for element_ext_pari.py to 100% [Reviewed by Karl-Dieter Crisman, Aly Deines]
#12317: Francis Clarke: printing factorisations [Reviewed by Robert Bradshaw]
#12325: Lukáš Lánský: Eulerian circuits/paths for (di)graphs [Reviewed by Nathann Cohen]
#12328: François Bissey: GMP_BITS_PER_MP_LIMB is deprecated in gmp/mpir [Reviewed by Robert Bradshaw]
#12370: Javier López Peña: Change is_singular to use rank instead of determinant [Reviewed by Keshav Kini]
#12378: Joal Heagney, Nathann Cohen: Graph chromatic_number documentation [Reviewed by Karl-Dieter Crisman]
#12386: Julien Puydt: [ARM] pickling issues in the matrix_mod2_dense code [Reviewed by Martin Albrecht]
#12389: Nathann Cohen: Rounding error in graph coloring [Reviewed by David Coudert]
#12395: David Roe: Change some random variable indexes that cause doctest failures if doctests are run in a different order. [Reviewed by Karl-Dieter Crisman]
#12412: Jim Stark: TypeError when creating a zero map from a zero dimensional vector space to a positive dimensional vector space [Reviewed by Aly Deines]
 

Out of these, only #10868, #10923, # 11483, or # 11591 seem to even be possible suspects.

#10868, #10923, and #11591 are pure documentation patches.

#11483 finally adds abs_integrate to our default, but that doesn't seem to change Dima's result in vanilla Maxima.

(%i2) load(abs_integrate);
(%o2) /Users/.../sage-5.0/local/share/maxima/5.26.0/s\
hare/contrib/integration/abs_integrate.mac
(%i4) keepfloat:true;
(%o4)                                true
(%i7) integrate(ln(1+4/5*sin(x)), x, -3.1415, 3.1415);
                          3.1415
                         /
                         [            4 sin(x)
(%o7)                    I         ln(-------- + 1) dx
                         ]               5
                         /
                          - 3.1415

And we have

sage: maxima_calculus(" integrate(ln(1+4/5*sin(x)), x, -3.1415, 3.1415);")
'integrate(ln(4*sin(x)/5+1),x,-3.1415,3.1415)

so something must indeed be wrong in how we're sending this to Maxima.

Dima Pasechnik

unread,
Jun 8, 2012, 8:56:50 AM6/8/12
to sage-s...@googlegroups.com
On 2012-06-08, Dima Pasechnik <dim...@gmail.com> wrote:
> ------=_Part_945_16506275.1339145007731
> Content-Type: text/plain; charset=ISO-8859-1
just to make sure, I tested this on a variety of platforms
(MacOSX 10.6.8 (on Core 2 Duo), 32-bit Linux, 64-bit Linux)
and this works.

So the bug seems to be in the Sage interface to Maxima
(to the Maxima library, AFAIK)

Dima

Reply all
Reply to author
Forward
0 new messages