Issue #5990 has been updated by drbrain (Eric Hodel).

Status changed from Feedback to Third Party's Issue

Due to lack of feedback I'm marking this as third party issue. No mention of a bug in ruby has been made.
----------------------------------------
Bug #5990: Random Segmentation Fault when running on Linux Fedora
https://bugs.ruby-lang.org/issues/5990#change-35653

Author: blairsilverberg (Blair Silverberg)
Status: Third Party's Issue
Priority: Normal
Assignee: tenderlovemaking (Aaron Patterson)
Category: 
Target version: 
ruby -v: 1.9.2p290


I am parsing a large library of html documents with ruby mechanize/nokogiri. Randomly, I encounter a segmentation fault.

This happens on both ruby 1.9.2 (ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]) and 1.9.3 (ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux])

I am running Linux Fedora Laughlin 16 on rackspace

Linux 2.6.35.6-45.fc14.x86_64 #1 SMP Mon Oct 18 23:57:44 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux

Fedora release 14 (Laughlin)
Kernel \r on an \m (\l)



/root/code/myteam/classes/profile_page_scraper.rb:116: [BUG] Segmentation fault
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]

-- control frame ----------
c:0022 p:0010 s:0088 b:0086 l:000085 d:000085 METHOD /root/code/myteam/classes/profile_page_scraper.rb:116
c:0021 p:0027 s:0082 b:0080 l:000079 d:000079 METHOD /root/code/myteam/classes/profile_page_scraper.rb:120
c:0020 p:0017 s:0076 b:0074 l:001ed8 d:000073 BLOCK  /root/code/myteam/classes/mysite_scraper.rb:115
c:0019 p:0015 s:0069 b:0069 l:000059 d:000068 BLOCK  /usr/local/rvm/gems/ruby-1.9.2-p290/gems/nokogiri-1.5.0/lib/nokogiri/xml/node_set.rb:239
c:0018 p:---- s:0066 b:0066 l:000065 d:000065 FINISH
c:0017 p:---- s:0064 b:0064 l:000063 d:000063 CFUNC  :upto
c:0016 p:0023 s:0060 b:0060 l:000059 d:000059 METHOD /usr/local/rvm/gems/ruby-1.9.2-p290/gems/nokogiri-1.5.0/lib/nokogiri/xml/node_set.rb:238
c:0015 p:0924 s:0056 b:0056 l:001ed8 d:001ed8 METHOD /root/code/myteam/classes/mysite_scraper.rb:113
c:0014 p:0032 s:0045 b:0045 l:000036 d:000044 BLOCK  /root/code/myteam/scrape_user.rb:23
c:0013 p:---- s:0042 b:0042 l:000041 d:000041 FINISH
c:0012 p:---- s:0040 b:0040 l:000039 d:000039 CFUNC  :each
c:0011 p:0120 s:0037 b:0037 l:000036 d:000036 TOP    /root/code/myteam/scrape_user.rb:21
c:0010 p:---- s:0034 b:0034 l:000033 d:000033 FINISH
c:0009 p:---- s:0032 b:0032 l:000031 d:000031 CFUNC  :require
c:0008 p:0036 s:0028 b:0028 l:000027 d:000027 METHOD /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36
c:0007 p:0056 s:0021 b:0021 l:000012 d:000020 BLOCK  /root/code/myteam/helpers/helpers.rb:7
c:0006 p:---- s:0018 b:0018 l:000017 d:000017 FINISH
c:0005 p:---- s:0016 b:0016 l:000015 d:000015 CFUNC  :each
c:0004 p:0066 s:0013 b:0013 l:000012 d:000012 METHOD /root/code/myteam/helpers/helpers.rb:5
c:0003 p:0050 s:0007 b:0007 l:0000b8 d:002340 EVAL   ./scrape_user.rb:6
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0000b8 d:0000b8 TOP   
---------------------------
-- Ruby level backtrace information ----------------------------------------
./scrape_user.rb:6:in `<main>'
/root/code/myteam/helpers/helpers.rb:5:in `require_all'
/root/code/myteam/helpers/helpers.rb:5:in `each'
/root/code/myteam/helpers/helpers.rb:7:in `block in require_all'
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/root/code/myteam/scrape_user.rb:21:in `<top (required)>'
/root/code/myteam/scrape_user.rb:21:in `each'
/root/code/myteam/scrape_user.rb:23:in `block in <top (required)>'
/root/code/myteam/classes/mysite_scraper.rb:113:in `scrape_user'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/nokogiri-1.5.0/lib/nokogiri/xml/node_set.rb:238:in `each'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/nokogiri-1.5.0/lib/nokogiri/xml/node_set.rb:238:in `upto'
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/nokogiri-1.5.0/lib/nokogiri/xml/node_set.rb:239:in `block in each'
/root/code/myteam/classes/mysite_scraper.rb:115:in `block in scrape_user'
/root/code/myteam/classes/profile_page_scraper.rb:120:in `get_my_url'
/root/code/myteam/classes/profile_page_scraper.rb:116:in `get_my_id'

-- C level backtrace information -------------------------------------------
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_vm_bugreport+0x5f) [0x7fc76ec380cf]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x60564) [0x7fc76eb17564]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_bug+0xb3) [0x7fc76eb18493]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x1143b5) [0x7fc76ebcb3b5]
/lib64/libpthread.so.0() [0x328540eeb0]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_method_entry_get_without_cache+0x20) [0x7fc76ec25750]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x176965) [0x7fc76ec2d965]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x176f5b) [0x7fc76ec2df5b]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_yield+0x47) [0x7fc76ec32e57]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0xaa161) [0x7fc76eb61161]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x17afa6) [0x7fc76ec31fa6]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x1710ee) [0x7fc76ec280ee]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x176f5b) [0x7fc76ec2df5b]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_yield+0x47) [0x7fc76ec32e57]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_ary_each+0x46) [0x7fc76eae6816]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x17afa6) [0x7fc76ec31fa6]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x1710ee) [0x7fc76ec280ee]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x176f5b) [0x7fc76ec2df5b]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_iseq_eval+0x1f0) [0x7fc76ec33340]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x6a0d0) [0x7fc76eb210d0]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_require_safe+0x6cf) [0x7fc76eb225cf]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x17afa6) [0x7fc76ec31fa6]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x1710ee) [0x7fc76ec280ee]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x176f5b) [0x7fc76ec2df5b]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_yield+0x47) [0x7fc76ec32e57]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_ary_each+0x46) [0x7fc76eae6816]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x17afa6) [0x7fc76ec31fa6]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x1710ee) [0x7fc76ec280ee]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x176f5b) [0x7fc76ec2df5b]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(rb_iseq_eval_main+0xb1) [0x7fc76ec33441]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x66a1a) [0x7fc76eb1da1a]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(ruby_exec_node+0x1d) [0x7fc76eb1e88d]
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(ruby_run_node+0x1e) [0x7fc76eb20afe]
ruby(main+0x4b) [0x40091b]
/lib64/libc.so.6(__libc_start_main+0xfd) [0x3284c1ee5d]
ruby() [0x400809]

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html



-- 
http://bugs.ruby-lang.org/