Ticket #2037 (closed bug: fixed)

Opened 11 years ago

Last modified 11 years ago

darwin/ppc build failure

Reported by: jkeenan Owned by: jkeenan
Priority: normal Milestone:
Component: core Version: 3.1.0
Severity: fatal Keywords:
Cc: cotto, bacek, plobsing Language:
Patch status: Platform: darwin

Description

At some point since Feb 28, Parrot began to fail make on Darwin/PPC. At 0cf3ffa, for example, the build failed here:

Linked: parrot-nqp
./parrot -o runtime/parrot/library/PCT/Grammar.pbc compilers/pct/src/PCT/Grammar.pir
./parrot -o runtime/parrot/library/PCT.pbc compilers/pct/PCT.pir
/usr/local/bin/perl -MExtUtils::Command -e mkpath runtime/parrot/languages/JSON
./parrot-nqp --target=pir compilers/data_json/JSON.nqp > runtime/parrot/languages/JSON/JSON.pir
./parrot_nci_thunk_gen --dynext --no-warn-dups \
--output=src/extra_nci_thunks.c <src/nci/extra_thunks.nci
/usr/bin/gcc -I./include -I./include/pmc -pipe -fno-common -Wno-long-double  -I/sw/include -I/opt/local/include -DHASATTRIBUTE_CONST  -DHASATTRIBUTE_DEPRECATED  -DHASATTRIBUTE_MALLOC  -DHASATTRIBUTE_NONNULL  -DHASATTRIBUTE_NORETURN  -DHASATTRIBUTE_PURE  -DHASATTRIBUTE_UNUSED  -DHASATTRIBUTE_WARN_UNUSED_RESULT  -DHAS_GETTEXT  -g    -falign-functions=16 -funit-at-a-time -W -Wall -Waggregate-return -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wextra -Wformat -Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimplicit -Wimport -Winit-self -Winline -Winvalid-pch -Wmissing-braces -Wmissing-field-initializers -Wno-missing-format-attribute -Wmissing-include-dirs -Wmultichar -Wpacked -Wparentheses -Wpointer-arith -Wpointer-sign -Wreturn-type -Wsequence-point -Wsign-compare -Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default -Wtrigraphs -Wundef -Wno-unused -Wunknown-pragmas -Wvariadic-macros -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wnonnull -Wold-style-definition -fvisibility=hidden   -Isrc -o src/extra_nci_thunks.o -c src/extra_nci_thunks.c
/usr/bin/g++ -undefined dynamic_lookup -bundle -L/usr/local/lib -L/opt/local/lib -L"/Users/jimk/gitwork/parrot/blib/lib" -L/sw/lib  \
    -o runtime/parrot/dynext/extra_nci_thunks.bundle src/extra_nci_thunks.o \
    -L"/Users/jimk/gitwork/parrot/blib/lib" -lparrot  -lm -lgmp -lreadline -lintl
./parrot-nqp --target=pir --output=compilers/opsc/gen/Ops/Compiler.pir  compilers/opsc/src/Ops/Compiler.pm
./parrot-nqp --target=pir --output=compilers/opsc/gen/Ops/Compiler/Actions.pir compilers/opsc/src/Ops/Compiler/Actions.pm
./parrot-nqp --target=pir --output=compilers/opsc/gen/Ops/Compiler/Grammar.pir compilers/opsc/src/Ops/Compiler/Grammar.pm
src/gc/gc_gms.c:1228: failed assertion '!PObj_on_free_list_TEST(pmc) || !"Resurrecting of dead objects is not supported"'
make: *** [compilers/opsc/gen/Ops/Compiler/Grammar.pir] Abort trap

Surprisingly, if at this point I simply said make, the build resumed and completed successfully. While I did not have time to do a full make test, I was able to get PASS on important components thereof, such as make op_tests and make pmc_tests.

At cotto's suggestion, I re-ran the failing command several consecutive times:

[parrot] 511 $ export DYLD_LIBRARY_PATH=/Users/jimk/gitwork/parrot/blib/lib
[parrot] 512 $ ./parrot-nqp --target=pir --output=compilers/opsc/gen/Ops/Compiler/Grammar.pir compilers/opsc/src/Ops/Compiler/Grammar.pm
src/gc/gc_gms.c:1228: failed assertion '!PObj_on_free_list_TEST(pmc) || !"Resurrecting of dead objects is not supported"'
Abort trap
[parrot] 513 $ ./parrot-nqp --target=pir --output=compilers/opsc/gen/Ops/Compiler/Grammar.pir compilers/opsc/src/Ops/Compiler/Grammar.pm
src/gc/gc_gms.c:1228: failed assertion '!PObj_on_free_list_TEST(pmc) || !"Resurrecting of dead objects is not supported"'
Abort trap
[parrot] 513 $ ./parrot-nqp --target=pir --output=compilers/opsc/gen/Ops/Compiler/Grammar.pir compilers/opsc/src/Ops/Compiler/Grammar.pm
src/gc/gc_gms.c:1228: failed assertion '!PObj_on_free_list_TEST(pmc) || !"Resurrecting of dead objects is not supported"'
Abort trap

But, once again, if I invoked make at this point, the build would continue and complete.

My last previous successful test on this platform was on Feb 28 at commit 9e03d59. On March 02 I did repeated successful testing of the infnan2 branch on this platform, but I did not test master once plobsing merged that branch in. Last night, I tried building master at that merge point and I got the same build failure reported above. I therefore infer that the failure began sometime after 9e03d59 but before the infnan2 merge.

I should note that Parrot had been building successfully on this platform recently, in particular after the gc_ms2 merge.

Change History

  Changed 11 years ago by jkeenan

  • cc cotto, bacek, plobsing added

This was very strange.

My bisection indicated that the commit at which this error began to appear was cc69a53028 -- the March 02 merge of infnan2 into master! Needless to say this was puzzling, since on that day I repeatedly built and successfully tested the infnan2 branch on both Darwin and Linux, using various configurations (e.g., with and without --optimize). Moreover, before we merged recent GC-oriented branches, I tested those branches on both machines -- again, with surprisingly pleasant results.

I reviewed the code in cc69a53028 as well as the area in src/gc/gc_gms.c around line 1228 and couldn't see any obvious connection.

I was afraid that this would be an unsolvable problem, dooming Parrot on this platform. Having nothing better to do (and having spent multiple hours on this already), I did git pull to get back to HEAD, configured -- and then built and tested without a hitch!

I have no explanation for any of this. cc-ing some people who might.

Thank you very much.

kid51

  Changed 11 years ago by bacek

Hello.

I hope it should be fixed by ded4b56fbf and 652c6b5dbe

-- Bacek.

  Changed 11 years ago by jkeenan

Following discussion with cotto, plobsing and bacek on #parrot yesterday I reverted to cc69a53028 and attempted to use the debugger. I rebuilt and reproduced the error.

./parrot-nqp --target=pir --output=compilers/opsc/gen/Ops/Compiler/Grammar.pir 
  compilers/opsc/src/Ops/Compiler/Grammar.pm
src/gc/gc_gms.c:1228: failed assertion '!PObj_on_free_list_TEST(pmc) || 
  !"Resurrecting of dead objects is not supported"'
make: *** [compilers/opsc/gen/Ops/Compiler/Grammar.pir] Abort trap

Because of the fix applied in TT #1890, to debug this on Darwin I have to make the DYLD_LIBRARY_PATH value available and I have to place a copy of libparrot in /usr/local/lib/. $ echo $DYLD_LIBRARY_PATH /Users/jimk/gitwork/parrot/blib/lib $ cp blib/lib/libparrot.3.1.0.dylib /usr/local/lib }}} Only now can I successfully run gdb:

$ gdb --args ./parrot-nqp --target=pir 
  --output=compilers/opsc/gen/Ops/Compiler/Grammar.pir 
  compilers/opsc/src/Ops/Compiler/Grammar.pm
GNU gdb 6.1-20040303 (Apple version gdb-437) (Sun Dec 25 08:31:29 GMT 2005)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "powerpc-apple-darwin"...
    Reading symbols for shared libraries ......... done

(gdb) r
Starting program: /Users/jimk/gitwork/parrot/parrot-nqp --target=pir 
  --output=compilers/opsc/gen/Ops/Compiler/Grammar.pir 
  compilers/opsc/src/Ops/Compiler/Grammar.pm
Reading symbols for shared libraries .+.......++.+ done
src/call/context.c:637: failed assertion 
  'Parrot_pcc_get_regs_used(interp, ctx, REGNO_INT) > idx'

Program received signal SIGABRT, Aborted.
0x90047dac in kill ()
(gdb) bt 10
#0  0x90047dac in kill ()
#1  0x9012d7b4 in abort ()
#2  0x01081eb8 in Parrot_confess (cond=0x127f94c 
    "Parrot_pcc_get_regs_used(interp, ctx, REGNO_INT) > idx", 
    file=0x127f8ac "src/call/context.c", line=637) at src/exceptions.c:562
#3  0x010b3ce4 in Parrot_pcc_get_INTVAL_reg (interp=0x500c10, ctx=0x211a694, 
    idx=0) at src/call/context.c:637
#4  0x01035e30 in Parrot_isa_i_p_pc (cur_opcode=0x4ec120, interp=0x500c10) 
    at src/ops/core_ops.c:19912
#5  0x010f3c08 in runops_fast_core (interp=0x500c10, runcore_unused=0x507610, 
    pc=0x4ec120) at src/runcore/cores.c:513
#6  0x010f2eac in runops_int (interp=0x500c10, offset=0) at 
    src/runcore/main.c:218
#7  0x010b2814 in runops (interp=0x500c10, offs=0) at src/call/ops.c:126
#8  0x010aad08 in Parrot_pcc_invoke_from_sig_object (interp=0x500c10,
    sub_obj=0x2114344, call_object=0x211a694) at src/call/pcc.c:323
#9  0x0108428c in Parrot_ext_call (interp=0x500c10, sub_pmc=0x2114344,
    signature=0x127fe58 "->P") at src/extend.c:321
(More stack frames follow...)

follow-up: ↓ 5   Changed 11 years ago by jkeenan

  • owner set to jkeenan
  • status changed from new to assigned

On Darwin/PPC, I am building and PASSing make test as of c114262d9860. I'll hold the ticket open for a few days for any further comments.

Thank you very much.

kid51

in reply to: ↑ 4   Changed 11 years ago by jkeenan

  • status changed from assigned to closed
  • resolution set to fixed

Replying to jkeenan:

On Darwin/PPC, I am building and PASSing make test as of c114262d9860. I'll hold the ticket open for a few days for any further comments.

No complaints heard. Thanks to bacek++ for investigating this. Closing ticket.

kid51

Note: See TracTickets for help on using tickets.