Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5952147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:38:24+00:00 2026-05-22T17:38:24+00:00

Whenever I run rake spec, there’s a 70-80% chance that I get a SEGMENTATION_FAULT

  • 0

Whenever I run “rake spec”, there’s a 70-80% chance that I get a SEGMENTATION_FAULT with Ruby. It usually happens with 2 stack traces: one with Factory_Girl, and the other with ActiveRecord. It is really odd. I have no idea what to do. This is the output when I run all of my tests:

/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/persistence.rb:285: [BUG] Segmentation fault
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]

-- control frame ----------
c:0048 p:0026 s:0171 b:0171 l:000156 d:000170 BLOCK  /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/persistence.rb:285
c:0047 p:---- s:0167 b:0167 l:000166 d:000166 FINISH
c:0046 p:---- s:0165 b:0165 l:000160 d:000164 IFUNC 
c:0045 p:---- s:0163 b:0163 l:000162 d:000162 CFUNC  :each
c:0044 p:---- s:0161 b:0161 l:000160 d:000160 CFUNC  :inject
c:0043 p:0025 s:0157 b:0157 l:000156 d:000156 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/persistence.rb:284
c:0042 p:0010 s:0154 b:0154 l:000153 d:000153 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/locking/optimistic.rb:62
c:0041 p:0014 s:0150 b:0150 l:000149 d:000149 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/base.rb:1395
c:0040 p:---- s:0145 b:0145 l:000144 d:000144 FINISH
c:0039 p:---- s:0143 b:0143 l:000142 d:000142 CFUNC  :new
c:0038 p:0012 s:0140 b:0140 l:000139 d:000139 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/factory_girl-1.3.3/lib/factory_girl/proxy/build.rb:5
c:0037 p:---- s:0136 b:0136 l:000135 d:000135 FINISH
c:0036 p:---- s:0134 b:0134 l:000133 d:000133 CFUNC  :new
c:0035 p:0019 s:0130 b:0130 l:000129 d:000129 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/factory_girl-1.3.3/lib/factory_girl/factory.rb:321
c:0034 p:0034 s:0123 b:0123 l:000122 d:000122 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/factory_girl-1.3.3/lib/factory_girl/factory.rb:273
c:0033 p:0076 s:0118 b:0118 l:002488 d:000117 BLOCK  /home/egervari/websites/training/spec/queries/company_user_query_spec.rb:8
c:0032 p:---- s:0116 b:0116 l:000115 d:000115 FINISH
c:0031 p:---- s:0114 b:0114 l:000113 d:000113 CFUNC  :instance_eval
c:0030 p:0019 s:0111 b:0111 l:000110 d:000110 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/hooks.rb:32
c:0029 p:0014 s:0107 b:0107 l:000098 d:000106 BLOCK  /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/hooks.rb:69
c:0028 p:---- s:0104 b:0104 l:000103 d:000103 FINISH
c:0027 p:---- s:0102 b:0102 l:000101 d:000101 CFUNC  :each
c:0026 p:0025 s:0099 b:0099 l:000098 d:000098 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/hooks.rb:69
c:0025 p:0030 s:0095 b:0095 l:000094 d:000094 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/hooks.rb:115
c:0024 p:0024 s:0089 b:0089 l:000080 d:000088 BLOCK  /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/example_group.rb:221
c:0023 p:---- s:0086 b:0086 l:000085 d:000085 FINISH
c:0022 p:---- s:0084 b:0084 l:000083 d:000083 CFUNC  :each
c:0021 p:0054 s:0081 b:0081 l:000080 d:000080 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/example_group.rb:221
c:0020 p:0039 s:0077 b:0077 l:000076 d:000076 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/example.rb:145
c:0019 p:0011 s:0074 b:0074 l:001e60 d:000073 BLOCK  /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/example.rb:47
c:0018 p:0024 s:0071 b:0071 l:000070 d:000070 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/example.rb:107
c:0017 p:0059 s:0067 b:0067 l:001e60 d:001e60 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/example.rb:45
c:0016 p:0071 s:0061 b:0061 l:000050 d:000060 BLOCK  /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/example_group.rb:294
c:0015 p:---- s:0056 b:0056 l:000055 d:000055 FINISH
c:0014 p:---- s:0054 b:0054 l:000053 d:000053 CFUNC  :map
c:0013 p:0017 s:0051 b:0051 l:000050 d:000050 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/example_group.rb:290
c:0012 p:0096 s:0047 b:0047 l:000046 d:000046 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/example_group.rb:262
c:0011 p:0014 s:0040 b:0040 l:000024 d:000039 BLOCK  /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/command_line.rb:24
c:0010 p:---- s:0037 b:0037 l:000036 d:000036 FINISH
c:0009 p:---- s:0035 b:0035 l:000034 d:000034 CFUNC  :map
c:0008 p:0035 s:0032 b:0032 l:000024 d:000031 BLOCK  /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/command_line.rb:24
c:0007 p:0022 s:0029 b:0029 l:000028 d:000028 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/reporter.rb:12
c:0006 p:0113 s:0025 b:0025 l:000024 d:000024 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/command_line.rb:21
c:0005 p:0055 s:0020 b:0020 l:000019 d:000019 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/runner.rb:80
c:0004 p:0101 s:0014 b:0014 l:000013 d:000013 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/runner.rb:69
c:0003 p:0021 s:0007 b:0006 l:0015e8 d:000005 BLOCK  /usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/runner.rb:11
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:000118 d:000118 TOP   
---------------------------
-- Ruby level backtrace information ----------------------------------------
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/runner.rb:11:in `block in autorun'
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/runner.rb:69:in `run'
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/runner.rb:80:in `run_in_process'
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/command_line.rb:21:in `run'
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/reporter.rb:12:in `report'
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/command_line.rb:24:in `block in run'
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/command_line.rb:24:in `map'
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/command_line.rb:24:in `block (2 levels) in run'
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/example_group.rb:262:in `run'
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/example_group.rb:290:in `run_examples'
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/example_group.rb:290:in `map'
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/example_group.rb:294:in `block in run_examples'
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/example.rb:45:in `run'
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/example.rb:107:in `with_around_hooks'
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/example.rb:47:in `block in run'
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/example.rb:145:in `run_before_each'
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/example_group.rb:221:in `eval_before_eachs'
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/example_group.rb:221:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/example_group.rb:221:in `block in eval_before_eachs'
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/hooks.rb:115:in `run_hook'
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/hooks.rb:69:in `run_all'
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/hooks.rb:69:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/hooks.rb:69:in `block in run_all'
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/hooks.rb:32:in `run_in'
/usr/local/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.3/lib/rspec/core/hooks.rb:32:in `instance_eval'
/home/egervari/websites/training/spec/queries/company_user_query_spec.rb:8:in `block (2 levels) in <top (required)>'
/usr/local/lib/ruby/gems/1.9.1/gems/factory_girl-1.3.3/lib/factory_girl/factory.rb:273:in `create'
/usr/local/lib/ruby/gems/1.9.1/gems/factory_girl-1.3.3/lib/factory_girl/factory.rb:321:in `run'
/usr/local/lib/ruby/gems/1.9.1/gems/factory_girl-1.3.3/lib/factory_girl/factory.rb:321:in `new'
/usr/local/lib/ruby/gems/1.9.1/gems/factory_girl-1.3.3/lib/factory_girl/proxy/build.rb:5:in `initialize'
/usr/local/lib/ruby/gems/1.9.1/gems/factory_girl-1.3.3/lib/factory_girl/proxy/build.rb:5:in `new'
/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/base.rb:1395:in `initialize'
/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/locking/optimistic.rb:62:in `attributes_from_column_definition'
/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/persistence.rb:284:in `attributes_from_column_definition'
/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/persistence.rb:284:in `inject'
/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/persistence.rb:284:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/persistence.rb:285:in `block in attributes_from_column_definition'

rake aborted!
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T17:38:24+00:00Added an answer on May 22, 2026 at 5:38 pm

    Looks like a bug in Ruby itself. My bet it that GC kicks in and sweeps something it should not have swept. Try to do GC.disable somewhere in the beginning.
    Now, Ruby 1.9.2p204 had some GC fixes, which might be related, so if it’s indeed GC to blame, then update your Ruby to (at least) p204, and see if the problem persists.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had developed an application in visual Studio 2005. whenever i run that application
Is there a way to run some custom Javascript whenever a client-side ASP.NET validator
I have managed to get a cron job to run a rake task by
I'm trying to install Radiant CMS but whenever I run: rake db:bootstrap Inside the
i am using: windows 7 rails 3.0 whenever i try to run rake db:migrate.
I get this error whenever i run the program Assignment makes pointer from Integer
When ever I run make I get this 'uninitialized constant RDoc::RDoc' error rake -T
Whenever I run Automated Tests on my site, all the tables get cleaned to
Whenever I run any jython program in Eclipse, I got the following error in
whenever I try to run something in Java, Eclipse changes into the PHP perspective.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.