From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Sep 19 05:30:10 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6366910656BB for ; Fri, 19 Sep 2008 05:30:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3A8818FC28 for ; Fri, 19 Sep 2008 05:30:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m8J5U957014747 for ; Fri, 19 Sep 2008 05:30:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m8J5U9QR014746; Fri, 19 Sep 2008 05:30:09 GMT (envelope-from gnats) Resent-Date: Fri, 19 Sep 2008 05:30:09 GMT Resent-Message-Id: <200809190530.m8J5U9QR014746@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Stephen Montgomery-Smith Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0352A1065670 for ; Fri, 19 Sep 2008 05:21:11 +0000 (UTC) (envelope-from stephen@cauchy.math.missouri.edu) Received: from cauchy.math.missouri.edu (cauchy.math.missouri.edu [128.206.184.213]) by mx1.freebsd.org (Postfix) with ESMTP id C463A8FC0C for ; Fri, 19 Sep 2008 05:21:10 +0000 (UTC) (envelope-from stephen@cauchy.math.missouri.edu) Received: from cauchy.math.missouri.edu (localhost [127.0.0.1]) by cauchy.math.missouri.edu (8.14.2/8.14.2) with ESMTP id m8J5KSt0056099 for ; Fri, 19 Sep 2008 00:20:28 -0500 (CDT) (envelope-from stephen@cauchy.math.missouri.edu) Received: (from stephen@localhost) by cauchy.math.missouri.edu (8.14.2/8.14.2/Submit) id m8J5KScY056095; Fri, 19 Sep 2008 00:20:28 -0500 (CDT) (envelope-from stephen) Message-Id: <200809190520.m8J5KScY056095@cauchy.math.missouri.edu> Date: Fri, 19 Sep 2008 00:20:28 -0500 (CDT) From: Stephen Montgomery-Smith To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/127491: octave can crash with "malloc(): error: recursive call" X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Stephen Montgomery-Smith List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Sep 2008 05:30:10 -0000 >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: