Bugs item #8337, was opened at 2007-01-31 23:17 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=8337&group_id=494
Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: Opening many files causes segfault on fbsd-amd64 Initial Comment: I have a number of xml files I'm parsing, and it seems the libxml-ruby will cause a segfault if I open too many files too quickly. For example, if your script test.rb is: -- require 'xml/libxml' (1..10000).each{|time| XML::Document.file('test.xml') p time if time % 100 == 0 } -- and test.xml is -- <?xml version="1.0"?> <test/> -- Then, on fbsd-amd64, you'll see 100 200 300 400 500 test.rb:5: [BUG] Segmentation fault ruby 1.8.5 (2006-08-25) [amd64-freebsd6] zsh: abort (core dumped) ruby test.rb It seems to error in the same place every time. Interestingly, for so short an XML file, if you remove the if clause from the p statement, there won't be any errors, however longer XML files will still suffer this problem. More interestingly, the problem can be avoided entirely by disabling the GC. ---------------------------------------------------------------------- Comment By: Saurabh Nanda (saurabhnanda) Date: 2008-02-05 19:47 Message: I think I'm also facing a similar issue. I'm on a 64 bit Intel machine with libxml-ruby-0.5.2. I'm trying to write a long running RESTful service in Rails. After the first few XML POSTs to the Rails server, it suddenly segfaults. I can attach the error log. How do I attach a file? ---------------------------------------------------------------------- Comment By: Dan Janowski (danj) Date: 2007-08-30 18:46 Message: There is a new memory model released but I do not have this system combo to test. Please take a few minutes and go to the project page and download the MEM2 release 0.5.0 and run the rwtest/doc_file.rb from the 'ext' directory (to use the local build instead of a system installed libxml). Please follow up. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=8337&group_id=494 _______________________________________________ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel