# \[BUG\] cross-thread violation on rb\_gc()

**URL:** <https://www.ruby-forum.com/t/bug-cross-thread-violation-on-rb-gc/170593>\
**Category:** Ruby\
**Created:** [June 19, 2009, 2:23pm UTC](https://www.ruby-forum.com/t/bug-cross-thread-violation-on-rb-gc/170593 "2009-06-19T14:23:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![timhunter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/71e660/32.png) [@timhunter](https://www.ruby-forum.com/u/timhunter)\
**Post date:** [June 19, 2009, 2:23pm UTC](https://www.ruby-forum.com/t/bug-cross-thread-violation-on-rb-gc/170593/1 "2009-06-19T14:23:51Z")

</div>

A friend of mine, new to Ruby, gets this error when he runs a program I  
gave him. He’s running 1.8.6 (2009-03-31) [x86\_64-linux]. I can’t  
reproduce the problem with any of the versions of Ruby I have installed  
on 32-bit Ubuntu and OS X.

The program makes heavy use of Ruby’s memory allocation routines  
(xmalloc, etc.).

Google shows a lot of hits involving Merb, which is not in use here.

Any ideas about the problem and what he can do to fix it?

---

<div class="post-metadata">

**Author:** ![timhunter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/71e660/32.png) [@timhunter](https://www.ruby-forum.com/u/timhunter)\
**Post date:** [June 20, 2009, 12:47am UTC](https://www.ruby-forum.com/t/bug-cross-thread-violation-on-rb-gc/170593/2 "2009-06-20T00:47:02Z")

</div>

On Jun 19, 2009, at 05:24, Tim H. wrote:

> Google shows a lot of hits involving Merb, which is not in use here.
> 
> Any ideas about the problem and what he can do to fix it?

He could start by posting a backtrace.
