Ticket #479 (closed bug: wontfix)

Opened 13 years ago

Last modified 12 years ago

Segfaulting in PGE;Perl6Grammar;Compiler;compile (t/compilers/pge/pge_examples.t)

Reported by: wiml Owned by:
Priority: normal Milestone:
Component: core Version: trunk
Severity: fatal Keywords: ppc jit
Cc: Language:
Patch status: Platform: netbsd

Description

"make testj" has one segfaulting test on netbsd-ppc. I've narrowed it down to the invocation of p6grammar.'compile' in t/compilers/pge/pge_examples.t. I'm attaching a transcript of a debugger session, but the highlights are:

(gdb) run -D4 -R jit ./poo.pir
Starting program: /home/wiml/perl6/partest/parrot -D4 -R jit ./poo.pir

Program received signal SIGSEGV, Segmentation fault.
0x019ebfdc in Parrot_set_p_i (cur_opcode=0x27098ec, interp=0x1fd10e0)
    at src/ops/set.ops:176
176       VTABLE_set_integer_native(interp, $1, $2);
(gdb) bt  
#0  0x019ebfdc in Parrot_set_p_i (cur_opcode=0x27098ec, interp=0x1fd10e0)
    at src/ops/set.ops:176
#1  0x02dde5c8 in ?? ()
#2  0x01a2e000 in runops_jit (interp=Cannot access memory at address 0x18
) at src/interpreter.c:751
#3  0x01a2d964 in runops_int (interp=0x1e0a000, offset=0)
    at src/interpreter.c:980
...
(gdb) p PDB_backtrace(0x1e0a000)
current instr.: 'parrot;PGE;Perl6Grammar;' pc -1 ((unknown file):-1)
called from Sub 'parrot;PGE;Perl6Grammar;statement' pc 0 (EVAL_5:2)
called from Sub 'parrot;PGE;Perl6Grammar;Compiler;compile' pc 152 (runtime/parrot/library/PGE/Perl6Grammar.pir:135)
called from Sub 'example' pc 0 (./poo.pir:5)
$1 = void

My parrot checkout has some modifications that were necessary to get it to build (see my previous tickets) but I think those changes should only be affecting the exec_save functionality, not jit. The non-JIT runcores work fine.

Attachments

gdb-session.txt Download (4.3 KB) - added by wiml 13 years ago.
transcript of the crash
parrot-configuration Download (2.2 KB) - added by wiml 13 years ago.
my parrot configuration

Change History

Changed 13 years ago by wiml

transcript of the crash

Changed 13 years ago by wiml

my parrot configuration

follow-up: ↓ 2   Changed 13 years ago by jkeenan

I get a test failure in t/compilers/pge/pge_examples.t as well. Mine comes during the -j part of make fulltest.

/usr/local/bin/perl t/harness --gc-debug --running-make-test -j --runcore-tests
[snip]
t/compilers/pge/pge_examples...........
#   Failed test 'parse FASTA'#   at t/compilers/pge/pge_examples.t line 55.
# Exited with error code: [SIGNAL 11]
# Received:
# 
# Expected:
# >gi|5524211|gb|AAD44166.1| cytochrome b [Elephas maximus maximus]
# LCLYTHIGRNIYYGSYLYSETWNTGIMLLLITMATAFMGYVLPWGQMSFWGATVITNLFSAIPYIGTNLV
# EWIWGGFSVDKATLNRFFAFHFILPFTMVALAGVHLTFLHETGSNNPLGLTSDSDKIPFHPYYTIKDFLG
# LLILILLLLLLALLSPDMLGDPDNHMPADPLNTPLHIKPEWYFLFAYAILRSVPNKLGGVLALFLSIVIL
# GLMPFLHTSKHRSMMLRPLSQALFWTLTMDLLTLTWIGSQPVEYPYTIIGQMASILYFSIILAFLPIAGX
# IENY
# >poly_a teasing the parser with DNA
# aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
# 
# Looks like you failed 1 test of 2.
 Dubious, test returned 1 (wstat 256, 0x100) 
 Failed 1/2 subtests

This is on Darwin-PPC in the same configuration in which I have built Parrot for > 2 years.

in reply to: ↑ 1   Changed 13 years ago by wiml

Replying to jkeenan:

I get a test failure in t/compilers/pge/pge_examples.t as well. Mine comes during the -j part of make fulltest.

That looks like the same output I was getting (I trimmed pge_examples.t to discover that it crashed when compiling the FASTA grammar, but I originally noticed it in make testj). So I guess this is probably general to ppc, not specific to netbsd.

  Changed 13 years ago by wiml

I took a stab at narrowing down the revision where this bug originated, but it seems that that particular test has been a problem on ppc for a while. Before revision 32222, it simply hangs (apparently indefinitely) rather than crashing:

  • r37660 (trunk) - segfaults in FASTA test in pge_examples.t
  • r36845 (release 0.9.1) - doesn't build
  • r35856 (release 0.9.0) - segfaults in FASTA test in pge_examples.t
  • r34006 (release 0.8.2) - segfaults in FASTA test
  • r32858 (release 0.8.1) - segfaults in FASTA test
  • r32400 - segfaults in FASTA test
  • r32250 - segfaults in FASTA test
  • r32230 - segfaults in FASTA test
  • r32225 - segfaults in FASTA test
  • r32223 - segfaults in FASTA test
  • r32222 - segfaults in FASTA test
  • r32221 - hangs in pge_examples.t
  • r32218 - hangs in pge_examples.t
  • r32212 - hangs in pge_examples.t
  • r32200 - hangs in pge_examples.t (?)
  • r32199 - hangs in pge_examples.t
  • r32198 - hangs in pge_examples.t
  • r32196 - hangs in pge_examples.t
  • r32192 - hangs in pge_examples.t
  • r32185 - hangs in pge_examples.t
  • r32175 - hangs in pge_examples.t
  • r32150 - hangs indefinitely in pge_examples.t
  • r32092 (release 0.8.0) - hangs indefinitely in pge_examples.t

On the other hand, very few other tests failed in these revisions, which is a nice indication of the code's stability. (I was doing a 'make testj' to test the JIT behavior specifically.)

  Changed 12 years ago by coke

  • status changed from new to closed
  • resolution set to wontfix
  • severity changed from high to fatal

The current JIT core is deprecated.

  Changed 12 years ago by jkeenan

I now get this on Darwin/PPC:

$ perl t/harness --gc-debug -j t/compilers/pge/pge_examples.t
t/compilers/pge/pge_examples.t .. 2/2 
ok 2 - parse FASTA # TODO Darwin segfault -- TT #479
t/compilers/pge/pge_examples.t .. ok   
All tests successful.

Test Summary Report
-------------------
t/compilers/pge/pge_examples.t (Wstat: 0 Tests: 2 Failed: 0)
  TODO passed:   2
Files=1, Tests=2,  9 wallclock secs ( 0.07 usr  0.04 sys +  3.43 cusr  0.52 csys =  4.06 CPU)
Result: PASS

Is this just an artifact of our ripping out JIT code?

If not, if we can get a report on NetBSD/PPC (as per original post), then we can un-TODO the test and close the ticket.

(errmm, I see Coke already closed the ticket as a wontfix.)

Thank you very much.
kid51

Note: See TracTickets for help on using tickets.