From owner-freebsd-ppc@FreeBSD.ORG Fri Jan 30 07:16:27 2015 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E99B33CA for ; Fri, 30 Jan 2015 07:16:27 +0000 (UTC) Received: from asp.reflexion.net (outbound-242.asp.reflexion.net [69.84.129.242]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A64C1D36 for ; Fri, 30 Jan 2015 07:16:27 +0000 (UTC) Received: (qmail 21838 invoked from network); 30 Jan 2015 07:16:25 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 30 Jan 2015 07:16:25 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v7.40.0) with SMTP; Fri, 30 Jan 2015 02:16:25 -0500 (EST) Received: (qmail 27798 invoked from network); 30 Jan 2015 07:16:25 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (DHE-RSA-AES256-SHA encrypted) SMTP; 30 Jan 2015 07:16:25 -0000 X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.1.8] (c-67-189-19-145.hsd1.or.comcast.net [67.189.19.145]) by iron2.pdx.net (Postfix) with ESMTPSA id A79B71C43A7; Thu, 29 Jan 2015 23:16:17 -0800 (PST) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: cmake's ctest throws std::length_error during png build, blocking building (powerpc64, 10.1-STABLE) Date: Thu, 29 Jan 2015 23:16:23 -0800 Message-Id: <9BEAA259-D227-48F7-9170-98DF9810D8C8@dsl-only.net> To: freebsd-ports@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) X-Mailer: Apple Mail (2.2070.6) Cc: FreeBSD PowerPC ML X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 07:16:28 -0000 Later below I give how I found the issue. But first I show a short way = to reproduce the problem without building a port that uses ctest: root@FBSDG5M1:/usr/home/markmi # ctest --version terminate called after throwing an instance of 'std::length_error' what(): vector::reserve Abort (core dumped) Context basics for the ctest crash: root@FBSDG5M1:/usr/home/markmi # freebsd-version -ku; uname -a 10.1-RELEASE-p4 10.1-STABLE FreeBSD FBSDG5M1 10.1-RELEASE-p4 FreeBSD 10.1-RELEASE-p4 #1 r277195M: = Mon Jan 26 23:32:28 PST 2015 root at = FBSDG5M1:/usr/obj/usr/home/markmi/src_10_1_releng/sys/GENERIC64vtsc = powerpc The 10.1-STABLE world build is from -r277483 . /usr/ports/ "Last Changed Rev" was -r378052 (so recent). root@FBSDG5M1:/usr/home/markmi # more /etc/make.conf WRKDIRPREFIX=3D/usr/obj/portswork WITH_DEBUG=3D MALLOC_PRODUCTION=3D root@FBSDG5M1:/usr/home/markmi # more /etc/src.conf #WITH_DEBUG_FILES=3D #WITHOUT_CLANG=3D root@FBSDG5M1:/usr/home/markmi # cmake --version cmake version 3.1.1 Problem: Later below I give how I found the issue. But first I show a short way = to reproduce the problem without building a port that uses ctest: root@FBSDG5M1:/usr/home/markmi # ctest --version terminate called after throwing an instance of 'std::length_error' what(): vector::reserve Abort (core dumped) =46rom the portmaster -r png I got the following failure, which turns = out to be in cmake's ctest: root@FBSDG5M1:/usr/home/markmi # portmaster -r --no-confirm png ... [100%] Building C object = CMakeFiles/pngstest.dir/contrib/libtests/pngstest.o Linking C executable pngtest [100%] Built target pngtest Linking C executable pngstest [100%] Built target pngstest Linking C executable pngvalid [100%] Built target pngvalid ... Running tests... terminate called after throwing an instance of 'std::length_error' what(): vector::reserve Abort trap (core dumped) *** [test] Error code 134 ... Below is the traceback. It shows a huge vector::reserve size = (#8...::reserve (this=3D0xffffffffffffae08, __n=3D5497010905810357313) = at vector.tcc:72). root@FBSDG5M1:/var/crash # gdb `which ctest` ctest.5708.core ... (gdb) bt #0 0x0000000050d19168 in .__sys_thr_kill () from /lib/libc.so.7 #1 0x0000000050d1907c in .__raise () from /lib/libc.so.7 #2 0x0000000050d17658 in .abort () from /lib/libc.so.7 #3 0x00000000514cbae0 in ._ZN9__gnu_cxx27__verbose_terminate_handlerEv = () from /usr/lib/libsupc++.so.1 #4 0x00000000514d11d8 in ._ZSt14set_unexpectedPFvvE () from = /usr/lib/libsupc++.so.1 #5 0x00000000514d1230 in ._ZSt9terminatev () from = /usr/lib/libsupc++.so.1 #6 0x00000000514d10dc in .__cxa_throw () from /usr/lib/libsupc++.so.1 #7 0x0000000050ab6e54 in ._ZSt20__throw_length_errorPKc () from = /usr/lib/libstdc++.so.6 #8 0x0000000010246528 in = std::vector >*, = std::allocator >*> >::reserve (this=3D0xffffffffffffae08,=20 __n=3D5497010905810357313) at vector.tcc:72 #9 0x0000000010474710 in cmsys::hashtable, std::string, cmsys::hash, = cmsys::hash_select1st, = std::equal_to, std::allocator = >::_M_initialize_buckets (this=3D0xffffffffffffae00, __n=3D100) at = hashtable.hxx:797 #10 0x0000000010474838 in hashtable (this=3D0xffffffffffffae00, __n=3D100,= __hf=3D@0xffffffffffffabb2, __eql=3D@0xffffffffffffabb1,=20 __a=3D@0xffffffffffffabb0) at hashtable.hxx:545 #11 0x000000001047490c in hash_map (this=3D0xffffffffffffae00) at = hash_map.hxx:113 #12 0x00000000104728f8 in cmDefinitions (this=3D0xffffffffffffadf8, = parent=3D0x0) at = /usr/obj/portswork/usr/ports/devel/cmake/work/cmake-3.1.1/Source/cmDefinit= ions.cxx:19 #13 0x000000001020dbcc in cmMakefile (this=3D0x51cb1800) at = /usr/obj/portswork/usr/ports/devel/cmake/work/cmake-3.1.1/Source/cmMakefil= e.cxx:56 #14 0x00000000101efa98 in cmLocalGenerator::SetGlobalGenerator = (this=3D0x51c3f480, gg=3D0xffffffffffffbe38) at = /usr/obj/portswork/usr/ports/devel/cmake/work/cmake-3.1.1/Source/cmLocalGe= nerator.cxx:244 #15 0x00000000101874b0 in cmGlobalGenerator::CreateLocalGenerator = (this=3D0xffffffffffffbe38) at = /usr/obj/portswork/usr/ports/devel/cmake/work/cmake-3.1.1/Source/cmGlobalG= enerator.cxx:1906 #16 0x00000000100224dc in cmCTest::Initialize (this=3D0xffffffffffffcc50,=20= binary_dir=3D0x51c890f8 = "/usr/obj/portswork/usr/ports/graphics/png/work/libpng-1.6.16", = command=3D0x0) at = /usr/obj/portswork/usr/ports/devel/cmake/work/cmake-3.1.1/Source/cmCTest.c= xx:511 #17 0x000000001002c704 in cmCTest::Run (this=3D0xffffffffffffcc50, = args=3D@0xffffffffffffc880, output=3D0xffffffffffffc898) at = /usr/obj/portswork/usr/ports/devel/cmake/work/cmake-3.1.1/Source/cmCTest.c= xx:2474 #18 0x0000000010010c10 in main (argc=3D2, argv=3D0x51c1a040) at = /usr/obj/portswork/usr/ports/devel/cmake/work/cmake-3.1.1/Source/ctest.cxx= :192 #19 0x000000001000fc8c in ._start () #20 0x000000005074c770 in .text () from /libexec/ld-elf.so.1 More context: $ freebsd-version -ku; uname -a 10.1-RELEASE-p4 10.1-STABLE FreeBSD FBSDG5M1 10.1-RELEASE-p4 FreeBSD 10.1-RELEASE-p4 #1 r277195M: = Mon Jan 26 23:32:28 PST 2015 root at = FBSDG5M1:/usr/obj/usr/home/markmi/src_10_1_releng/sys/GENERIC64vtsc = powerpc For the buildworld context: $ svnlite info /usr/src Path: /usr/src Working Copy Root Path: /usr/src URL: https://svn0.us-west.freebsd.org/base/stable/10 Relative URL: ^/stable/10 Repository Root: https://svn0.us-west.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 277483 Node Kind: directory Schedule: normal Last Changed Author: smh Last Changed Rev: 277483 Last Changed Date: 2015-01-21 01:45:48 -0800 (Wed, 21 Jan 2015) For the ports: $ svnlite info /usr/ports Path: /usr/ports Working Copy Root Path: /usr/ports URL: https://svn0.us-west.freebsd.org/ports/head Relative URL: ^/head Repository Root: https://svn0.us-west.freebsd.org/ports Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5 Revision: 378053 Node Kind: directory Schedule: normal Last Changed Author: danilo Last Changed Rev: 378052 Last Changed Date: 2015-01-28 01:33:23 -0800 (Wed, 28 Jan 2015) For the kernel context (not so relevant here but for completeness): $ svnlite info ~markmi/src_10_1_releng/ Path: /home/markmi/src_10_1_releng Working Copy Root Path: /home/markmi/src_10_1_releng URL: https://svn0.us-west.freebsd.org/base/releng/10.1 Relative URL: ^/releng/10.1 Repository Root: https://svn0.us-west.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 277195 Node Kind: directory Schedule: normal Last Changed Author: delphij Last Changed Rev: 277195 Last Changed Date: 2015-01-14 13:27:46 -0800 (Wed, 14 Jan 2015) $ svnlite status ~markmi/src_10_1_releng/ M /home/markmi/src_10_1_releng/sys/ddb/db_main.c M /home/markmi/src_10_1_releng/sys/ddb/db_script.c M /home/markmi/src_10_1_releng/sys/powerpc/ofw/ofw_machdep.c M /home/markmi/src_10_1_releng/sys/powerpc/ofw/ofwcall64.S M = /home/markmi/src_10_1_releng/sys/powerpc/powermac/powermac_thermal.c =3D=3D=3D Mark Millard markmi at dsl-only.net