Ticket #966 (closed bug: fixed)

Opened 5 years ago

Last modified 4 years ago

segfault in Parrot_string_mark

Reported by: coke Owned by: bacek
Priority: major Milestone:
Component: core Version: trunk
Severity: fatal Keywords:
Cc: Language: tcl
Patch status: Platform:

Description (last modified by coke) (diff)

With parrot r40897 and partcl r658;

running parrot tcl.pbc t_tcl/obj.test (need to run "make spectest" first to checkout the test files - you can kill it once it actually starts running tests.),

Looks like a loop:

#0  0xb7e4087c in Parrot_String_mark (interp=0x804f040, pmc=0xb6e4c248)    at ./src/pmc/string.c:540
#1  0xb7d43a7a in mark_special (interp=0x804f040, obj=0xb6e4c248)    at src/gc/mark_sweep.c:472
#2  0xb7d42aa7 in Parrot_gc_mark_PObj_alive (interp=0x804f040, obj=0x804f148)    at src/gc/api.c:230
#3  0xb7e67ee5 in Parrot_FixedPMCArray_mark (interp=0x804f040, pmc=0xb6e4abe0)    at ./src/pmc/fixedpmcarray.pmc:786
#4  0xb7d43a7a in mark_special (interp=0x804f040, obj=0xb6e4abe0)    at src/gc/mark_sweep.c:472
#5  0xb7d42aa7 in Parrot_gc_mark_PObj_alive (interp=0x804f040, obj=0x804f148)    at src/gc/api.c:230
#6  0xb7e67ee5 in Parrot_FixedPMCArray_mark (interp=0x804f040, pmc=0xb6e4ac28)    at ./src/pmc/fixedpmcarray.pmc:786
#7  0xb7d43a7a in mark_special (interp=0x804f040, obj=0xb6e4ac28)    at src/gc/mark_sweep.c:472
#8  0xb7d42aa7 in Parrot_gc_mark_PObj_alive (interp=0x804f040, obj=0x804f148)    at src/gc/api.c:230
#9  0xb7e830ac in Parrot_Object_mark (interp=0x804f040, pmc=0xb6e4ac40)    at ./src/pmc/object.pmc:196
#10 0xb7d43a7a in mark_special (interp=0x804f040, obj=0xb6e4ac40)    at src/gc/mark_sweep.c:472
#11 0xb7d42aa7 in Parrot_gc_mark_PObj_alive (interp=0x804f040, obj=0x804f148)    at src/gc/api.c:230
#12 0xb7e67ee5 in Parrot_FixedPMCArray_mark (interp=0x804f040, pmc=0xb6e49338)    at ./src/pmc/fixedpmcarray.pmc:786
#13 0xb7d43a7a in mark_special (interp=0x804f040, obj=0xb6e49338)    at src/gc/mark_sweep.c:472
#14 0xb7d42aa7 in Parrot_gc_mark_PObj_alive (interp=0x804f040, obj=0x804f148)    at src/gc/api.c:230
#15 0xb7e67ee5 in Parrot_FixedPMCArray_mark (interp=0x804f040, pmc=0xb6e49380)    at ./src/pmc/fixedpmcarray.pmc:786
#16 0xb7d43a7a in mark_special (interp=0x804f040, obj=0xb6e49380)    at src/gc/mark_sweep.c:472
#17 0xb7d42aa7 in Parrot_gc_mark_PObj_alive (interp=0x804f040, obj=0x804f148)    at src/gc/api.c:230
#18 0xb7e830ac in Parrot_Object_mark (interp=0x804f040, pmc=0xb6e49398)    at ./src/pmc/object.pmc:196
#19 0xb7d43a7a in mark_special (interp=0x804f040, obj=0xb6e49398)    at src/gc/mark_sweep.c:472
#20 0xb7d42aa7 in Parrot_gc_mark_PObj_alive (interp=0x804f040, obj=0x804f148)
#21 0xb7e67ee5 in Parrot_FixedPMCArray_mark (interp=0x804f040, pmc=0xb6e47ac0)    at ./src/pmc/fixedpmcarray.pmc:786
#22 0xb7d43a7a in mark_special (interp=0x804f040, obj=0xb6e47ac0)    at src/gc/mark_sweep.c:472
#23 0xb7d42aa7 in Parrot_gc_mark_PObj_alive (interp=0x804f040, obj=0x804f148)    at src/gc/api.c:230
#24 0xb7e67ee5 in Parrot_FixedPMCArray_mark (interp=0x804f040, pmc=0xb6e47b20)    at ./src/pmc/fixedpmcarray.pmc:786
#25 0xb7d43a7a in mark_special (interp=0x804f040, obj=0xb6e47b20)    at src/gc/mark_sweep.c:472
#26 0xb7d42aa7 in Parrot_gc_mark_PObj_alive (interp=0x804f040, obj=0x804f148)    at src/gc/api.c:230
#27 0xb7e830ac in Parrot_Object_mark (interp=0x804f040, pmc=0xb6e47b38)    at ./src/pmc/object.pmc:196
#28 0xb7d43a7a in mark_special (interp=0x804f040, obj=0xb6e47b38)    at src/gc/mark_sweep.c:472
#29 0xb7d42aa7 in Parrot_gc_mark_PObj_alive (interp=0x804f040, obj=0x804f148)    at src/gc/api.c:230
#30 0xb7e67ee5 in Parrot_FixedPMCArray_mark (interp=0x804f040, pmc=0xb6e461d0)    at ./src/pmc/fixedpmcarray.pmc:786
#31 0xb7d43a7a in mark_special (interp=0x804f040, obj=0xb6e461d0)    at src/gc/mark_sweep.c:472
#32 0xb7d42aa7 in Parrot_gc_mark_PObj_alive (interp=0x804f040, obj=0x804f148)    at src/gc/api.c:230
#33 0xb7e67ee5 in Parrot_FixedPMCArray_mark (interp=0x804f040, pmc=0xb6e46218)    at ./src/pmc/fixedpmcarray.pmc:786
#34 0xb7d43a7a in mark_special (interp=0x804f040, obj=0xb6e46218)    at src/gc/mark_sweep.c:472
#35 0xb7d42aa7 in Parrot_gc_mark_PObj_alive (interp=0x804f040, obj=0x804f148)    at src/gc/api.c:230
#36 0xb7e830ac in Parrot_Object_mark (interp=0x804f040, pmc=0xb6e46230)    at ./src/pmc/object.pmc:196
#37 0xb7d43a7a in mark_special (interp=0x804f040, obj=0xb6e46230)    at src/gc/mark_sweep.c:472
#38 0xb7d42aa7 in Parrot_gc_mark_PObj_alive (interp=0x804f040, obj=0x804f148)    at src/gc/api.c:230
#39 0xb7e67ee5 in Parrot_FixedPMCArray_mark (interp=0x804f040, pmc=0xb6e44790)    at ./src/pmc/fixedpmcarray.pmc:786
#40 0xb7d43a7a in mark_special (interp=0x804f040, obj=0xb6e44790)    at src/gc/mark_sweep.c:472
#41 0xb7d42aa7 in Parrot_gc_mark_PObj_alive (interp=0x804f040, obj=0x804f148)    at src/gc/api.c:230
#42 0xb7e67ee5 in Parrot_FixedPMCArray_mark (interp=0x804f040, pmc=0xb6e447f0)    at ./src/pmc/fixedpmcarray.pmc:786
#43 0xb7d43a7a in mark_special (interp=0x804f040, obj=0xb6e447f0)    at src/gc/mark_sweep.c:472
#44 0xb7d42aa7 in Parrot_gc_mark_PObj_alive (interp=0x804f040, obj=0x804f148)    at src/gc/api.c:230
#45 0xb7e830ac in Parrot_Object_mark (interp=0x804f040, pmc=0xb6e44808)    at ./src/pmc/object.pmc:196
#46 0xb7d43a7a in mark_special (interp=0x804f040, obj=0xb6e44808)    at src/gc/mark_sweep.c:472
#47 0xb7d42aa7 in Parrot_gc_mark_PObj_alive (interp=0x804f040, obj=0x804f148)    at src/gc/api.c:230
#48 0xb7e67ee5 in Parrot_FixedPMCArray_mark (interp=0x804f040, pmc=0xb6e430f8)    at ./src/pmc/fixedpmcarray.pmc:786
#49 0xb7d43a7a in mark_special (interp=0x804f040, obj=0xb6e430f8)    at src/gc/mark_sweep.c:472
#50 0xb7d42aa7 in Parrot_gc_mark_PObj_alive (interp=0x804f040, obj=0x804f148)    at src/gc/api.c:230
#51 0xb7e67ee5 in Parrot_FixedPMCArray_mark (interp=0x804f040, pmc=0xb6e43140)    at ./src/pmc/fixedpmcarray.pmc:786
#52 0xb7d43a7a in mark_special (interp=0x804f040, obj=0xb6e43140)    at src/gc/mark_sweep.c:472
#53 0xb7d42aa7 in Parrot_gc_mark_PObj_alive (interp=0x804f040, obj=0x804f148)    at src/gc/api.c:230
#54 0xb7e830ac in Parrot_Object_mark (interp=0x804f040, pmc=0xb6e43158)    at ./src/pmc/object.pmc:196
#55 0xb7d43a7a in mark_special (interp=0x804f040, obj=0xb6e43158)    at src/gc/mark_sweep.c:472
#56 0xb7d42aa7 in Parrot_gc_mark_PObj_alive (interp=0x804f040, obj=0x804f148)    at src/gc/api.c:230
#57 0xb7e67ee5 in Parrot_FixedPMCArray_mark (interp=0x804f040, pmc=0xb6e418e0)    at ./src/pmc/fixedpmcarray.pmc:786
#58 0xb7d43a7a in mark_special (interp=0x804f040, obj=0xb6e418e0)    at src/gc/mark_sweep.c:472
#59 0xb7d42aa7 in Parrot_gc_mark_PObj_alive (interp=0x804f040, obj=0x804f148)    at src/gc/api.c:230
#60 0xb7e67ee5 in Parrot_FixedPMCArray_mark (interp=0x804f040, pmc=0xb6e41988)    at ./src/pmc/fixedpmcarray.pmc:786
#61 0xb7d43a7a in mark_special (interp=0x804f040, obj=0xb6e41988)
.... <SNIP>

Change History

Changed 5 years ago by jkeenan

  • component changed from none to core

Changed 5 years ago by chromatic

We need to see where the loop starts to debug this one appropriately. If you use ulimit to set your stack size very small, this'll be easier to find.

Changed 5 years ago by coke

ulimit -s N seems to have no affect on the size of the back trace. defaulted to 8K; tried 1K, 128, and 1.

Changed 5 years ago by coke

  • description modified (diff)

Changed 5 years ago by coke

  • milestone set to 1.9

This segfault is still occurring in 1.8.0-devel and partcl latest. The failure comes after

++++ obj-31.6 SKIPPED: testobj

in the test output, which takes some time to get to; The failure is occurring in both OS X 10.4/intel and linux/amd64. (This gives me some hope that I can reduce the test case somewhat.)

Changed 5 years ago by coke

  • milestone 1.9 deleted

Changed 5 years ago by coke

This still happens with a 2.1.0-devel vintage parrot.

Changed 4 years ago by whiteknight

  • owner set to whiteknight

Changed 4 years ago by bacek

  • owner changed from whiteknight to bacek

Hello.

Just for future references - minimal tcl testcase:

if {[lsearch [namespace children] ::tcltest] == -1} {
    package require tcltest
    namespace import -force ::tcltest::*
}


test obj-32.1 {freeing very large object trees} {
    set x {}
    for {set i 0} {$i<100000} {incr i} {
	set x [list $x {}]
    }
    unset x
} {}

I'm looking at this bug for GC-related failures.

-- Bacek

Changed 4 years ago by bacek

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

Hello.

Yes, this this duplicate of #1723. Doesn't happen anymore on GC MS2 or _optimized_ build of GC GMS. Resolving ticket.

bacek@illusion:~/src/partcl$ parrot tcl.pbc t.test 
++++ obj-32.1 PASSED

-- Bacek

Note: See TracTickets for help on using tickets.