Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Sep 2008 00:20:28 -0500 (CDT)
From:      Stephen Montgomery-Smith <stephen@math.missouri.edu>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/127491: octave can crash with "malloc(): error: recursive call"
Message-ID:  <200809190520.m8J5KScY056095@cauchy.math.missouri.edu>
Resent-Message-ID: <200809190530.m8J5U9QR014746@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         127491
>Category:       ports
>Synopsis:       octave can crash with "malloc(): error: recursive call"
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 19 05:30:09 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Stephen Montgomery-Smith
>Release:        FreeBSD 6.4-PRERELEASE amd64
>Organization:
>Environment:
System: FreeBSD cauchy 6.4-PRERELEASE FreeBSD 6.4-PRERELEASE #0: Mon Jul 14 15:26:47 CDT 2008 stephen@cauchy:/usr/obj/usr/src/sys/GENERIC amd64


	
>Description:
octave can crash with "malloc(): error: recursive call".

This seems to happen intermittently when installing any of the octave-forge-*
ports, either using ports or packages.

The problem seems to be caused by a signal handler that invokes malloc.
My guess is that it is in octave-3.0.2/src/sighandlers.cc inside
octave_child_list::instance_ok, which is called via octave_child_list::reap
in octave_signal_handler.

>How-To-Repeat:
Run the script
sh -c "while true; do killall -CHLD octave-3.0.2; done"
and at the same time install some of the octave-forge-* ports, either from
ports or packages.  It will not happen every time.

I can make this happen with FreeBSD-6.x, but not with FreeBSD-8.x.  I have
only tried it with the amd64 architecture, not i386, so I don't know if it is
a problem with i386.

>Fix:


First install PR ports/127490.

Then apply this patch:

diff -ur /usr/ports-old/math/octave/Makefile Makefile
--- /usr/ports-old/math/octave/Makefile	2008-09-07 20:31:50.000000000 -0500
+++ Makefile	2008-09-18 23:20:37.000000000 -0500
@@ -25,7 +25,10 @@
 		glpk.16:${PORTSDIR}/math/glpk \
 		hdf5:${PORTSDIR}/science/hdf5 \
 		umfpack.1:${PORTSDIR}/math/suitesparse \
-		qhull:${PORTSDIR}/math/qhull
+		qhull:${PORTSDIR}/math/qhull \
+		ptmalloc:${PORTSDIR}/devel/ptmalloc
+
+CONFIGURE_ENV+=	LIBS="-L${LOCALBASE}/lib -lptmalloc"
 
 LATEST_LINK=    octave-devel
 


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200809190520.m8J5KScY056095>