Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread
Message: 92444
BY: dan young (danoyoung)
DATE: 2010-01-27 20:02
SUBJECT: Segmentation fault

 

Hello,

I'm trying to parse a relatively large XML file (327MB @ 4.5million lines) and am getting seg. faults....I can parse the same content in smaller files without a problem, but it seems that on the larger file it dies randomly. Does anyone have insight this?

Ubuntu 9.1
Ruby 1.9.1
libxml2-ruby 1.1.3

I'm using XML::Reader.file to stream the XML.


./xml_parse.rb:95: [BUG] Segmentation fault
ruby 1.9.1p243 (2009-07-16 revision 24175) [x86_64-linux]

-- control frame ----------
c:0007 p:---- s:0029 b:0029 l:000028 d:000028 CFUNC :[]
c:0006 p:0100 s:0025 b:0023 l:000028 d:000022 BLOCK ./xml_parse.rb:95
c:0005 p:---- s:0019 b:0019 l:000018 d:000018 FINISH
c:0004 p:---- s:0017 b:0017 l:000016 d:000016 CFUNC :each
c:0003 p:0886 s:0014 b:0014 l:000028 d:001288 EVAL ./xml_parse.rb:86
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:000028 d:000028 TOP
---------------------------
-- Ruby level backtrace information-----------------------------------------
./xml_parse.rb:95:in `[]'
./xml_parse.rb:95:in `block in <main>'
./xml_parse.rb:86:in `each'
./xml_parse.rb:86:in `<main>'

-- C level backtrace information -------------------------------------------
0x7fde46af5941 /usr/lib/libruby-1.9.1.so.1.9(rb_vm_bugreport+0x51) [0x7fde46af5941]
0x7fde46a1dbd6 /usr/lib/libruby-1.9.1.so.1.9 [0x7fde46a1dbd6]
0x7fde46a1dd43 /usr/lib/libruby-1.9.1.so.1.9(rb_bug+0xb3) [0x7fde46a1dd43]
0x7fde46aa07c5 /usr/lib/libruby-1.9.1.so.1.9 [0x7fde46aa07c5]
0x7fde467c0190 /lib/libpthread.so.0 [0x7fde467c0190]
0x7fde46ad0bf7 /usr/lib/libruby-1.9.1.so.1.9 [0x7fde46ad0bf7]
0x7fde46ad0fed /usr/lib/libruby-1.9.1.so.1.9(rb_class_path+0xd) [0x7fde46ad0fed]
0x7fde46ad1159 /usr/lib/libruby-1.9.1.so.1.9(rb_class2name+0x9) [0x7fde46ad1159]
0x7fde46a1df78 /usr/lib/libruby-1.9.1.so.1.9(rb_check_type+0x148) [0x7fde46a1df78]
0x7fde45566bf0 /var/lib/gems/1.9.1/gems/libxml-ruby-1.1.3/lib/libxml_ruby.so(rxml_attr_value_get+0x20) [0x7fde45566bf0]
0x7fde46ae48bf /usr/lib/libruby-1.9.1.so.1.9 [0x7fde46ae48bf]
0x7fde46af046b /usr/lib/libruby-1.9.1.so.1.9 [0x7fde46af046b]
0x7fde46ae8863 /usr/lib/libruby-1.9.1.so.1.9 [0x7fde46ae8863]
0x7fde46aecb0c /usr/lib/libruby-1.9.1.so.1.9 [0x7fde46aecb0c]
0x7fde46af2863 /usr/lib/libruby-1.9.1.so.1.9(rb_yield+0x1d3) [0x7fde46af2863]
0x7fde4556648a /var/lib/gems/1.9.1/gems/libxml-ruby-1.1.3/lib/libxml_ruby.so [0x7fde4556648a]
0x7fde46ae48bf /usr/lib/libruby-1.9.1.so.1.9 [0x7fde46ae48bf]
0x7fde46af046b /usr/lib/libruby-1.9.1.so.1.9 [0x7fde46af046b]
0x7fde46ae9833 /usr/lib/libruby-1.9.1.so.1.9 [0x7fde46ae9833]
0x7fde46aecb0c /usr/lib/libruby-1.9.1.so.1.9 [0x7fde46aecb0c]
0x7fde46aecc81 /usr/lib/libruby-1.9.1.so.1.9(rb_iseq_eval_main+0xb1) [0x7fde46aecc81]
0x7fde46a1fabc /usr/lib/libruby-1.9.1.so.1.9(ruby_exec_node+0xac) [0x7fde46a1fabc]
0x7fde46a21137 /usr/lib/libruby-1.9.1.so.1.9(ruby_run_node+0x37) [0x7fde46a21137]
0x4009db /usr/bin/ruby(main+0x4b) [0x4009db]
0x7fde45b97abd /lib/libc.so.6(__libc_start_main+0xfd) [0x7fde45b97abd]
0x4008c9 /usr/bin/ruby [0x4008c9]

[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Aborted







Thread View

Thread Author Date
Segmentation faultdan young2010-01-27 20:02
      RE: Segmentation faultPhillip Bogle2010-01-27 22:33
            RE: Segmentation faultAdam Rambousek2010-09-27 14:06

Post a followup to this message