Ticket #464 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

Multiple failures on OpenBSD 4.4 /i386

Reported by: doughera Owned by:
Priority: normal Milestone:
Component: none Version:
Severity: fatal Keywords:
Cc: Language:
Patch status: Platform: openbsd

Description

I had a chance to try a build on OpenBSD 4.4 / i386 and the build stops with

./parrot -o runtime/parrot/library/CGI/QueryHash.pbcr untime/parrot/library/CGI/QueryHash.pir
Null PMC access in get_pmc_keyed_str()
*** Error code 1

The problem appears to be quite generic and widespread. Running the core tests yields:

perl t/harness --core-tests

Failed 163/271 test scripts, 39.85% okay. 641/3167 subtests failed, 79.76% okay.

A common theme appears to be the various find_* opcodes. For example, t/op/calling_11.pir looks like this:

.sub main :main
    $P0 = new 'String'
    $P0 = "hello\n"
    find_name $P1, "foo"
    # set_args and invoke must be adjacent
    set_args "0", $P0
    invokecc $P1
.end
.sub foo
    get_params "0", $P0
    print $P0
.end

Calling parrot -t t/op/calling_11.pir results in

     0 new P0, "String"               P0=PMCNULL 
     3 set P0, "hello\n"              P0=String=PMC(0x7d9e9c68 Str:"") 
     6 find_name P1, "foo"            P1=PMCNULL 
     9 set_args PC9 (1), P0           PC9=FixedIntegerArray=PMC(0x890fbc90) P0=String=PMC(0x7d9e9c68 Str:"hello\n")
    12 invokecc P1                    P1=PMCNULL
Null PMC access in invoke()
current instr.: 'main' pc 12 (t/op/calling_11.pir:7)
FileHandle objects (like stdout and stderr)are about to be closed, so clearing trace flags.

I have labeled this as "fatal" because it's fatal on this particular platform, but left the priority at "normal" because it's apparently only this particular platform.

I have attached the 'myconfig' file as well as the full output of the core-test run.

Attachments

myconfig Download (1.6 KB) - added by doughera 6 years ago.
coretest.log.gz Download (54.2 KB) - added by doughera 6 years ago.
Compressed output of perl t/harness --core-test

Change History

Changed 6 years ago by doughera

Changed 6 years ago by doughera

Compressed output of perl t/harness --core-test

  Changed 6 years ago by heidnes

I'm seeing a similar build problem on NetBSD/macppc 5.0_RC3, when the porting fixes from https://trac.parrot.org/parrot/ticket/512 have been applied. Specifically, my build dies at:

cc -o ./parrot  src/main.o src/parrot_config.o  -L/usr/pkgsrc/lang/parrot/work/parrot-1.0.0/blib/lib -lparrot -Wl,-R/usr/pkg/lib  -lm -L/usr/pkg/lib  -licuuc -licudata  -lm -lm -lcrypt  -lintl -Wl,-R/usr/pkg/lib    -pthread -Wl,-E  -Wl,-R/usr/pkg/lib/perl5/5.10.0/powerpc-netbsd-thread-multi/CORE
./parrot -o runtime/parrot/include/parrotlib.pbc runtime/parrot/library/parrotlib.pir
Null PMC access in get_pmc_keyed_str()
*** Error code 1

The strange thing is that this builds cleanly on NetBSD/macppc 4.0.

The gcc versions are not terribly different: 4.1.2 with a few local fixes on 4.0 and 4.1.3 on 5.0_RC3.

Testing with "perl t/harness --core-tests" results in

12 tests and 49 subtests skipped.
Failed 168/271 test scripts. 798/3156 subtests failed.
Files=271, Tests=3156, 352 wallclock secs (201.18 cusr + 80.74 csys = 281.92 CPU)
Failed 168/271 test programs. 798/3156 subtests failed.

on 5.0_RC3, but on 4.0 it gives a clean bill of health with

All tests successful, 10 tests and 577 subtests skipped.
Files=271, Tests=8638, 847 wallclock secs (347.51 cusr + 89.05 csys = 436.56 CPU)

I have my parrot run under gdb, stopped in the function which prints the above message, but since I don't in general know my way around in the innards of parrot, I wonder "what next"?

(gdb) where
#0  Parrot_Null_get_pmc_keyed_str (interp=0xeed03040, pmc=0xeedb3cb0, 
    key=0xeec19b08) at ./src/pmc/null.c:542
#1  0x01a3a148 in internal_ns_keyed_str (interp=0xeed03040, 
    base_ns=0xeedb3cb0, key=0xeec19b08, flags=1) at src/global.c:185
#2  0x01a3a2a8 in Parrot_make_namespace_keyed_str (interp=0xeed03040, 
    base_ns=0xeedb3cb0, str_key=0xeec19b08) at src/global.c:354
#3  0x01a3ac10 in get_namespace_pmc (interp=dwarf2_read_address: Corrupted DWARF expression.
) at src/global.c:788
#4  0x01a3adb4 in Parrot_store_sub_in_namespace (interp=0xeed03040, 
    sub_pmc=0xeedfa130) at src/global.c:858
#5  0x019d82a0 in add_const_pmc_sub (interp=0xeed03040, r=0xeed5a5b0, offs=0, 
    end=109) at compilers/imcc/pbc.c:1473
#6  0x019d8798 in e_pbc_emit (interp=0xeed03040, param_unused=0x0, 
    unit=0xeec2e100, ins=0xeed62500) at compilers/imcc/pbc.c:2150
#7  0x019d100c in emit_flush (interp=0xeed03040, param=0x0, unit=0xeec2e100)
    at compilers/imcc/instructions.c:908
#8  0x01c777f0 in imc_compile_unit (interp=0xeed03040, unit=0xeec2e100)
    at compilers/imcc/imc.c:123
#9  0x01c77880 in imc_close_unit (interp=0xeed03040, unit=0xeec2e100)
    at compilers/imcc/imc.c:230
#10 0x01c69a14 in yyparse (yyscanner=0xeed60200, interp=0xeed03040)
    at compilers/imcc/imcc.y:919
#11 0x019ce7e4 in compile_to_bytecode (interp=0xeed03040, 
    sourcefile=0xffffe979 "runtime/parrot/library/parrotlib.pir", 
    output_file=0xffffe954 "runtime/parrot/include/parrotlib.pbc")
    at compilers/imcc/main.c:962
#12 0x019cef50 in imcc_run (interp=0xeed03040, 
    sourcefile=0xffffe979 "runtime/parrot/library/parrotlib.pir", argc=1, 
    argv=0xffffd810) at compilers/imcc/main.c:1060
#13 0x018bd428 in main (argc=1, argv=0xffffd810) at src/main.c:61
(gdb) 
(gdb) p base_ns
$15 = (PMC *) 0xeedb3cb0
(gdb) p *$
$16 = {cache = {_b = {_bufstart = 0xdeadbeef, _buflen = 3735928559}, _ptrs = {
      _struct_val = 0xdeadbeef, _pmc_val = 0xdeadbeef}, _i = {
      _int_val = -559038737, _int_val2 = -559038737}, 
    _num_val = -1.1885959257070704e+148, _string_val = 0xdeadbeef}, 
  flags = 4608, vtable = 0xeed0e400, data = 0x0, pmc_ext = 0x0}
(gdb) p $->vtable
$17 = (VTABLE *) 0xeed0e400
(gdb) p *$
$18 = {_namespace = 0xeedad4c8, base_type = 1, whoami = 0xeed6c548, 
  flags = 16, provides_str = 0xeed6c520, isa_hash = 0xeed5b0d0, 
  pmc_class = 0xeedb3cb0, mro = 0xeedad4e0, attribute_defs = 0x1d08f14 "", 
  ro_variant_vtable = 0x0, absolute = 0x1adb544 <Parrot_Null_absolute>, 
...
  get_pmc = 0x1ad9ad4 <Parrot_Null_get_pmc>, 
  get_pmc_keyed = 0x1ad9a84 <Parrot_Null_get_pmc_keyed>, 
  get_pmc_keyed_int = 0x1ad9a34 <Parrot_Null_get_pmc_keyed_int>, 
  get_pmc_keyed_str = 0x1ad99e4 <Parrot_Null_get_pmc_keyed_str>, 
  get_pointer = 0x1ad6344 <Parrot_Null_get_pointer>, 
...
(gdb) 

Best regards,

- Håvard

  Changed 6 years ago by Infinoid

Hi guys,

Please retry with the latest SVN. It sounds from today's IRC discussion like we've made some changes (post-1.0.0) which should have fixed this.

in reply to: ↑ description   Changed 6 years ago by jkeenan

Replying to doughera:

It would be very helpful if any of the posters to this ticket (or anyone else, for that matter) could contribute regular Smolder reports for OpenBSD.

For some definition of regular ...

kid51

  Changed 6 years ago by doughera

For OpenBSD/386, the problem seems to be fixed as of r38227. Thanks for whatever ultimately fixed it. I'll leave the ticked open pending results from NetBSD/macpcc.

  Changed 6 years ago by Infinoid

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

Thanks, Andy. NetBSD/macppc works, verified yesterday on IRC by he++ ("heidnes" here on trac), which is why I pinged you about it.

For the curious, I think it was the src/hll.c hunk of r37669 that did it.

Thanks, closing ticket.

Note: See TracTickets for help on using tickets.