# Segmentation fault when loading fixtures

**URL:** <https://www.ruby-forum.com/t/segmentation-fault-when-loading-fixtures/176186>\
**Category:** Rails\
**Created:** [September 25, 2009, 11:15pm UTC](https://www.ruby-forum.com/t/segmentation-fault-when-loading-fixtures/176186 "2009-09-25T23:15:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![russianbandit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e36b37/32.png) [@russianbandit](https://www.ruby-forum.com/u/russianbandit)\
**Post date:** [September 25, 2009, 11:15pm UTC](https://www.ruby-forum.com/t/segmentation-fault-when-loading-fixtures/176186/1 "2009-09-25T23:15:28Z")

</div>

I created some performance fixtures that load around 100k+ items through  
a fixture. While the fixture is loading I get a seg fault:  
/ruby/lib/ruby/1.8/yaml.rb:133: [BUG] Segmentation fault

Would anyone be able to shine some light on this problem? Can fixtures  
not load that much data? What are my alternatives to load performance  
data?

---

<div class="post-metadata">

**Author:** ![russianbandit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e36b37/32.png) [@russianbandit](https://www.ruby-forum.com/u/russianbandit)\
**Post date:** [September 25, 2009, 11:19pm UTC](https://www.ruby-forum.com/t/segmentation-fault-when-loading-fixtures/176186/2 "2009-09-25T23:19:58Z")

</div>

Greg L. wrote:

> I created some performance fixtures that load around 100k+ items through  
> a fixture. While the fixture is loading I get a seg fault:  
> /ruby/lib/ruby/1.8/yaml.rb:133: [BUG] Segmentation fault
> 
> Would anyone be able to shine some light on this problem? Can fixtures  
> not load that much data?

Is the process running out of memory, perhaps?

> What are my alternatives to load performance  
> data?

Machinist and Faker might be worth a look.

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![russianbandit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e36b37/32.png) [@russianbandit](https://www.ruby-forum.com/u/russianbandit)\
**Post date:** [September 25, 2009, 11:28pm UTC](https://www.ruby-forum.com/t/segmentation-fault-when-loading-fixtures/176186/3 "2009-09-25T23:28:32Z")

</div>

Marnen Laibow-Koser wrote:

> Is the process running out of memory, perhaps?

I’m on windows XP and used the Task Manager to see if memory was peaking  
out, it wasn’t. How else can I tell if a specific process is running out  
of memory?

---

<div class="post-metadata">

**Author:** ![russianbandit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e36b37/32.png) [@russianbandit](https://www.ruby-forum.com/u/russianbandit)\
**Post date:** [September 26, 2009, 12:46am UTC](https://www.ruby-forum.com/t/segmentation-fault-when-loading-fixtures/176186/4 "2009-09-26T00:46:25Z")

</div>

On Fri, Sep 25, 2009 at 4:28 PM, Greg L.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’m on windows XP and used the Task Manager to see if memory was peaking  
> out, it wasn’t. How else can I tell if a specific process is running out  
> of memory?

Can you do smaller load tests and extrapolate up from there ? Does  
10K also segfault?

–  
Greg D.  
[http://destiney.com/](http://destiney.com/)

---

<div class="post-metadata">

**Author:** ![russianbandit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e36b37/32.png) [@russianbandit](https://www.ruby-forum.com/u/russianbandit)\
**Post date:** [September 26, 2009, 12:50am UTC](https://www.ruby-forum.com/t/segmentation-fault-when-loading-fixtures/176186/5 "2009-09-26T00:50:59Z")

</div>

I successfully loaded about 35K records. It’s really when it gets above  
100k that it seg faults.

---

<div class="post-metadata">

**Author:** ![russianbandit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e36b37/32.png) [@russianbandit](https://www.ruby-forum.com/u/russianbandit)\
**Post date:** [September 26, 2009, 2:01am UTC](https://www.ruby-forum.com/t/segmentation-fault-when-loading-fixtures/176186/6 "2009-09-26T02:01:59Z")

</div>

On Fri, Sep 25, 2009 at 3:50 PM, Greg L.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I successfully loaded about 35K records. It’s really when it gets above  
> 100k that it seg faults.

What version of Ruby are you on? Could it be a particular fixture that  
is segfaulting YAML? Can you do a binary search and pinpoint exactly  
how many fixtures until segfault?

Colin

---

<div class="post-metadata">

**Author:** ![russianbandit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e36b37/32.png) [@russianbandit](https://www.ruby-forum.com/u/russianbandit)\
**Post date:** [September 28, 2009, 6:34pm UTC](https://www.ruby-forum.com/t/segmentation-fault-when-loading-fixtures/176186/7 "2009-09-28T18:34:46Z")

</div>

Colin C. wrote:

> On Fri, Sep 25, 2009 at 3:50 PM, Greg L.  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > I successfully loaded about 35K records. It’s really when it gets above  
> > 100k that it seg faults.
> 
> What version of Ruby are you on? Could it be a particular fixture that  
> is segfaulting YAML? Can you do a binary search and pinpoint exactly  
> how many fixtures until segfault?
> 
> Colin

I’m using ruby 1.8.6 on Windows.  
My fixture loads records in a loop. I think around 60K the seg fault  
occurs. This happens to two different fixture files. I’m really starting  
to think it’s a memory issue. How can I increase the amount of memory  
being used by the process?
