Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion More Garbage Collection Issues
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Leopold Toetsch  
View profile  
 More options Mar 29 2005, 4:19 am
Newsgroups: perl.perl6.internals
From: l...@toetsch.at (Leopold Toetsch)
Date: Tue, 29 Mar 2005 11:19:29 +0200
Local: Tues, Mar 29 2005 4:19 am
Subject: Re: More Garbage Collection Issues

Cory Spencer <cspen...@sprocket.org> wrote:
> I've come across another garbage collection/DOD issue that I'm trying to
> solve (without much success) and would appreciate some tips/advice on how
> to locate the source of the problem.

When I'm investigating GC bugs, the usual procedure is like this:
- run the program with -t with or w/o --gc-debug
  (GC bug sometimes happens earlier, which usually simplifies things)
- check the backtraces
- run it with -t -G
- compare trace outputs (possibly after reducing trace dumps with the
  help of a perl script that deletes DOD/GC messages and maybe
  addresses)
- try to locate which POBj (or parent(s) of it) are involved
- turn on GC_VERBOSE and set the PObj_report_FLAG in involved PMCs
- or put a printf message into destroy vtable functions
- check if parent of too early collected objects are alive and if they
  mark their contents (or refs) properly

Overall: it's a nasty and time consuming job.

> ...  It appears to affectthe String class (in
> my case, a subclass of String).

Does it happen with the plain String PMC too?

> ... Oddly, it appears to only affect strings
> with a length of 1 (ie. a single character - changing the string to a
> longer length does not cause it be be marked as a dead object).

Strange. How are these strings created? Some special cased code?

> I've also noticed similar behaviour when I use a native string type (ie.
> something declared with an IMC ".local string str" declaration) as a key
> in a Hash table (again, it only appears to happen when the string is a
> single character in length).  Later, when I go back to retrieve the value
> stored in the hash, it can't find it.  (Running an iterator over the keys
> of the Hash shows keys that appears as garbage characters (presumably
> string types that have since been collected).)

Are the strings created dynamically during an eval sequence
(compreg/compile)? String constants or outcome of a string expression?

> I've as of yet been unable to produce a concise, working example.  Any
> tips as to how I can find the source of this bug?

If you can't reduce it, just send a tarball of needed stuff in PM to me.

leo


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.