Ticket #945 (closed bug: fixed)

Opened 12 years ago

Last modified 11 years ago

Sub invocation consumes all memory. (needs testing)

Reported by: coke Owned by:
Priority: blocker Milestone:
Component: core Version: trunk
Severity: fatal Keywords: needs-regression-test
Cc: Language:
Patch status: Platform:

Description

The following PIR:

.sub main :main
loop:
    consume()
    goto loop
.end

.sub consume
.end

Rapidly consumes all memory.

Attachments

interpinfo_mem_test.pir Download (1.5 KB) - added by plobsing 11 years ago.
invoke as ./parrot interpinfo_mem_test.pir 1000000

Change History

Changed 12 years ago by coke

Tested against r40744

Changed 12 years ago by coke

This started consuming memory in r40628 (merge auto_attrs to trunk).

To resolve this ticket, we need to run this with several iterations and check memory usage, presumably with interpinfo.

Changed 12 years ago by coke

  • summary changed from Sub invocation consumes all memory. to Sub invocation consumes all memory. (now: segfaults)

The fix for this was committed as r40799, but unfortunately, this causes partcl to segfault. (Verified with bisect)

(gdb) bt
#0  0xb7d2abbb in Parrot_oo_find_vtable_override (interp=0x8051008,     classobj=0x805fc90, name=0x807604c) at src/oo.c:517
#1  0xb7ef1389 in Parrot_Object_get_class (interp=0x8051008, pmc=0x8263470)    at ./src/pmc/object.pmc:430
#2  0xb7ed8cf2 in Parrot_Object_isa (interp=0x8051008, pmc=0x8263470,     classname=0x8088df8) at ./src/pmc/object.pmc:517
#3  0xb7c9b030 in Parrot_isa_i_p_sc (cur_opcode=0xb6e809c4, interp=0x8051008)    at src/ops/object.ops:222
#4  0xb7d40bf0 in runops_slow_core (interp=0x8051008, pc=0xb6e809c4)    at src/runcore/cores.c:462
#5  0xb7d3f7ee in runops_int (interp=0x8051008, offset=3)    at src/runcore/main.c:987
#6  0xb7d187e5 in runops (interp=0x8051008, offs=3) at src/call/ops.c:119
#7  0xb7d18bf4 in runops_args (interp=0x8051008, sub=0x80c4980, obj=0x80b2b98,     meth_unused=0x0, sig=0xb7f5cfbf "vP",     ap=0xbf9cbbac "?L\f\b\b?\234?\200\t?? ?\234??L\f\b\200I\f\b??\032?\b?\234??\212\004\b\b\020\005\b\001") at src/call/ops.c:269
#8  0xb7d19aa6 in Parrot_runops_fromc_args (interp=0x8051008, sub=0x80c4980,     sig=0xb7f5cfbf "vP") at src/call/ops.c:338
#9  0xb7cf7329 in Parrot_runcode (interp=0x8051008, argc=1, argv=0xbf9cbca4)    at src/embed.c:983
#10 0x08048ab2 in main ()
 

Changed 12 years ago by mikehh

r40799 also causes rakudo to segfault and a failure in make examples_tests

t/examples/past.t - Failed test 2

ok at r40790 (last non-branch commit before r40799)

both rakudo on the build and t/examples/past.t exit with error code 134

Changed 12 years ago by chromatic

On Tuesday 25 August 2009 07:18:08 Parrot wrote:

>  This started consuming memory in r40628 (merge auto_attrs to trunk).
>
>  To resolve this ticket, we need to run this with several iterations and
>  check memory usage, presumably with interpinfo.

There are a couple of big memory leaks from the time of that merge, one in the 
PMC_data allocated structure and one in new Arena header pools.  I'll track 
them down unless someone beats me to them.

-- c

Changed 12 years ago by NotFound

Should be fixed by r40824, please verify.

Changed 12 years ago by coke

The segfaults are gone, verified. Ran one of the tests that the original commit caused to run out of memory, and it completed ok at this revision.

Now we just need a test to make sure the example in the description doesn't leak.

Thanks, NotFound.

Changed 12 years ago by coke

  • lang tcl deleted
  • summary changed from Sub invocation consumes all memory. (now: segfaults) to Sub invocation consumes all memory. (needs testing)

Changed 11 years ago by tcurtis

  • keywords needs-testing added

Changed 11 years ago by tcurtis

  • keywords needs-regression-test added; needs-testing removed

Changed 11 years ago by plobsing

I am unable to observe any trend difference in the memory usage from r40628 to r48424 using information available to PIR through interpinfo.

The rate at which TOTAL_COPIED grows is orders of magnitude larger in r40628, but both growth trends are linear, so where do we set the line?

I've attached my attempted test program for reference.

Changed 11 years ago by plobsing

invoke as ./parrot interpinfo_mem_test.pir 1000000

Changed 11 years ago by nwellnhof

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

Test case in r48579, fix in r48585.

Note: See TracTickets for help on using tickets.