# Segmentation fault in mysql.rb

**URL:** <https://www.ruby-forum.com/t/segmentation-fault-in-mysql-rb/125374>\
**Category:** Rails\
**Created:** [January 8, 2008, 5:49pm UTC](https://www.ruby-forum.com/t/segmentation-fault-in-mysql-rb/125374 "2008-01-08T17:49:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![msojka](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@msojka](https://www.ruby-forum.com/u/msojka)\
**Post date:** [January 8, 2008, 5:49pm UTC](https://www.ruby-forum.com/t/segmentation-fault-in-mysql-rb/125374/1 "2008-01-08T17:49:03Z")

</div>

I am experiencing a crash in mysql.rb when using the Solr plugin to  
rebuild\_solr\_index. Eventually, although it occurs with varying  
numbers of records, I see a segmentation fault at line 1093 (or line  
1095) in ActiveRecord mysql.rb. In general, the segmentation faults  
occur at code where a read is receiving data from MySQL.

I doubt this is related to Solr, but seems to be exacerbated or made  
plain because acts\_as\_solr is reading every record in the database  
table, along with two fields from two other tables that I include as  
facets. Thus, every record translates to three SELECT statements to  
get all of the fields I keep in the index. I am wondering if I am just  
running out of memory and the rate of failure being intermittent is  
related to memory allocation vagaries.

I am open to suggestions – how do I track down why this is occurring?  
Anything relevant come to mind, anecdotal or otherwise?

I should mention this is on Leopard, running Rails 2.0.2, and MySQL 5.  
The machine is a dual G5.
