[BUG] ruby 1.8.0 - GC

A

Allen Mitchell

Platform: Windowx XP

I have an application using FXRuby (1.0.24). In this application I have a
left/right split with client records on the left and detail records on the
right. On a selection change in the left window, I use a thread to populate
the right window with the details.

I am getting a memory access violation while stressing the application with
the use of the up and down arrow keys in the left window. This causes
multiple threads to queue on a mutex to populate the right window. Without
fail, this results in a memory access violation. I rebuilt ruby ( VC6 ),
added map and COD files and debugged it thru Dr. Watson.

This analysis always points me to the same line of code in rb_newobj
(gc.c )...

VALUE
rb_newobj()
{
VALUE obj;

if (!freelist) rb_gc();

obj = (VALUE)freelist;
freelist = freelist->as.free.next; <----------------------------------
MEMZERO((void*)obj, RVALUE, 1);
return obj;
}

I am starting to suspect that there is an error in GC that only manifests
itself in a threaded application under load.

To confirm this, I disabled GC at the start of the app and tried to cause it
to fail. I could not make it fail... however an application that grew to
300+ MB isn't much use.

I'm going to settle into the C code, but I was just wondering if anyone else
has had an occurance of the same sort of thing.

I have also seen something like this in 1.6.8, but it was very infrequent in
comparison to 1.8.0.

Matz, I can forward logs and map files if they would be of any assistance.

Thanks...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,797
Messages
2,569,647
Members
45,377
Latest member
Zebacus

Latest Threads

Top