Ticket #1368 (closed bug: fixed)

Opened 12 years ago

Last modified 12 years ago

some failures with test 31 of t/op/exceptions.t

Reported by: mikehh Owned by:
Priority: normal Milestone:
Component: testing Version: trunk
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

at parrot r42945 I ran the tests up to fulltest on Ubuntu 9.10 amd64
I re-ran the tests at r42958 with the same results.

I built with both gcc/g++ with and without --optimize

in all cases pre/post-config tests PASS

g++ with --optimize
smoke #30718 PASS (and #30752)
fulltest FAILs testr - t/op/exceptions.t - Failed test: 31
all other tests PASS

gcc with --optimize
smoke #30716 (and #30754) FAILs - t/op/exceptions.t - Failed test: 31
fulltest FAILs in all cores EXCEPT testr - all other tests PASS

g++ without --optimize
smoke #30725 (and #30756) PASS
fulltest FAILs testr - t/op/exceptions.t - Failed test: 31
all other tests PASS

gcc without --optimize
smoke #30728 (and #30753) PASS
fulltest PASS

t/op/exceptions.t failures:

g++ with --optimize - testr:

#   Failed test 'Resumable exceptions from a different context'
#   at t/op/exceptions.t line 648.
# Exited with error code: 139
# Received:
# ok 1
# in the handler
# ok 2
# No exception handler and no message
# current instr.: 'foo' pc 47 (/home/mhb/parrot/t/op/exceptions_31.pir:21)
# Segmentation fault
#
# Expected:
# ok 1
# in the handler
# ok 2
# in the handler
# ok 3
# ok 4
#
# Looks like you failed 1 test of 31.

gcc with --optimize (NOT testr) as far as I can see the result is the same for all failures:

#   Failed test 'Resumable exceptions from a different context'
#   at t/op/exceptions.t line 648.
# Exited with error code: 139
# Received:
# ok 1
# in the handler
# ok 2
# in the handler
# ok 3
# Segmentation fault
#
# Expected:
# ok 1
# in the handler
# ok 2
# in the handler
# ok 3
# ok 4
#
# Looks like you failed 1 test of 31.

g++ without --optimize in testr:

#   Failed test 'Resumable exceptions from a different context'
#   at t/op/exceptions.t line 648.
# Exited with error code: 134
# Received:
# ok 1
# in the handler
# ok 2
# No exception handler and no message
# current instr.: 'foo' pc 47 (/home/mhb/t.gn.parrot/t/op/exceptions_31.pir:21)
# src/sub.c:360: failed assertion 'ctx'
# Backtrace - Obtained 18 stack frames (max trace depth is 32).
# /home/mhb/t.gn.parrot/blib/lib/libparrot.so.1.8.0 [0x2b47ff9dec26]
# /home/mhb/t.gn.parrot/blib/lib/libparrot.so.1.8.0(Parrot_confess+0x8b) [0x2b47ff9debfb]
# /home/mhb/t.gn.parrot/blib/lib/libparrot.so.1.8.0(Parrot_Context_infostr+0x4f) [0x2b47ffa6ed7f]
# /home/mhb/t.gn.parrot/blib/lib/libparrot.so.1.8.0 [0x2b47ff9d7a1d]
# /home/mhb/t.gn.parrot/blib/lib/libparrot.so.1.8.0 [0x2b47ff9ddd51]
# /home/mhb/t.gn.parrot/blib/lib/libparrot.so.1.8.0(Parrot_ex_throw_from_op+0x209) [0x2b47ff9de069]
# /home/mhb/t.gn.parrot/blib/lib/libparrot.so.1.8.0 [0x2b47ff93f941]
# /home/mhb/t.gn.parrot/blib/lib/libparrot.so.1.8.0 [0x2b47ffa66465]
# /home/mhb/t.gn.parrot/blib/lib/libparrot.so.1.8.0 [0x2b47ffa64a26]
# /home/mhb/t.gn.parrot/blib/lib/libparrot.so.1.8.0 [0x2b47ffa0452e]
# /home/mhb/t.gn.parrot/blib/lib/libparrot.so.1.8.0(Parrot_pcc_invoke_from_sig_object+0x21a) [0x2b47ff9fa16a]
# /home/mhb/t.gn.parrot/blib/lib/libparrot.so.1.8.0(Parrot_pcc_invoke_sub_from_c_args+0x16f) [0x2b47ff9f994f]
# /home/mhb/t.gn.parrot/blib/lib/libparrot.so.1.8.0(Parrot_runcode+0x185) [0x2b47ff9da595]
# /home/mhb/t.gn.parrot/blib/lib/libparrot.so.1.8.0 [0x2b47ffc231ba]
# /home/mhb/t.gn.parrot/blib/lib/libparrot.so.1.8.0(imcc_run+0x3e6) [0x2b47ffc23e76]
# ./parrot [0x400ce0]
# /lib/libc.so.6(__libc_start_main+0xfd) [0x2b4802a91abd]
# ./parrot [0x400b69]
# Aborted
#
# Expected:
# ok 1
# in the handler
# ok 2
# in the handler
# ok 3
# ok 4
#
# Looks like you failed 1 test of 31.

I am going to run the tests on Ubuntu 9.10 i386 and will report the results.

Change History

Changed 12 years ago by mikehh

I performed tests on Ubuntu 9.10 i386 and the test in question passes on all variants - gcc/g++ with or without --optimize. (in fact all tests PASS at r42959 on that platform).

It appears that the problem here is specific to the amd64 platform - gcc with --optimize with all cores except testr and g++ in testr; gcc without --optimize passes the test.

Changed 12 years ago by mikehh

I get the same results at r42986.

with both Ubuntu 9.04 amd64 and Ubuntu 9.10 amd64 (gcc/g++ 4.3.4 and 4.4.1 respectively)

t/op/exceptions.t - test31
- fails in testr only with g++ build, with or without --optimize
- fails in smoke and all cores EXCEPT testr with gcc build with --optimize
- passes all with gcc without --optimize

All tests PASS with all variants on Ubuntu 9.10 i386

Changed 12 years ago by mikehh

I bisected using gcc with --optimize. on Ubuntu 9.10 amd64

at r42923

  • all tests PASS (I did a full test run at that revision with no failures)

at r42924

  • make test fails t/op/exceptions.t fails test 31 with a Segmentation fault as above
  • make fulltest fails the test in all cores EXCEPT testr
    • all other tests PASS

I have a patch that I can apply to TODO the test for the different variants if it has not been fixed before the release

Looking at  http://smolder.plusthree.com/app/public_projects/smoke_reports/8 the only other reports on the amd64 Architecture (post r42923) available (other than mine) was on platform MSWIN32 - using gcc 4.5 with --optimize, (most recent #30918), that passes the test (fails others) and 2 on platform freebsd that does not use --optimize.

Changed 12 years ago by mikehh

running the t/op/exceptions_31.pir on the gcc --optimize build at r43018 gives the following result:

mhb@mhb-desktop:~/t.parrot$ ./parrot -t t/op/exceptions_31.pir
     0 push_eh 17
     2 set_args PC6
     4 set P0, PC16                                        P0=PMCNULL PC16=Sub=PMC(0xeaeb78 pc:35)
     7 get_results PC6
     9 invokecc P0                                        P0=Sub=PMC(0xeaeb78 pc:35)
    35 say "ok 1"
ok 1
    37 new P0, "Exception"                                        P0=PMCNULL
    40 throw P0                                        P0=Exception=PMC(0xeaeda8)
    17 get_results PC4 (1), P1                                        PC4=FixedIntegerArray=PMC(0xef0ca0) P1=PMCNULL
    20 set P2, P1["resume"]                                        P2=PMCNULL P1=Exception=PMC(0xeaeda8)
    24 say "in the handler"
in the handler
    26 set_args PC6
    28 get_results PC6
    30 invokecc P2                                        P2=RetContinuation=PMC(0xeaedd0)
    42 say "ok 2"
ok 2
    44 new P0, "Exception"                                        P0=Exception=PMC(0xeaeda8)
    47 throw P0                                        P0=Exception=PMC(0xeaedd0)
    17 get_results PC4 (1), P1                                        PC4=FixedIntegerArray=PMC(0xef0ca0) P1=Exception=PMC(0xeaeda8)
       GC mark
       GC collect
    20 set P2, P1["resume"]                                        P2=Exception=PMC(0xeaedd0) P1=Exception=PMC(0xeaedd0)
    24 say "in the handler"
in the handler
    26 set_args PC6
    28 get_results PC6
    30 invokecc P2                                        P2=RetContinuation=PMC(0xeaefb0)
    49 say "ok 3"
ok 3
    51 set_returns PC6
Segmentation fault

Changed 12 years ago by mikehh

and running the t/op/exceptions_31.pbc (generated by testr) at the same revision (r43018) again from the gcc with --optimize build (Ubuntu 9.10 amd64):

mhb@mhb-desktop:~/t.parrot$ ./parrot -t t/op/exceptions_31.pbc
     0 push_eh 17
     2 set_args PC6
     4 set P0, PC16                                        P0=PMCNULL PC16=Sub=PMC(0x8fdf38 pc:35)
     7 get_results PC6
     9 invokecc P0                                        P0=Sub=PMC(0x8fdf38 pc:35)
    35 say "ok 1"
       GC mark
       GC collect
ok 1
    37 new P0, "Exception"                                        P0=PMCNULL
    40 throw P0                                        P0=Exception=PMC(0x8fdee8)
    17 get_results PC4 (1), P1                                        PC4=FixedIntegerArray=PMC(0x8fdce0) P1=PMCNULL
    20 set P2, P1["resume"]                                        P2=PMCNULL P1=Exception=PMC(0x8fdee8)
    24 say "in the handler"
in the handler
    26 set_args PC6
    28 get_results PC6
    30 invokecc P2                                        P2=RetContinuation=PMC(0x8fdec0)
    42 say "ok 2"
ok 2
    44 new P0, "Exception"                                        P0=Exception=PMC(0x8fdee8)
    47 throw P0                                        P0=Exception=PMC(0x8fdec0)
    17 get_results PC4 (1), P1                                        PC4=FixedIntegerArray=PMC(0x8fdce0) P1=Exception=PMC(0x8fdee8)
    20 set P2, P1["resume"]                                        P2=Exception=PMC(0x8fdec0) P1=Exception=PMC(0x8fdec0)
    24 say "in the handler"
in the handler
    26 set_args PC6
    28 get_results PC6
    30 invokecc P2                                        P2=RetContinuation=PMC(0x8fdc68)
    49 say "ok 3"
ok 3
    51 set_returns PC6
    53 returncc
    11 pop_eh
    12 say "ok 4"
ok 4
    14 set_returns PC6
    16 returncc
FileHandle objects (like stdout and stderr)are about to be closed, so clearing trace flags.

note: the Segmentation fault in the .pir code occurs after the 51 set_returns PC6

running the same on the g++ (with --optimize) build at the same revision (r43018):

mhb@mhb-desktop:~/parrot$ ./parrot -t t/op/exceptions_31.pir
     0 push_eh 17
     2 set_args PC6
     4 set P0, PC16                                        P0=PMCNULL PC16=Sub=PMC(0xb8e970 pc:35)
     7 get_results PC6
     9 invokecc P0                                        P0=Sub=PMC(0xb8e970 pc:35)
    35 say "ok 1"
ok 1
    37 new P0, "Exception"                                        P0=PMCNULL
    40 throw P0                                        P0=Exception=PMC(0xb8eba0)
    17 get_results PC4 (1), P1                                        PC4=FixedIntegerArray=PMC(0xbd0ca0) P1=PMCNULL
    20 set P2, P1["resume"]                                        P2=PMCNULL P1=Exception=PMC(0xb8eba0)
    24 say "in the handler"
in the handler
    26 set_args PC6
    28 get_results PC6
    30 invokecc P2                                        P2=RetContinuation=PMC(0xb8ebc8)
    42 say "ok 2"
ok 2
    44 new P0, "Exception"                                        P0=Exception=PMC(0xb8eba0)
    47 throw P0                                        P0=Exception=PMC(0xb8ebc8)
    17 get_results PC4 (1), P1                                        PC4=FixedIntegerArray=PMC(0xbd0ca0) P1=Exception=PMC(0xb8eba0)
    20 set P2, P1["resume"]                                        P2=Exception=PMC(0xb8ebc8) P1=Exception=PMC(0xb8ebc8)
    24 say "in the handler"
in the handler
    26 set_args PC6
    28 get_results PC6
    30 invokecc P2                                        P2=RetContinuation=PMC(0xb8eda8)
    49 say "ok 3"
ok 3
    51 set_returns PC6
    53 returncc
    11 pop_eh
    12 say "ok 4"
ok 4
    14 set_returns PC6
    16 returncc
FileHandle objects (like stdout and stderr)are about to be closed, so clearing trace flags.
mhb@mhb-desktop:~/parrot$ ./parrot -t t/op/exceptions_31.pbc
     0 push_eh 17
     2 set_args PC6
     4 set P0, PC16                                        P0=PMCNULL PC16=Sub=PMC(0x2542d30 pc:35)
     7 get_results PC6
     9 invokecc P0                                        P0=Sub=PMC(0x2542d30 pc:35)
    35 say "ok 1"
ok 1
    37 new P0, "Exception"                                        P0=PMCNULL
    40 throw P0                                        P0=Exception=PMC(0x2542f60)
    17 get_results PC4 (1), P1                                        PC4=FixedIntegerArray=PMC(0x2542ad8) P1=PMCNULL
    20 set P2, P1["resume"]                                        P2=PMCNULL P1=Exception=PMC(0x2542f60)
    24 say "in the handler"
in the handler
    26 set_args PC6
    28 get_results PC6
       GC mark
       GC collect
    30 invokecc P2                                        P2=RetContinuation=PMC(0x2542f88)
    42 say "ok 2"
ok 2
Segmentation fault

I get exactly the same results for the g++ (no --optimize) build (r43014)

and also note that the Segmentation fault occurs in a different place with the g++ code and with the .pbc not the .pir and it occurs both with and without --optimize.

Changed 12 years ago by mikehh

I did a partial reversion of r42924 at r43033

--- trunk/src/ops/pmc.ops       Mon Dec 14 07:00:48 2009        (r43032)
+++ trunk/src/ops/pmc.ops       Mon Dec 14 10:12:35 2009        (r43033)
@@ -51,9 +51,7 @@

 op new(out PMC, in STR) {
    STRING * const name   = $2;
-    PMC    * const _class = Parrot_pcc_get_HLL(interp, CURRENT_CONTEXT(interp))
-                          ? Parrot_oo_get_class_str(interp, name)
-                          : PMCNULL;
+    PMC    * const _class = Parrot_oo_get_class_str(interp, name);

    if (!PMC_IS_NULL(_class))
        $1 = VTABLE_instantiate(interp, _class, PMCNULL);
@@ -71,9 +69,7 @@

 op new(out PMC, in STR, in PMC) {
    STRING * const name   = $2;
-    PMC    * const _class = Parrot_pcc_get_HLL(interp, CURRENT_CONTEXT(interp))
-                          ? Parrot_oo_get_class_str(interp, name)
-                          : PMCNULL;
+    PMC    * const _class = Parrot_oo_get_class_str(interp, name);

    if (!PMC_IS_NULL(_class))
        $1 = VTABLE_instantiate(interp, _class, $3);
_______________________________________________

this gets the test to pass with all varaints

chromatic++ claims that the initial revision improved performance however, so I will investigate further after the 1.9.0 release. The problem appears to be in Parrot_pcc_get_HLL

Changed 12 years ago by mikehh

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

I restored the partial reversion above at r43211

The test passes now in Ubuntu 9.10 amd64 (gcc with --optimize) and (g++ with --optimize) after the context_unify3_simple branch merge

I am thus closing the ticket

Changed 12 years ago by jkeenan

  • status changed from closed to reopened
  • resolution fixed deleted

Changed 12 years ago by jkeenan

Reopening ticket. The reversion at r43211 is the cause of the failure of t/compilers/pge/pge_examples.t when run through the harness with --gc-debug (Linux/i386) reported in TT #1393.

Changed 12 years ago by mikehh

This ticket seems to be stale - I have not come across any problems related to it for quite a while.

I am therefor going to close it in a day or so unless there any objections.

Cheers,

Michael (mikehh)

Changed 12 years ago by mikehh

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

Closing the ticket

Note: See TracTickets for help on using tickets.