#1142: test 12 of t/pmc/eval.t fails in testr (passes in other runcores)
---------------------+------------------------------------------------------
 Reporter:  mikehh   |        Owner:          
     Type:  bug      |       Status:  reopened
 Priority:  normal   |    Milestone:          
Component:  testing  |      Version:  trunk   
 Severity:  medium   |   Resolution:          
 Keywords:           |         Lang:          
    Patch:           |     Platform:          
---------------------+------------------------------------------------------
Changes (by plobsing):

  * status:  closed => reopened
  * resolution:  fixed =>


Comment:

 Replying to [ticket:1142 mikehh]:

 I encountered this error one too many times making changes that should
 have no direct effect on Eval PMC. After investigating, here's what I'm
 fairly sure is happening:

  * Thawing an Eval PMC creates a new PackFile to put code into. Having
 more than one packfile is not something that happens frequently in parrot
 because most operations append to interp.initial_pf. (see
 compile_or_load_file() and Packfile_append_pbc() in src/packfile.c)
  * Constant segment PMCs are not thawed as constants because this leads to
 bugs with constant PMCs pointing to non-constant PMCs. (see
 PackFile_Constant_unpack_pmc() in src/packfile.c)
  * The new packfile is not interp.initial_pf and so its constant segment
 is not marked by GC. (see mark_const_subs() in src/packfile.c).
  * If the object sizes relative to the GC pool sizes, startup and thaw
 object allocations, and phase of the moon are just right; a GC sweep will
 occur after thawing the Eval PMC's packfile but before the Eval PMC's code
 has finished executing, leading to all constants in the Eval's packfile
 being collected prematurely (in this case there is only one: the
 FixedIntegerArray used by set_returns).

 Also, I can reproduce this problem (well, a very similar problem - it only
 prints the first "hello from foo_1") against trunk (r43346) on Linux both
 i686 and amd64 by running:
 {{{
 make test
 ./parrot t/pmc/eval_11.pir
 ./parrot -R gcdebug t/pmc/eval_12.pir
 }}}

 My conclusions:
  * This problem is not fixed, it is simply hidden.
  * This problem is not specific to testr or amd64, it just presented
 itself there.
  * This problem should go away (not just hide) when packfiles are GCable
 as per PDD13 (and therefor able to mark their constant segments while
 still live).

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/1142#comment:9>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to