From cfis at savagexi.com Sun Apr 17 02:53:21 2011 From: cfis at savagexi.com (Charlie Savage) Date: Sun, 17 Apr 2011 00:53:21 -0600 Subject: [libxml-devel] Does the libxml ruby support ruby 1.9? or when will it support it? In-Reply-To: References: Message-ID: <4DAA8E61.7060909@savagexi.com> The new 2.0.0 release adds in support for Ruby 1.9's encoding changes. Give it a try! Charlie On 11/3/2010 12:01 AM, Anurag Priyam wrote: >> I'm using ruby 1.8.7 and going to port to ruby 1.9.2. I'd like to confirm >> that whether current libxml support ruby 1.9. > > libxml has not been tested against Ruby 1.9.2. The issue tracker shows > a couple of bugs specific to ruby 1.9.2. There have been efforts by > some developers on Github to fix such bugs, but, no general plan to > move towards 1.9.2. The current maintainers seem to be very busy or on > a long break. Contributions would be highly appreciated :). > > -- Charlie Savage http://cfis.savagexi.com From cfis at savagexi.com Sun Apr 17 02:52:52 2011 From: cfis at savagexi.com (Charlie Savage) Date: Sun, 17 Apr 2011 00:52:52 -0600 Subject: [libxml-devel] Ruby Libxml Code Example - Writing XML Documents In-Reply-To: References: Message-ID: <4DAA8E44.4030707@savagexi.com> Hi Anurag, Do you still have a copy of your tutorial around. Can we put it someplace (github wiki), so other can see it? Thanks, Charlie On 5/19/2010 2:44 PM, Anurag Priyam wrote: > Composing an XML document with ruby libxml is quite intuitive. Does not > actually need a tutorial; API docs are sufficient. Still I have provided > a code example[1] on writing creating XML with ruby libxml. I hope that > people will find it useful. > > [1] > http://anurag-priyam.blogspot.com/2010/05/ruby-libxml-tutorial-writing-xml.html > > -- > Anurag Priyam, > 2nd Year Undergraduate, > Department of Mechanical Engineering, > IIT Kharagpur. > +91-9775550642 -- Charlie Savage http://cfis.savagexi.com From anurag08priyam at gmail.com Sun Apr 17 03:41:07 2011 From: anurag08priyam at gmail.com (Anurag Priyam) Date: Sun, 17 Apr 2011 13:11:07 +0530 Subject: [libxml-devel] Ruby Libxml Code Example - Writing XML Documents In-Reply-To: <4DAA8E44.4030707@savagexi.com> References: <4DAA8E44.4030707@savagexi.com> Message-ID: On Sun, Apr 17, 2011 at 12:22 PM, Charlie Savage wrote: > Hi Anurag, > > Do you still have a copy of your tutorial around. ?Can we put it someplace > (github wiki), so other can see it? Done. I have not checked the code against the git head though, and there are certain formatting issues since I simply copy pasted from my paste. -- Anurag Priyam http://about.me/yeban/ From anurag08priyam at gmail.com Sun Apr 17 04:51:51 2011 From: anurag08priyam at gmail.com (Anurag Priyam) Date: Sun, 17 Apr 2011 14:21:51 +0530 Subject: [libxml-devel] Ruby Libxml Code Example - Writing XML Documents In-Reply-To: References: <4DAA8E44.4030707@savagexi.com> Message-ID: > Done. I have not checked the code against the git head though, and > there are certain formatting issues since I simply copy pasted from my > paste. Fixed most of the markup issues. [1] https://github.com/xml4r/libxml-ruby/wiki/Using-the-Reader-API [2] https://github.com/xml4r/libxml-ruby/wiki/Writing-XML-Documents -- Anurag Priyam http://about.me/yeban/ From cfis at savagexi.com Sun Apr 17 05:13:49 2011 From: cfis at savagexi.com (Charlie Savage) Date: Sun, 17 Apr 2011 03:13:49 -0600 Subject: [libxml-devel] Ruby Libxml Code Example - Writing XML Documents In-Reply-To: References: <4DAA8E44.4030707@savagexi.com> Message-ID: <4DAAAF4D.6000503@savagexi.com> Excellent! Charlie On 4/17/2011 2:51 AM, Anurag Priyam wrote: >> Done. I have not checked the code against the git head though, and >> there are certain formatting issues since I simply copy pasted from my >> paste. > > Fixed most of the markup issues. > > [1] https://github.com/xml4r/libxml-ruby/wiki/Using-the-Reader-API > [2] https://github.com/xml4r/libxml-ruby/wiki/Writing-XML-Documents > > -- Charlie Savage http://cfis.savagexi.com From anurag08priyam at gmail.com Sun Apr 17 09:22:32 2011 From: anurag08priyam at gmail.com (Anurag Priyam) Date: Sun, 17 Apr 2011 18:52:32 +0530 Subject: [libxml-devel] gh-pages Message-ID: Hey Charlie, I have published the modifications to the site as gh-pages[1], and made some small changes to make publishing site easier, and handle rdoc correctly. Publishing website as gh-pages is now super simple: $ rake rdoc; rake publish or just, $ rake publish_with_docs Since the changes (see the last 3 commits) were minor, I directly merged them into the tree. I hope it doesn't break libxml.rubyforge.org. Also, I was wondering if it makes sense to have both gh-pages, and the rubyforge site. Since, my efforts are directed at the former, I will prefer gh-pages. But, if you think that rubyforge is better, I am willing to rollback the changes. Let me know what you think. [1] http://xml4r.github.com/libxml-ruby/ P.S. : You, and trans must have got a lot of github page build messages. I am so sorry about that :(. -- Anurag Priyam http://about.me/yeban/ From transfire at gmail.com Sun Apr 17 12:42:34 2011 From: transfire at gmail.com (Trans) Date: Sun, 17 Apr 2011 12:42:34 -0400 Subject: [libxml-devel] gh-pages In-Reply-To: References: Message-ID: On Sun, Apr 17, 2011 at 9:22 AM, Anurag Priyam wrote: > Since the changes (see the last 3 commits) were minor, I directly > merged them into the tree. I hope it doesn't break > libxml.rubyforge.org. I imagine at this point it wouldn't be a big deal just to delete the RubyForge project altogether. I know Tom Copeland talked about converting RubyForge to RedMine (or was it another framework?) But it doesn't look like it's going to happen, so at this point I think it fair to view RubyForge as legacy. ~trans From cfis at savagexi.com Sun Apr 17 16:34:48 2011 From: cfis at savagexi.com (Charlie Savage) Date: Sun, 17 Apr 2011 14:34:48 -0600 Subject: [libxml-devel] gh-pages In-Reply-To: References: Message-ID: <4DAB4EE8.9000706@savagexi.com> Hi Anurag, > I have published the modifications to the site as gh-pages[1], and > made some small changes to make publishing site easier, and handle > rdoc correctly. > > Publishing website as gh-pages is now super simple: > $ rake rdoc; rake publish > or just, > $ rake publish_with_docs Yeah, I've been struggling with this. First, grancher doesn't work on windows. Second, when I try it on Linux I get a dialog box that asks me for a user name password (although I have public ssh keys setup for github). So, any help appreciated - I spent a couple of fruitless hours last night trying to figure it out (and what is gh-pages anyway, a github specific thing I assume)? > > Since the changes (see the last 3 commits) were minor, I directly > merged them into the tree. I hope it doesn't break > libxml.rubyforge.org. Sure no problem. I'd like to move the rdoc to gihub. Then I'd also like this page: http://libxml.rubyforge.org/ To redirect to this page: http://xml4r.github.com/libxml-ruby/ Not sure how to do that yet... > Also, I was wondering if it makes sense to have both gh-pages, and the > rubyforge site. Since, my efforts are directed at the former, I will > prefer gh-pages. But, if you think that rubyforge is better, I am > willing to rollback the changes. Let me know what you think. > > [1] http://xml4r.github.com/libxml-ruby/ Yup, agreed... > > P.S. : You, and trans must have got a lot of github page build > messages. I am so sorry about that :(. Hmm, I didn't see anything come my way actually. Charlie From transfire at gmail.com Sun Apr 17 19:26:12 2011 From: transfire at gmail.com (Trans) Date: Sun, 17 Apr 2011 19:26:12 -0400 Subject: [libxml-devel] gh-pages In-Reply-To: <4DAB4EE8.9000706@savagexi.com> References: <4DAB4EE8.9000706@savagexi.com> Message-ID: On Sun, Apr 17, 2011 at 4:34 PM, Charlie Savage wrote: > Yeah, I've been struggling with this. ?First, grancher doesn't work on > windows. ?Second, when I try it on Linux I get a dialog box that asks me for > a user name password (although I have public ssh keys setup for github). Grancher is failing on 1.9 too. And I use it a lot :-( I've posted an issue sometime ago, but no word. I'm starting to think the project has been abandoned. It might be time to find a new tool that does the same thing. Anyone know of one? > So, any help appreciated - I spent a couple of fruitless hours last night > trying to figure it out (and what is gh-pages anyway, a github specific > thing I assume)? Yes, it is the a special git branch in which one puts a project's web-pages so they show up at http://project-name.github.com. I think it's a terrible design, but as much as I've begged and pleaded for a simple subdirectory approach the github folks won't budge. (You see Linus setup git's official website this way, so this silly design has somehow become sacrosanct). ~trans From cfis at savagexi.com Mon Apr 18 00:50:16 2011 From: cfis at savagexi.com (Charlie Savage) Date: Sun, 17 Apr 2011 22:50:16 -0600 Subject: [libxml-devel] Release 2.0.1 At Long Last! Message-ID: <4DABC308.5000401@savagexi.com> Its been a long time coming, but we are happy to announce the release of libxml-ruby version 2.0.1. The big change in this release is full support for Ruby 1.9.2. Strings that are returned from libxml-ruby have their encodings set to the encoding of the underlying xml document. Ruby 1.8.* is also still fully supported. This release also includes a number of enhancements and fixes that have built up over the last two years. We've gone out and merged in almost all the patches the community has sent it. Note that libxml-ruby now lives on GitHub at: https://github.com/xml4r/libxml-ruby Please fork that repository, and report any issues to that project. Enhancements include: * Fully Ruby 1.9.2 support (see above) * Fat binary support for Windows users * Add support for setting attribute namespaces. * Rubinius support. * Modernized Gem structure, including a gemspec file, new publish tasks, updated documentation tasks and use of Rake compiler. Bug fixes include: * Fix bug that caused segmentation fault when calling an invalid XPath expression twice in a row. * Remove references to passing blocks to Reader validation functions since the blocks have been replaced by global error handling. * Fix up incorrect comments in Document#node_type and Node#node_type methods. * Fix memory leak in Reader#expand, Reader#read_string, Reader#read_inner_xml and Reader#read_outer_xml. * Fix Node#space_preserve= (it was backwards). * Fix up memory leak in SAX parser. So give the new release a try, and let us know how it works for you! Thanks, Charlie From anurag08priyam at gmail.com Mon Apr 18 02:07:47 2011 From: anurag08priyam at gmail.com (Anurag Priyam) Date: Mon, 18 Apr 2011 11:37:47 +0530 Subject: [libxml-devel] gh-pages In-Reply-To: <4DAB4EE8.9000706@savagexi.com> References: <4DAB4EE8.9000706@savagexi.com> Message-ID: >> Since the changes (see the last 3 commits) were minor, I directly >> merged them into the tree. I hope it doesn't break >> libxml.rubyforge.org. > > Sure no problem. ?I'd like to move the rdoc to gihub. Cool. I have already moved the rdoc to github. >> Also, I was wondering if it makes sense to have both gh-pages, and the >> rubyforge site. Since, my efforts are directed at the former, I will >> prefer gh-pages. But, if you think that rubyforge is better, I am >> willing to rollback the changes. Let me know what you think. >> >> [1] http://xml4r.github.com/libxml-ruby/ > > Yup, agreed... I will update README to reflect that, and few more changes. >> P.S. : You, and trans must have got a lot of github page build >> messages. I am so sorry about that :(. > > Hmm, I didn't see anything come my way actually. Peace. You must have disabled the page build notifications then :). -- Anurag Priyam http://about.me/yeban/ From anurag08priyam at gmail.com Mon Apr 18 02:12:39 2011 From: anurag08priyam at gmail.com (Anurag Priyam) Date: Mon, 18 Apr 2011 11:42:39 +0530 Subject: [libxml-devel] gh-pages In-Reply-To: References: <4DAB4EE8.9000706@savagexi.com> Message-ID: On Mon, Apr 18, 2011 at 4:56 AM, Trans wrote: > On Sun, Apr 17, 2011 at 4:34 PM, Charlie Savage wrote: > >> Yeah, I've been struggling with this. ?First, grancher doesn't work on >> windows. ?Second, when I try it on Linux I get a dialog box that asks me for >> a user name password (although I have public ssh keys setup for github). > > Grancher is failing on 1.9 too. And I use it a lot :-( I've posted an > issue sometime ago, but no word. I'm starting to think the project has > been abandoned. It might be time to find a new tool that does the same > thing. Anyone know of one? Or maybe (fork and) patch Grancher? The code looks pretty simple. >> So, any help appreciated - I spent a couple of fruitless hours last night >> trying to figure it out (and what is gh-pages anyway, a github specific >> thing I assume)? > > Yes, it is the a special git branch in which one puts a project's > web-pages so they show up at http://project-name.github.com. I think > it's a terrible design, but as much as I've begged and pleaded for a > simple subdirectory approach the github folks won't budge. (You see > Linus setup git's official website this way, so this silly design has > somehow become sacrosanct). Its actually http://user-name.github.com/project-name. I like the idea :). Why do you think it is a terrible design? -- Anurag Priyam http://about.me/yeban/ From anurag08priyam at gmail.com Mon Apr 18 03:52:30 2011 From: anurag08priyam at gmail.com (Anurag Priyam) Date: Mon, 18 Apr 2011 13:22:30 +0530 Subject: [libxml-devel] gh-pages In-Reply-To: References: <4DAB4EE8.9000706@savagexi.com> Message-ID: > I will update README to reflect that, and few more changes. Done. Changed the issues link to point to the github one too. -- Anurag Priyam http://about.me/yeban/ From ast at atownley.org Mon Apr 18 05:12:57 2011 From: ast at atownley.org (Andrew S. Townley) Date: Mon, 18 Apr 2011 10:12:57 +0100 Subject: [libxml-devel] Release 2.0.1 At Long Last! In-Reply-To: <4DABC308.5000401@savagexi.com> References: <4DABC308.5000401@savagexi.com> Message-ID: <007CB3D3-8312-483C-809A-AA042DBF7C42@atownley.org> Hi Charlie & the rest of the libxml team: On 18 Apr 2011, at 5:50 AM, Charlie Savage wrote: > Its been a long time coming, but we are happy to announce the release of libxml-ruby version 2.0.1. > > The big change in this release is full support for Ruby 1.9.2. Strings that are returned from libxml-ruby have their encodings set to the encoding of the underlying xml document. Ruby 1.8.* is also still fully supported. > > This release also includes a number of enhancements and fixes that have built up over the last two years. We've gone out and merged in almost all the patches the community has sent it. Just wanted to say a huge "thank you" for this release as it includes a fix for my problem of segfaults during exceptions thrown in SAX handler methods. This makes a huge difference in stability for my installed applications, and I can now remove the workarounds I'd had to put in place. Kudos on the latest release! :) ast -- Andrew S. Townley http://atownley.org From cfis at savagexi.com Mon Apr 18 14:19:11 2011 From: cfis at savagexi.com (Charlie Savage) Date: Mon, 18 Apr 2011 12:19:11 -0600 Subject: [libxml-devel] Release 2.0.1 At Long Last! In-Reply-To: <007CB3D3-8312-483C-809A-AA042DBF7C42@atownley.org> References: <4DABC308.5000401@savagexi.com> <007CB3D3-8312-483C-809A-AA042DBF7C42@atownley.org> Message-ID: <4DAC809F.8040703@savagexi.com> > Just wanted to say a huge "thank you" for this release as it includes a fix for my problem of segfaults during exceptions thrown in SAX handler methods. This makes a huge difference in stability for my installed applications, and I can now remove the workarounds I'd had to put in place. > > Kudos on the latest release! :) Excellent. I think the kudos go to Alexey I. Froloff with this commit: 790da59bf62482e3e1e1f39e0d0da02a5b5837c6 Thanks, Charlie From noreply at rubyforge.org Mon Apr 18 14:29:19 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 18 Apr 2011 14:29:19 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-28671 ] XML::Node.space_preserve= works backwards Message-ID: <20110418182920.B35E91858361@rubyforge.org> Bugs item #28671, was opened at 2010-10-26 09:12 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28671&group_id=494 Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Dudley Flanders (dudleyf) >Assigned to: Charlie Savage (cfis) Summary: XML::Node.space_preserve= works backwards Initial Comment: XML::Node.space_preserve=false sets a Node's whitespace preserving to true. It should probably be the other way around. I've forked the repo on github and fixed it: http://github.com/dudleyf/libxml-ruby/commit/6369ba71353d081f9357041e2b62c5b96eb01873 ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-18 12:29 Message: Thanks for the report - this has been fixed in the latest release. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28671&group_id=494 From noreply at rubyforge.org Mon Apr 18 14:30:13 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 18 Apr 2011 14:30:13 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-26014 ] [PATCH] Fixes memory leak in Reader#read_string Message-ID: <20110418183013.2D71C1858363@rubyforge.org> Bugs item #26014, was opened at 2009-05-24 20:37 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=26014&group_id=494 Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: John Douthat (jdouthat) >Assigned to: Charlie Savage (cfis) Summary: [PATCH] Fixes memory leak in Reader#read_string Initial Comment: I neglected to attach this patch in the bug report and couldn't find out how to attach it after the fact ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-18 12:30 Message: Thanks for the report - this has been fixed in the latest release. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=26014&group_id=494 From noreply at rubyforge.org Mon Apr 18 14:33:35 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 18 Apr 2011 14:33:35 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-28553 ] OSX, MacPorts libxml2 2.7.7, libxml-ruby 1.1.4 & 1.1.3, gem check -t fails with respond_to?' called on terminated object Message-ID: <20110418183336.928DA1858361@rubyforge.org> Bugs item #28553, was opened at 2010-09-09 11:49 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28553&group_id=494 Category: General Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: David Martinez (hackerdude) >Assigned to: Charlie Savage (cfis) Summary: OSX, MacPorts libxml2 2.7.7, libxml-ruby 1.1.4 & 1.1.3, gem check -t fails with respond_to?' called on terminated object Initial Comment: See attached results, essentially nothing works, with things like: This is with the 2.7.7 macports compile which works fine on the macports side. Production machines that work fine are Linux and using 2.6.26 Libxml2 and libxml-ruby 1.1.4. Haven't tried 2.7.7 on linux ------ gem check -t results ------ Error: Undefined namespace prefix. xmlXPathEval: evaluation failed Failure: test_enabled_thread(TestXml) [./test/tc_xml.rb:176]: expected but was . Node#child_add is deprecated. Use Node#<< instead. Error: Element 'invalid': This element is not expected. Expected is ( item ).. Failure: test_noexistent_file(TestSaxParser) [./test/tc_sax_parser.rb:137]: <"Warning: failed to load external entity \i_dont_exist.xml\."> expected but was <"Error: Element 'invalid': This element is not expected. Expected is ( item )..">. Failure: test_parse_error(TestSaxParser) [./test/tc_sax_parser.rb:244]: exception expected but was Class: Message: <"method `on_error' called on terminated object (0x7fff70c6f230)"> ---Backtrace--- ./test/tc_sax_parser.rb:245:in `parse' ./test/tc_sax_parser.rb:245:in `test_parse_error' ./test/tc_sax_parser.rb:244:in `test_parse_error' --------------- Failure: test_parse_warning(TestSaxParser) [./test/tc_sax_parser.rb:228]: <"error: Warning: xmlParsePITarget: invalid name prefix 'xml' at :2."> expected but was <"pi: xml-invalid ">. Node#child_add is deprecated. Use Node#<< instead. Error: Did not expect element invalid there. set_error_handler is deprecated. Use Error.set_handler instead Failure: test_deprecated_error_handler(TestReader) [./test/tc_reader.rb:112]: exception expected but was Class: Message: <"method `respond_to?' called on terminated object (0x7fff70c6f230)"> ---Backtrace--- ./test/tc_reader.rb:113:in `read' ./test/tc_reader.rb:113:in `test_deprecated_error_handler' ./test/tc_reader.rb:112:in `test_deprecated_error_handler' --------------- set_error_handler is deprecated. Use Error.set_handler instead reset_error_handler is deprecated. Use Error.reset_handler instead Failure: test_deprecated_reset_error_handler(TestReader) [./test/tc_reader.rb:127]: exception expected but was Class: Message: <"method `respond_to?' called on terminated object (0x7fff70c6f230)"> ---Backtrace--- ./test/tc_reader.rb:128:in `read' ./test/tc_reader.rb:128:in `test_deprecated_reset_error_handler' ./test/tc_reader.rb:127:in `test_deprecated_reset_error_handler' --------------- Failure: test_error(TestReader) [./test/tc_reader.rb:99]: exception expected but was Class: Message: <"method `respond_to?' called on terminated object (0x7fff70c6f230)"> ---Backtrace--- ./test/tc_reader.rb:100:in `read' ./test/tc_reader.rb:100:in `test_error' ./test/tc_reader.rb:99:in `test_error' --------------- ruby(7638) malloc: *** error for object 0x1007bfae0: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Abort trap ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-18 12:33 Message: Thanks for the report. This should be fixed in the latest release. Charlie ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28553&group_id=494 From noreply at rubyforge.org Mon Apr 18 14:34:16 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 18 Apr 2011 14:34:16 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-27081 ] Segmentation Fault with Ruby1.9.1 Message-ID: <20110418183416.DDD041858361@rubyforge.org> Bugs item #27081, was opened at 2009-09-09 23:39 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27081&group_id=494 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Kenji Takahashi (azamew) Assigned to: Nobody (None) Summary: Segmentation Fault with Ruby1.9.1 Initial Comment: I encountered segmentation fault when I used LibXML-ruby with Ruby 1.9.1. My environment is as follows: OS: Windows XP Professional SP2 Ruby: ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mswin32] LibXml-ruby: 1.1.3 I can reproduce error just running ruby script which only require 'xml'. I can run libxml-ruby successfully with ruby 1.8.6 and 1.8.7. Following is the error message: ============================================================ C:/ruby19/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3-x86-mswin32-60/lib/libxml_r uby.so: [BUG] Segmentation fault ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mswin32] -- control frame ---------- c:0011 p:-2605816 s:0028 b:0028 l:000027 d:000027 TOP c:0010 p:---- s:0026 b:0026 l:000025 d:000025 CFUNC :require c:0009 p:0072 s:0022 b:0022 l:000021 d:000021 TOP C:/ruby19/lib/ruby/gems/1.9 .1/gems/libxml-ruby-1.1.3-x86-mswin32-60/lib/libxml.rb:9 c:0008 p:---- s:0020 b:0020 l:000019 d:000019 FINISH c:0007 p:---- s:0018 b:0018 l:000017 d:000017 CFUNC :require c:0006 p:0011 s:0014 b:0014 l:000013 d:000013 TOP C:/ruby19/lib/ruby/gems/1.9 .1/gems/libxml-ruby-1.1.3-x86-mswin32-60/lib/xml.rb:11 c:0005 p:---- s:0012 b:0012 l:000011 d:000011 FINISH c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :require c:0003 p:0011 s:0006 b:0006 l:001fb4 d:002484 EVAL test.rb:1 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:0000 s:0002 b:0002 l:001fb4 d:001fb4 TOP
:33 --------------------------- -- Ruby level backtrace information----------------------------------------- C:/ruby19/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3-x86-mswin32-60/lib/libxml.rb:9:in `require' C:/ruby19/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3-x86-mswin32-60/lib/libxml.rb:9:in `' C:/ruby19/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3-x86-mswin32-60/lib/xml.rb:11:in `require' C:/ruby19/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3-x86-mswin32-60/lib/xml.rb:11:in `' test.rb:1:in `require' test.rb:1:in `
' [NOTE] You may encounter a bug of Ruby interpreter. Bug reports are welcome. For details: http://www.ruby-lang.org/bugreport.html This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. ============================================================ Could you repair this issue? ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-18 12:34 Message: Could you try this again with the latest release? Thanks - Charlie ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27081&group_id=494 From noreply at rubyforge.org Mon Apr 18 14:35:18 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 18 Apr 2011 14:35:18 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-28611 ] libxml 1.1.4 segfaults with ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux] Message-ID: <20110418183518.497ED1858361@rubyforge.org> Bugs item #28611, was opened at 2010-10-01 14:50 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28611&group_id=494 Category: None Group: None Status: Open >Resolution: Accepted Priority: 3 Submitted By: sriram raghuraman (sriram201) >Assigned to: Charlie Savage (cfis) Summary: libxml 1.1.4 segfaults with ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux] Initial Comment: ruby check.rb /usr/local/brl/local/lib/ruby/site_ruby/1.8/libxml/parser.rb:33: [BUG] Segmentation fault ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux] Aborted check.rb contains require 'xml' XML::Document.file("temp.xml") temp.xml contains - RUBYGEMS VERSION: 1.3.7 - RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux] ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-18 12:35 Message: Could you try this again with the latest release - hopefully is fixed. Thanks - Charlie ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28611&group_id=494 From noreply at rubyforge.org Mon Apr 18 14:37:02 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 18 Apr 2011 14:37:02 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-26093 ] typo in RDoc Message-ID: <20110418183702.6ACE71858363@rubyforge.org> Bugs item #26093, was opened at 2009-06-01 19:15 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=26093&group_id=494 Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Eugene Mikhailov (kvink) >Assigned to: Charlie Savage (cfis) Summary: typo in RDoc Initial Comment: Explanation of LibXML::XML::Node#doctype? is "Specifies if this is an docbook node". I think this is wrong. ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-18 12:37 Message: Thanks for letting us know - this has been fixed in the latest release. Charlie ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=26093&group_id=494 From noreply at rubyforge.org Mon Apr 18 14:37:43 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 18 Apr 2011 14:37:43 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-26013 ] Memory leak in Reader#read_string Message-ID: <20110418183743.9A8F01858363@rubyforge.org> Bugs item #26013, was opened at 2009-05-24 20:34 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=26013&group_id=494 Category: memory Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Nobody (None) >Assigned to: Charlie Savage (cfis) Summary: Memory leak in Reader#read_string Initial Comment: I use libxml when I need to parse very large xml files. When pulling text from reader nodes, I usually navigate to the text node, read it's `.value` and skip its closing tag. On a new project, though, I tried using reader.read_string reader.next But, I noticed that it leaked a ton of memory. For example, after parsing a 64MB XML file, Ruby was using 611MB of RAM. After applying this patch, Ruby used less than 10MB to parse the file. ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-18 12:37 Message: Thanks for the report. This has been fixed in the latest release. Charlie ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=26013&group_id=494 From noreply at rubyforge.org Mon Apr 18 14:38:19 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 18 Apr 2011 14:38:19 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-26297 ] Reader#expand leaking memory? Message-ID: <20110418183819.77D331858372@rubyforge.org> Bugs item #26297, was opened at 2009-06-20 11:38 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=26297&group_id=494 Category: memory Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Nobody (None) >Assigned to: Charlie Savage (cfis) Summary: Reader#expand leaking memory? Initial Comment: Hi, I'm trying to use libxml-ruby to parse ~250MB XML files. The files contain list of similar elements, so I'm iterating over each element doing reader.expand on it. The problem is that even if I run GC.start after expanding each element, the script eats up all available memory and eventually dies. It seems that the memory is freed up only on reader.close. Here's small test case - https://gist.github.com/3d3270abf62370317809 There are 3 scripts: the first one generates 2 XML files with list of nodes - shorter file (~100KB) has only one element in the list, longer one (~100MB) has 1000 elements. The second script parses short XML file 1000 times and uses constant amount of memory. The third script parses long XML file only once and uses up all available memory. ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-18 12:38 Message: Thanks for the report. This has been fixed in the latest release. Charlie ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=26297&group_id=494 From noreply at rubyforge.org Thu Apr 21 09:46:49 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 21 Apr 2011 09:46:49 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-29140 ] segfaults randomly Message-ID: <20110421134650.02850185835A@rubyforge.org> Bugs item #29140, was opened at 2011-04-21 15:46 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=29140&group_id=494 Category: memory Group: None Status: Open Resolution: None Priority: 3 Submitted By: James Pharaoh (jamespharaoh) Assigned to: Nobody (None) Summary: segfaults randomly Initial Comment: I am getting segfaults pretty regularly in my ruby 1.9.1 webrick application. They are always in a block which is accessing libxml nodes. Here's an example, I can add more as I get them, or provide any other help solving this. I don't really know where to start. /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/home.rb:15: [BUG] Segmentation fault ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux] -- control frame ---------- c:0019 p:---- s:0088 b:0088 l:000087 d:000087 CFUNC :[] c:0018 p:0015 s:0084 b:0084 l:000074 d:000083 BLOCK /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/home.rb:15 c:0017 p:---- s:0080 b:0080 l:000079 d:000079 FINISH c:0016 p:---- s:0078 b:0078 l:000077 d:000077 CFUNC :sort! c:0015 p:0063 s:0075 b:0075 l:000074 d:000074 METHOD /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/home.rb:15 c:0014 p:0188 s:0069 b:0069 l:000068 d:000068 METHOD /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/consolehandler.rb:10 c:0013 p:0078 s:0062 b:0062 l:000620 d:000061 BLOCK /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/server.rb:92 c:0012 p:---- s:0059 b:0059 l:000058 d:000058 FINISH c:0011 p:---- s:0057 b:0057 l:000056 d:000056 CFUNC :catch c:0010 p:0148 s:0053 b:0053 l:000620 d:002360 BLOCK /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/server.rb:86 c:0009 p:---- s:0048 b:0048 l:000047 d:000047 FINISH c:0008 p:---- s:0046 b:0046 l:000045 d:000045 CFUNC :call c:0007 p:0017 s:0041 b:0041 l:000040 d:000040 METHOD /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/server.rb:16 c:0006 p:0056 s:0036 b:0036 l:000035 d:000035 METHOD /usr/lib/ruby/1.9.1/webrick/httpservlet/abstract.rb:35 c:0005 p:0257 s:0030 b:0030 l:000029 d:000029 METHOD /usr/lib/ruby/1.9.1/webrick/httpserver.rb:111 c:0004 p:0393 s:0020 b:0020 l:000019 d:000019 METHOD /usr/lib/ruby/1.9.1/webrick/httpserver.rb:70 c:0003 p:0126 s:0009 b:0009 l:000c18 d:000008 BLOCK /usr/lib/ruby/1.9.1/webrick/server.rb:183 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:---- s:0002 b:0002 l:000001 d:000001 TOP --------------------------- -- Ruby level backtrace information ---------------------------------------- /usr/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread' /usr/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run' /usr/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service' /usr/lib/ruby/1.9.1/webrick/httpservlet/abstract.rb:35:in `service' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/server.rb:16:in `do_GET' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/server.rb:16:in `call' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/server.rb:86:in `block in run' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/server.rb:86:in `catch' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/server.rb:92:in `block (2 levels) in run' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/consolehandler.rb:10:in `handle' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/home.rb:15:in `handle' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/home.rb:15:in `sort!' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/home.rb:15:in `block in handle' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/home.rb:15:in `[]' *** glibc detected *** ruby1.9.1: malloc(): memory corruption: 0x000000000325bc00 *** ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=29140&group_id=494 From noreply at rubyforge.org Fri Apr 22 23:23:33 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 22 Apr 2011 23:23:33 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-29140 ] segfaults randomly Message-ID: <20110423032333.EDB941858367@rubyforge.org> Bugs item #29140, was opened at 2011-04-21 07:46 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=29140&group_id=494 Category: memory Group: None Status: Open Resolution: None Priority: 3 Submitted By: James Pharaoh (jamespharaoh) Assigned to: Nobody (None) Summary: segfaults randomly Initial Comment: I am getting segfaults pretty regularly in my ruby 1.9.1 webrick application. They are always in a block which is accessing libxml nodes. Here's an example, I can add more as I get them, or provide any other help solving this. I don't really know where to start. /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/home.rb:15: [BUG] Segmentation fault ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux] -- control frame ---------- c:0019 p:---- s:0088 b:0088 l:000087 d:000087 CFUNC :[] c:0018 p:0015 s:0084 b:0084 l:000074 d:000083 BLOCK /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/home.rb:15 c:0017 p:---- s:0080 b:0080 l:000079 d:000079 FINISH c:0016 p:---- s:0078 b:0078 l:000077 d:000077 CFUNC :sort! c:0015 p:0063 s:0075 b:0075 l:000074 d:000074 METHOD /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/home.rb:15 c:0014 p:0188 s:0069 b:0069 l:000068 d:000068 METHOD /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/consolehandler.rb:10 c:0013 p:0078 s:0062 b:0062 l:000620 d:000061 BLOCK /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/server.rb:92 c:0012 p:---- s:0059 b:0059 l:000058 d:000058 FINISH c:0011 p:---- s:0057 b:0057 l:000056 d:000056 CFUNC :catch c:0010 p:0148 s:0053 b:0053 l:000620 d:002360 BLOCK /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/server.rb:86 c:0009 p:---- s:0048 b:0048 l:000047 d:000047 FINISH c:0008 p:---- s:0046 b:0046 l:000045 d:000045 CFUNC :call c:0007 p:0017 s:0041 b:0041 l:000040 d:000040 METHOD /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/server.rb:16 c:0006 p:0056 s:0036 b:0036 l:000035 d:000035 METHOD /usr/lib/ruby/1.9.1/webrick/httpservlet/abstract.rb:35 c:0005 p:0257 s:0030 b:0030 l:000029 d:000029 METHOD /usr/lib/ruby/1.9.1/webrick/httpserver.rb:111 c:0004 p:0393 s:0020 b:0020 l:000019 d:000019 METHOD /usr/lib/ruby/1.9.1/webrick/httpserver.rb:70 c:0003 p:0126 s:0009 b:0009 l:000c18 d:000008 BLOCK /usr/lib/ruby/1.9.1/webrick/server.rb:183 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:---- s:0002 b:0002 l:000001 d:000001 TOP --------------------------- -- Ruby level backtrace information ---------------------------------------- /usr/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread' /usr/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run' /usr/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service' /usr/lib/ruby/1.9.1/webrick/httpservlet/abstract.rb:35:in `service' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/server.rb:16:in `do_GET' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/server.rb:16:in `call' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/server.rb:86:in `block in run' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/server.rb:86:in `catch' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/server.rb:92:in `block (2 levels) in run' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/consolehandler.rb:10:in `handle' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/home.rb:15:in `handle' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/home.rb:15:in `sort!' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/home.rb:15:in `block in handle' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/home.rb:15:in `[]' *** glibc detected *** ruby1.9.1: malloc(): memory corruption: 0x000000000325bc00 *** ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 21:23 Message: Have you updated to the latest libxml version? What is the ruby code you are using? And what data is it trying to parse? Thanks - Charlie ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=29140&group_id=494 From noreply at rubyforge.org Fri Apr 22 23:32:24 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 22 Apr 2011 23:32:24 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-28770 ] XML::Node.empty? always return false!? Message-ID: <20110423033224.3A5861858367@rubyforge.org> Bugs item #28770, was opened at 2010-12-07 05:28 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28770&group_id=494 Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Tuan Duc Nguyen (ducnguyen) >Assigned to: Charlie Savage (cfis) Summary: XML::Node.empty? always return false!? Initial Comment: It seems that Node.empty? always return false. Or maybe my definition for an empty node was wrong. Example code: XML::Node.new('name').empty? #=> false I'm using ruby 1.9.2 and libxml-ruby 1.1.4. ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 21:32 Message: Actually, the code is correct but the documentation is wrong. From LibXML docs for xmlIsBlankNode (the underlying method). "Checks whether this node is an empty or whitespace only (and possibly ignorable) text-node." So empty? is only true for text nodes. Docs have been updated. Thanks - Charlie ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28770&group_id=494 From noreply at rubyforge.org Fri Apr 22 23:37:14 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 22 Apr 2011 23:37:14 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-28662 ] Segfault assigning document.root when running in thread Message-ID: <20110423033714.919601D780F8@rubyforge.org> Bugs item #28662, was opened at 2010-10-21 13:21 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28662&group_id=494 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Alan Gano (alangano) Assigned to: Nobody (None) Summary: Segfault assigning document.root when running in thread Initial Comment: Gentoo x86_64; ruby 1.9.2; libxml2 2.7.7; libxml-ruby 1.1.3 (gem) ------------------------------------------------------ #!/opt/ruby/bin/ruby192 -w require 'libxml' t1 = Thread.new { 100000.times { |i| document = LibXML::XML::Document.new document.root = LibXML::XML::Node.new('test') } } t1.join ------------------------------------------------------ Segfault is avoided if: - .root assignment is removed - GC.start is called at end of loop - not run in thread - the loop is made to run slower (e.g., printing out i variable) $ ./aa42 ./aa42:8: [BUG] Segmentation fault ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux] -- control frame ---------- c:0007 p:---- s:0021 b:0021 l:000020 d:000020 CFUNC :new c:0006 p:0047 s:0017 b:0015 l:002258 d:000014 BLOCK ./aa42:8 c:0005 p:---- s:0011 b:0011 l:000010 d:000010 FINISH c:0004 p:---- s:0009 b:0009 l:000008 d:000008 CFUNC :times c:0003 p:0010 s:0006 b:0006 l:002258 d:000005 BLOCK ./aa42:6 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:---- s:0002 b:0002 l:000001 d:000001 TOP --------------------------- -- Ruby level backtrace information ---------------------------------------- ./aa42:6:in `block in
' ./aa42:6:in `times' ./aa42:8:in `block (2 levels) in
' ./aa42:8:in `new' -- C level backtrace information ------------------------------------------- /opt/ruby/bin/ruby192(rb_vm_bugreport+0x9e) [0x51e10e] /opt/ruby/bin/ruby192() [0x55e700] /opt/ruby/bin/ruby192(rb_bug+0xb1) [0x55e8a1] /opt/ruby/bin/ruby192() [0x4af468] /lib/libpthread.so.0(+0xf010) [0x7fb5d3894010] /lib/libc.so.6(+0x73ddf) [0x7fb5d2cdaddf] /lib/libc.so.6(cfree+0x6c) [0x7fb5d2cde71c] /usr/lib/libxml2.so.2(xmlFreeDoc+0x16b) [0x7fb5d214134b] /opt/ruby/bin/ruby192() [0x423aa4] /opt/ruby/bin/ruby192(rb_gc_finalize_deferred+0x31) [0x424081] /opt/ruby/bin/ruby192() [0x520795] /opt/ruby/bin/ruby192() [0x515437] /opt/ruby/bin/ruby192(rb_funcall+0xf3) [0x519b43] /opt/ruby/bin/ruby192(rb_obj_alloc+0x52) [0x452252] /opt/ruby/bin/ruby192(rb_class_new_instance+0x20) [0x452390] /opt/ruby/bin/ruby192() [0x50e0f1] /opt/ruby/bin/ruby192() [0x50f7d6] /opt/ruby/bin/ruby192() [0x514189] /opt/ruby/bin/ruby192(rb_yield+0x66) [0x51c3f6] /opt/ruby/bin/ruby192() [0x449851] /opt/ruby/bin/ruby192() [0x50e0f1] /opt/ruby/bin/ruby192() [0x50f7d6] /opt/ruby/bin/ruby192() [0x514189] /opt/ruby/bin/ruby192(rb_vm_invoke_proc+0xa1) [0x51a9d1] /opt/ruby/bin/ruby192() [0x524b41] /opt/ruby/bin/ruby192() [0x524bfe] /lib/libpthread.so.0(+0x6894) [0x7fb5d388b894] /lib/libc.so.6(clone+0x6d) [0x7fb5d2d3827d] [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 Aborted $ ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 21:37 Message: Hi Alan, I can't reproduce this using the latest release along with libxml 2.7.8. I've added this as a test case in the test suite. Can you check with the latest libxml-ruby release? Thans - Charlie ---------------------------------------------------------------------- Comment By: Alan Gano (alangano) Date: 2010-10-21 13:25 Message: It seems that gem is listing the libxml-ruby version as 1.1.4, which is not on your download page(?). I have manually installed 1.1.3 (from gem and then from source) and gotten the same result. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28662&group_id=494 From noreply at rubyforge.org Fri Apr 22 23:37:33 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 22 Apr 2011 23:37:33 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-28662 ] Segfault assigning document.root when running in thread Message-ID: <20110423033733.BFE9D1858367@rubyforge.org> Bugs item #28662, was opened at 2010-10-21 13:21 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28662&group_id=494 Category: None Group: None Status: Open >Resolution: Accepted Priority: 3 Submitted By: Alan Gano (alangano) >Assigned to: Charlie Savage (cfis) Summary: Segfault assigning document.root when running in thread Initial Comment: Gentoo x86_64; ruby 1.9.2; libxml2 2.7.7; libxml-ruby 1.1.3 (gem) ------------------------------------------------------ #!/opt/ruby/bin/ruby192 -w require 'libxml' t1 = Thread.new { 100000.times { |i| document = LibXML::XML::Document.new document.root = LibXML::XML::Node.new('test') } } t1.join ------------------------------------------------------ Segfault is avoided if: - .root assignment is removed - GC.start is called at end of loop - not run in thread - the loop is made to run slower (e.g., printing out i variable) $ ./aa42 ./aa42:8: [BUG] Segmentation fault ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux] -- control frame ---------- c:0007 p:---- s:0021 b:0021 l:000020 d:000020 CFUNC :new c:0006 p:0047 s:0017 b:0015 l:002258 d:000014 BLOCK ./aa42:8 c:0005 p:---- s:0011 b:0011 l:000010 d:000010 FINISH c:0004 p:---- s:0009 b:0009 l:000008 d:000008 CFUNC :times c:0003 p:0010 s:0006 b:0006 l:002258 d:000005 BLOCK ./aa42:6 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:---- s:0002 b:0002 l:000001 d:000001 TOP --------------------------- -- Ruby level backtrace information ---------------------------------------- ./aa42:6:in `block in
' ./aa42:6:in `times' ./aa42:8:in `block (2 levels) in
' ./aa42:8:in `new' -- C level backtrace information ------------------------------------------- /opt/ruby/bin/ruby192(rb_vm_bugreport+0x9e) [0x51e10e] /opt/ruby/bin/ruby192() [0x55e700] /opt/ruby/bin/ruby192(rb_bug+0xb1) [0x55e8a1] /opt/ruby/bin/ruby192() [0x4af468] /lib/libpthread.so.0(+0xf010) [0x7fb5d3894010] /lib/libc.so.6(+0x73ddf) [0x7fb5d2cdaddf] /lib/libc.so.6(cfree+0x6c) [0x7fb5d2cde71c] /usr/lib/libxml2.so.2(xmlFreeDoc+0x16b) [0x7fb5d214134b] /opt/ruby/bin/ruby192() [0x423aa4] /opt/ruby/bin/ruby192(rb_gc_finalize_deferred+0x31) [0x424081] /opt/ruby/bin/ruby192() [0x520795] /opt/ruby/bin/ruby192() [0x515437] /opt/ruby/bin/ruby192(rb_funcall+0xf3) [0x519b43] /opt/ruby/bin/ruby192(rb_obj_alloc+0x52) [0x452252] /opt/ruby/bin/ruby192(rb_class_new_instance+0x20) [0x452390] /opt/ruby/bin/ruby192() [0x50e0f1] /opt/ruby/bin/ruby192() [0x50f7d6] /opt/ruby/bin/ruby192() [0x514189] /opt/ruby/bin/ruby192(rb_yield+0x66) [0x51c3f6] /opt/ruby/bin/ruby192() [0x449851] /opt/ruby/bin/ruby192() [0x50e0f1] /opt/ruby/bin/ruby192() [0x50f7d6] /opt/ruby/bin/ruby192() [0x514189] /opt/ruby/bin/ruby192(rb_vm_invoke_proc+0xa1) [0x51a9d1] /opt/ruby/bin/ruby192() [0x524b41] /opt/ruby/bin/ruby192() [0x524bfe] /lib/libpthread.so.0(+0x6894) [0x7fb5d388b894] /lib/libc.so.6(clone+0x6d) [0x7fb5d2d3827d] [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 Aborted $ ---------------------------------------------------------------------- Comment By: Charlie Savage (cfis) Date: 2011-04-22 21:37 Message: Hi Alan, I can't reproduce this using the latest release along with libxml 2.7.8. I've added this as a test case in the test suite. Can you check with the latest libxml-ruby release? Thans - Charlie ---------------------------------------------------------------------- Comment By: Alan Gano (alangano) Date: 2010-10-21 13:25 Message: It seems that gem is listing the libxml-ruby version as 1.1.4, which is not on your download page(?). I have manually installed 1.1.3 (from gem and then from source) and gotten the same result. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28662&group_id=494 From noreply at rubyforge.org Fri Apr 22 23:38:24 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 22 Apr 2011 23:38:24 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-28611 ] libxml 1.1.4 segfaults with ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux] Message-ID: <20110423033824.E84BF1858367@rubyforge.org> Bugs item #28611, was opened at 2010-10-01 14:50 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28611&group_id=494 Category: None Group: None >Status: Closed Resolution: Accepted Priority: 3 Submitted By: sriram raghuraman (sriram201) Assigned to: Charlie Savage (cfis) Summary: libxml 1.1.4 segfaults with ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux] Initial Comment: ruby check.rb /usr/local/brl/local/lib/ruby/site_ruby/1.8/libxml/parser.rb:33: [BUG] Segmentation fault ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux] Aborted check.rb contains require 'xml' XML::Document.file("temp.xml") temp.xml contains - RUBYGEMS VERSION: 1.3.7 - RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux] ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 21:38 Message: Going ahead and closing - I believe this has been fixed. Thanks - Charlie ---------------------------------------------------------------------- Comment By: Charlie Savage (cfis) Date: 2011-04-18 12:35 Message: Could you try this again with the latest release - hopefully is fixed. Thanks - Charlie ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28611&group_id=494 From noreply at rubyforge.org Fri Apr 22 23:40:17 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 22 Apr 2011 23:40:17 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-28432 ] gem install libxml-ruby <= on windows using Ruby 1.9.1 -- broken Message-ID: <20110423034022.0E8561858367@rubyforge.org> Bugs item #28432, was opened at 2010-07-30 23:18 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28432&group_id=494 Category: General Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Fred Wild (fredwild) >Assigned to: Charlie Savage (cfis) Summary: gem install libxml-ruby <= on windows using Ruby 1.9.1 -- broken Initial Comment: Shouldn't the GEM be fairly self contained, or cite its dependent gems in the event there are any, or cite which compiler and version is needed to successfully build it under major Ruby releases e.g. 1.9.1 Any help greatly appreciated. Thanks; C:\>gem install libxml-ruby Building native extensions. This could take a while... ERROR: Error installing libxml-ruby: ERROR: Failed to build gem native extension. c:/ruby/bin/ruby.exe extconf.rb checking for socket() in -lsocket... no checking for gethostbyname() in -lnsl... no checking for atan() in -lm... yes checking for inflate() in -lz... yes checking for iconv_open() in -liconv... no checking for libiconv_open() in -liconv... yes checking for xmlParseDoc() in -lxml2... no checking for xmlParseDoc() in -llibxml2... yes checking for libxml/xmlversion.h... yes creating extconf.h creating Makefile make gcc -shared -s -o libxml_ruby.so libxml.o ruby_xml.o ruby_xml_attr.o ruby_xml_attributes.o ruby_xml_attr_decl.o ruby_xml_cbg.o ruby_xml_document.o ruby_xml_dtd.o ruby_xml_encoding.o ruby_x ruby_xml_attr.o: In function `rxml_attr_value_get': c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_attr.c:308: undefined reference to `_imp__xmlFree' ruby_xml_document.o: In function `rxml_document_encoding_set': c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_document.c:311: undefined reference to `_imp__xmlFree' ruby_xml_document.o: In function `rxml_document_to_s': c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_document.c:668: undefined reference to `_imp__xmlFree' ruby_xml_dtd.o: In function `rxml_dtd_initialize': c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_dtd.c:234: undefined reference to `_imp__xmlFree' ruby_xml_namespaces.o: In function `rxml_namespaces_each': c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_namespaces.c:134: undefined reference to `_imp__xmlFree' ruby_xml_node.o:c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_node.c:283: more undefined references to `_imp__xmlFree' follow ruby_xml_node.o: In function `rxml_node_output_escaping_q': c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_node.c:1144: undefined reference to `_imp__xmlStringTextNoenc' c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_node.c:1163: undefined reference to `_imp__xmlStringTextNoenc' ruby_xml_node.o: In function `rxml_node_output_escaping_set': c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_node.c:1196: undefined reference to `_imp__xmlStringText' c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_node.c:1196: undefined reference to `_imp__xmlStringTextNoenc' c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_node.c:1191: undefined reference to `_imp__xmlStringText' c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_node.c:1191: undefined reference to `_imp__xmlStringTextNoenc' ruby_xml_parser_context.o: In function `rxml_parser_context_encoding_set': c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_parser_context.c:364: undefined reference to `_imp__xmlFree' ruby_xml_sax_parser.o: In function `rxml_sax_parser_parse': c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_sax_parser.c:103: undefined reference to `_imp__xmlFree' ruby_xml_xpath_context.o: In function `rxml_xpath_context_register_namespaces_from_node': c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_xpath_context.c:164: undefined reference to `_imp__xmlFree' ruby_xml_xpath_object.o: In function `rxml_xpath_object_free': c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_xpath_object.c:40: undefined reference to `_imp__xmlFree' collect2: ld returned 1 exit status make: *** [libxml_ruby.so] Error 1 Gem files will remain installed in c:/ruby/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.4 for inspection. Results logged to c:/ruby/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.4/ext/libxml/gem_make.out ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 21:40 Message: Hi Fred, Looks like the build isn't finding the location of libxml2 libraries. User --with-libxml-lib to specify them. Or install the binary version. Thanks - Charlie ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28432&group_id=494 From noreply at rubyforge.org Fri Apr 22 23:42:04 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 22 Apr 2011 23:42:04 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-28431 ] gem install libxml-ruby < = on windows using Ruby 1.9.1 -- broken Message-ID: <20110423034204.23BB31858367@rubyforge.org> Bugs item #28431, was opened at 2010-07-30 23:18 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28431&group_id=494 Category: General Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Fred Wild (fredwild) >Assigned to: Charlie Savage (cfis) Summary: gem install libxml-ruby <= on windows using Ruby 1.9.1 -- broken Initial Comment: Shouldn't the GEM be fairly self contained, or cite its dependent gems in the event there are any, or cite which compiler and version is needed to successfully build it under major Ruby releases e.g. 1.9.1 Any help greatly appreciated. Thanks; C:\>gem install libxml-ruby Building native extensions. This could take a while... ERROR: Error installing libxml-ruby: ERROR: Failed to build gem native extension. c:/ruby/bin/ruby.exe extconf.rb checking for socket() in -lsocket... no checking for gethostbyname() in -lnsl... no checking for atan() in -lm... yes checking for inflate() in -lz... yes checking for iconv_open() in -liconv... no checking for libiconv_open() in -liconv... yes checking for xmlParseDoc() in -lxml2... no checking for xmlParseDoc() in -llibxml2... yes checking for libxml/xmlversion.h... yes creating extconf.h creating Makefile make gcc -shared -s -o libxml_ruby.so libxml.o ruby_xml.o ruby_xml_attr.o ruby_xml_attributes.o ruby_xml_attr_decl.o ruby_xml_cbg.o ruby_xml_document.o ruby_xml_dtd.o ruby_xml_encoding.o ruby_x ruby_xml_attr.o: In function `rxml_attr_value_get': c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_attr.c:308: undefined reference to `_imp__xmlFree' ruby_xml_document.o: In function `rxml_document_encoding_set': c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_document.c:311: undefined reference to `_imp__xmlFree' ruby_xml_document.o: In function `rxml_document_to_s': c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_document.c:668: undefined reference to `_imp__xmlFree' ruby_xml_dtd.o: In function `rxml_dtd_initialize': c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_dtd.c:234: undefined reference to `_imp__xmlFree' ruby_xml_namespaces.o: In function `rxml_namespaces_each': c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_namespaces.c:134: undefined reference to `_imp__xmlFree' ruby_xml_node.o:c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_node.c:283: more undefined references to `_imp__xmlFree' follow ruby_xml_node.o: In function `rxml_node_output_escaping_q': c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_node.c:1144: undefined reference to `_imp__xmlStringTextNoenc' c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_node.c:1163: undefined reference to `_imp__xmlStringTextNoenc' ruby_xml_node.o: In function `rxml_node_output_escaping_set': c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_node.c:1196: undefined reference to `_imp__xmlStringText' c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_node.c:1196: undefined reference to `_imp__xmlStringTextNoenc' c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_node.c:1191: undefined reference to `_imp__xmlStringText' c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_node.c:1191: undefined reference to `_imp__xmlStringTextNoenc' ruby_xml_parser_context.o: In function `rxml_parser_context_encoding_set': c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_parser_context.c:364: undefined reference to `_imp__xmlFree' ruby_xml_sax_parser.o: In function `rxml_sax_parser_parse': c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_sax_parser.c:103: undefined reference to `_imp__xmlFree' ruby_xml_xpath_context.o: In function `rxml_xpath_context_register_namespaces_from_node': c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_xpath_context.c:164: undefined reference to `_imp__xmlFree' ruby_xml_xpath_object.o: In function `rxml_xpath_object_free': c:/Development/src/libxml-ruby/ext/libxml/ruby_xml_xpath_object.c:40: undefined reference to `_imp__xmlFree' collect2: ld returned 1 exit status make: *** [libxml_ruby.so] Error 1 Gem files will remain installed in c:/ruby/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.4 for inspection. Results logged to c:/ruby/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.4/ext/libxml/gem_make.out ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 21:42 Message: This is a duplicate of #28432. ---------------------------------------------------------------------- Comment By: Fred Wild (fredwild) Date: 2010-07-30 23:20 Message: This trace was in an attempt to build with MinGW ... ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28431&group_id=494 From noreply at rubyforge.org Fri Apr 22 23:44:47 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 22 Apr 2011 23:44:47 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-28198 ] 1.1.4 segfaults with test/tc_sax_parser.rb Message-ID: <20110423034447.C8EDA1858367@rubyforge.org> Bugs item #28198, was opened at 2010-05-13 12:53 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28198&group_id=494 Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Mamoru Tasaka (mtasaka) >Assigned to: Charlie Savage (cfis) Summary: 1.1.4 segfaults with test/tc_sax_parser.rb Initial Comment: With ruby 1.8.6p399 / libxml2 2.7.7 / libxml-ruby-1.1.4 gem running test program test/tc_sax_parser.rb (in libxml-ruby-1.1.4 gem) causes segfault and it seems that segfault is happening in libxml-ruby side. gdb log attached. ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 21:44 Message: Hi Mamoru, This has been fixed in the latest release (I think I applied your patch from a git branch). Thanks for the report and fix! Charlieh ---------------------------------------------------------------------- Comment By: Huzaifa Sidhpurwala (huzaifas) Date: 2011-01-18 23:36 Message: any ETA on this one? ---------------------------------------------------------------------- Comment By: Hans de Graaff (graaff) Date: 2010-12-03 08:30 Message: I've written a patch for this that I can't seem to attach to the bug as a file. Note that even with this patch the test still fails: 1) Failure: test_parse_error(TestSaxParser) [./test/tc_sax_parser.rb:244]: exception expected but was Class: Message: <"undefined method `on_error' for false:FalseClass"> I assume that this is another side-effect of the parsing failing and the remainder of the C method (that should raise the error) not being carried out. I'm not sure if the xmlParseDocument behaviour changed at some point, so I can't really propose a fix for this. Patch inline: --- ext/libxml/ruby_xml_sax_parser.c.~1~ 2010-12-03 15:41:33.849563666 +0100 +++ ext/libxml/ruby_xml_sax_parser.c 2010-12-03 15:42:48.824938521 +0100 @@ -94,6 +94,7 @@ int status; VALUE context = rb_ivar_get(self, CONTEXT_ATTR); xmlParserCtxtPtr ctxt; + xmlSAXHandlerPtr handler = NULL; Data_Get_Struct(context, xmlParserCtxt, ctxt); ctxt->sax2 = 1; @@ -101,15 +102,15 @@ if (ctxt->sax != (xmlSAXHandlerPtr) &xmlDefaultSAXHandler) xmlFree(ctxt->sax); - - ctxt->sax = (xmlSAXHandlerPtr)&rxml_sax_handler; + + /* Provide a copy of our handler to that it can be freed by libxml2. */ + handler = xmlMalloc(sizeof(xmlSAXHandler)); + memcpy(handler, &rxml_sax_handler, sizeof(xmlSAXHandler)); + + ctxt->sax = handler; status = xmlParseDocument(ctxt); - /* IMPORTANT - null the handle to our sax handler - so libxml doesn't try to free it.*/ - ctxt->sax = NULL; - /* Now check the parsing result*/ if (status == -1 || !ctxt->wellFormed) { ---------------------------------------------------------------------- Comment By: Hans de Graaff (graaff) Date: 2010-12-03 07:33 Message: This happens because rxml_sax_parser_parse() in ruby_xml_sax_parser.c set ctxt->sax to a statically defined sax object that cannot be freed, specifically rxml_sax_handler defined in ruby_xml_sax2_handler.c. The code tries to compensate for that by resetting ctxt->sax back to NULL right after parsing, but since the failing test induces a parsing error I guess the object is ctxt object is freed before the ctxt->sax pointer can be reset to NULL. ---------------------------------------------------------------------- Comment By: Mamoru Tasaka (mtasaka) Date: 2010-06-10 12:40 Message: The testcase in http://rubyforge.org/pipermail/libxml-devel/2010-June/001502.html crashes at the same place: (gdb) bt #0 0x00f42416 in __kernel_vsyscall () #1 0x008c8eb1 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #2 0x008ca78a in abort () at abort.c:92 #3 0x0090793d in __libc_message (do_abort=2, fmt=0x9f1ce0 "*** glibc detected *** %s: %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:186 #4 0x0090de91 in malloc_printerr (action=, str=, ptr=0xbcd780) at malloc.c:6283 #5 0x02cee62d in xmlFreeParserCtxt__internal_alias (ctxt=0x82abee0) at parserInternals.c:1797 #6 0x00bbd5ae in rxml_parser_context_free (ctxt=0x82abee0) at ruby_xml_parser_context.c:20 #7 0x067a069e in rb_gc_call_finalizer_at_exit () at gc.c:1988 #8 0x067858c8 in ruby_finalize_1 () at eval.c:1572 #9 0x06791e9b in ruby_cleanup (ex=0) at eval.c:1609 #10 0x06791fce in ruby_stop (ex=0) at eval.c:1664 #11 0x06799206 in ruby_run () at eval.c:1685 #12 0x0804867e in main (argc=3, argv=0xbffff034, envp=0xbffff044) at main.c:48 ---------------------------------------------------------------------- Comment By: Mamoru Tasaka (mtasaka) Date: 2010-05-13 13:09 Message: Note that the attachedd gdb log shows that one other test failure is occuring in the test. For segfault issue, commenting out the line 20 of ./ext/libxml/ruby_xml_parser_context.c seems to stop segfault, however I don't know if this is the desired solution. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28198&group_id=494 From noreply at rubyforge.org Fri Apr 22 23:45:31 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 22 Apr 2011 23:45:31 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-28101 ] Segmentation Fault when running on Snow Leopard (Mac OS 10.6.3) Message-ID: <20110423034531.D47AB1858367@rubyforge.org> Bugs item #28101, was opened at 2010-04-16 10:22 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28101&group_id=494 Category: memory Group: None Status: Open >Resolution: Accepted Priority: 3 Submitted By: Matt Young (fireknite) >Assigned to: Charlie Savage (cfis) Summary: Segmentation Fault when running on Snow Leopard (Mac OS 10.6.3) Initial Comment: I've been getting this error: ------------------------------------------------------ [BUG] Segmentation fault ruby 1.8.7 (2009-06-08 patchlevel 173) [universal-darwin10.0] Abort trap ------------------------------------------------------ When trying to run code since Apple released an update for Snow Leopard 10.6.2 --> 10.6.3. Code worked perfectly fine in 10.6.2 on both snow leopard and snow leopard server, but breaks at 10.6.3. ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 21:45 Message: Hi Matt, Hopefully this has been fixed by the latest release. If you have a chance can you check? Thanks - Charlie ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28101&group_id=494 From noreply at rubyforge.org Fri Apr 22 23:47:33 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 22 Apr 2011 23:47:33 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-27256 ] LoadError - Symbol not found: _xmlAddChild Message-ID: <20110423034733.996481858367@rubyforge.org> Bugs item #27256, was opened at 2009-10-08 09:14 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27256&group_id=494 Category: None Group: None Status: Open >Resolution: Accepted Priority: 3 Submitted By: Joshua Lippiner (jlippiner) >Assigned to: Charlie Savage (cfis) Summary: LoadError - Symbol not found: _xmlAddChild Initial Comment: My system appears to have 1.1.2 AND 1.1.3 installed. Im running Snow Leopard. Also, I cannot uninstall 1.1.2 for whatever reason. 11:11 AM ~/projects/v16 => console Loading development environment (Rails 2.3.4) Loading haml-edge gem. >> require 'xml' LoadError: dlopen(/Users/jlippiner/.gem/ruby/1.8/gems/libxml-ruby-1.1.3/lib/libxml_ruby.bundle, 9): Symbol not found: _xmlAddChild Referenced from: /Users/jlippiner/.gem/ruby/1.8/gems/libxml-ruby-1.1.3/lib/libxml_ruby.bundle Expected in: flat namespace in /Users/jlippiner/.gem/ruby/1.8/gems/libxml-ruby-1.1.3/lib/libxml_ruby.bundle - /Users/jlippiner/.gem/ruby/1.8/gems/libxml-ruby-1.1.3/lib/libxml_ruby.bundle from /Users/jlippiner/.gem/ruby/1.8/gems/libxml-ruby-1.1.3/lib/libxml_ruby.bundle ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 21:47 Message: Hi guys, I know this is pretty old - and I have no idea what could be causing it. Does the latest release have the same problem? Thanks - Charlie ---------------------------------------------------------------------- Comment By: Graeme Mathieson (mathie) Date: 2010-11-23 06:28 Message: Hi, I think I might be stumbling across the same problem. I've had a wee dig around and think I might have some further information, but I'm not entirely sure what to make of it. First of all, some background. We have a CI server to verify that the tests are passing. It runs through the following process: * Grab the latest code * Create an empty RVM gemset * Use gem bundler to install all the gem dependencies * Run the test suite. Sounds good? It is, most of the time. Once in a while, though, when attempting to run the test suite, we get: dlopen(/Users/ci/.rvm/gems/ree-1.8.7-2010.02 at cruise-78296/gems/libxml-ruby-1.1.4/lib/libxml_ruby.bundle, 9): Symbol not found: _cXMLNode Referenced from: /Users/ci/.rvm/gems/ree-1.8.7-2010.02 at cruise-78296/gems/libxml-ruby-1.1.4/lib/libxml_ruby.bundle Expected in: flat namespace in /Users/ci/.rvm/gems/ree-1.8.7-2010.02 at cruise-78296/gems/libxml-ruby-1.1.4/lib/libxml_ruby.bundle - /Users/ci/.rvm/gems/ree-1.8.7-2010.02 at cruise-78296/gems/libxml-ruby-1.1.4/lib/libxml_ruby.bundle This doesn't happen on all runs, and re-running the CI build with the same commit often makes it work again later, so I'm reasonably(ish!) confident it's not an app problem. This is a CI server that I'm not actively messing with either, so I'm reasonably happy that the environment is stable. So, I dug in a little. It's right, that bundle doesn't have the symbol it's looking for. In fact, the bundle doesn't have any symbols: $ nm libxml-ruby-1.1.4-broken/lib/libxml_ruby.bundle 0000000000000000 t __mh_bundle_header U dyld_stub_binder That's weird, right? Well, weirder still, none of the object files have any symbols: $ nm libxml-ruby-1.1.4-broken/ext/libxml/ruby_xml.o produces nothing. So, gcc is producing a file without any symbols. What kind of file is it producing? $ file libxml-ruby-1.1.4-broken/ext/libxml/ruby_xml.o libxml-ruby-1.1.4-broken/ext/libxml/ruby_xml.o: 80386 COFF executable not stripped - version 30821 That's weird, because a correctly built version is a Mach-O 64 bit object file as you'd expect: $ file libxml-ruby-1.1.4-working/ext/libxml/ruby_xml.o libxml-ruby-1.1.4-working/ext/libxml/ruby_xml.o: Mach-O 64-bit object x86_64 Apart from the generated objects and bundles, there are no appreciable differences between the broken version and the working version: $ diff -urN libxml-ruby-1.1.4-{broken,working} diff -urN libxml-ruby-1.1.4-broken/ext/libxml/Makefile libxml-ruby-1.1.4-working/ext/libxml/Makefile --- libxml-ruby-1.1.4-broken/ext/libxml/Makefile 2010-11-23 12:02:32.000000000 +0000 +++ libxml-ruby-1.1.4-working/ext/libxml/Makefile 2010-11-23 11:32:32.000000000 +0000 @@ -96,8 +96,8 @@ BINDIR = $(bindir) RUBYCOMMONDIR = $(sitedir)$(target_prefix) -RUBYLIBDIR = /Users/ci/.rvm/gems/ree-1.8.7-2010.02 at cruise-5839/gems/libxml-ruby-1.1.4/lib$(target_prefix) -RUBYARCHDIR = /Users/ci/.rvm/gems/ree-1.8.7-2010.02 at cruise-5839/gems/libxml-ruby-1.1.4/lib$(target_prefix) +RUBYLIBDIR = /Users/ci/.rvm/gems/ree-1.8.7-2010.02 at cruise-3367/gems/libxml-ruby-1.1.4/lib$(target_prefix) +RUBYARCHDIR = /Users/ci/.rvm/gems/ree-1.8.7-2010.02 at cruise-3367/gems/libxml-ruby-1.1.4/lib$(target_prefix) TARGET_SO = $(DLLIB) CLEANLIBS = $(TARGET).bundle $(TARGET).il? $(TARGET).tds $(TARGET).map diff -urN libxml-ruby-1.1.4-broken/ext/libxml/mkmf.log libxml-ruby-1.1.4-working/ext/libxml/mkmf.log --- libxml-ruby-1.1.4-broken/ext/libxml/mkmf.log 2010-11-23 12:02:32.000000000 +0000 +++ libxml-ruby-1.1.4-working/ext/libxml/mkmf.log 2010-11-23 11:32:32.000000000 +0000 @@ -1,7 +1,7 @@ have_library: checking for socket() in -lsocket... -------------------- no "gcc -o conftest -I. -I/Users/ci/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/i686-darwin10.4.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -g -O2 -pipe -fno-common conftest.c -L. -L/Users/ci/.rvm/rubies/ree-1.8.7-2010.02/lib -L/Users/ci/.rvm/rubies/ree-1.8.7-2010.02/lib -L. -lruby-static -lsocket -ldl -lobjc " -/Users/ci/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/mkmf.rb:266: warning: Insecure world writable dir /Users/ci/.rvm/gems/ree-1.8.7-2010.02 at cruise-5839/bin in PATH, mode 040777 +/Users/ci/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/mkmf.rb:266: warning: Insecure world writable dir /Users/ci/.rvm/gems/ree-1.8.7-2010.02 at cruise-3367/bin in PATH, mode 040777 conftest.c: In function ?t?: conftest.c:3: error: ?socket? undeclared (first use in this function) conftest.c:3: error: (Each undeclared identifier is reported only once The host environment here is Mac OS X 10.6.5, we're using Ruby Enterprise Edition 2010.02 (1.8.7), and we're using the Mac OS X-supplied libxml2: $ which xml2-config /usr/bin/xml2-config $ xml2-config --version 2.7.3 I have no idea where to go next while tracking this down! Any suggestions? ---------------------------------------------------------------------- Comment By: Jim Tobin (tobinjim) Date: 2010-04-18 06:06 Message: I see this, too. Both the reporting of 1.1.2 and 1.1.3 installed, and the missing symbol. Curiously, my Leopard machine does not report a missing symbol, and it has 1.1.3, 0.9.5 and 0.3.8.4 installed ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27256&group_id=494 From noreply at rubyforge.org Mon Apr 18 14:28:47 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 18 Apr 2011 14:28:47 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-28967 ] libxml-ruby should NOT use RHASH_TBL with Rubinius. Message-ID: <20110418182847.7BC6B1858361@rubyforge.org> Bugs item #28967, was opened at 2011-02-23 20:16 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28967&group_id=494 Category: None Group: None >Status: Closed Resolution: None Priority: 3 Submitted By: postmodern (postmodern) >Assigned to: Charlie Savage (cfis) Summary: libxml-ruby should NOT use RHASH_TBL with Rubinius. Initial Comment: In order to get libxml-ruby building on Rubinius, libxml-ruby should use rb_hash_foreach instead of RHASH_TBL. Also, please use better compile time error reporting: #define RHASH_TBL(obj) ({ C-API RHASH_TBL() is not supported in Rubinius }) This will cause the compiler to report a generic syntax error. Please use #error macros instead. ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-18 12:28 Message: This has been fixed in the latest release. ---------------------------------------------------------------------- Comment By: postmodern (postmodern) Date: 2011-02-23 20:38 Message: Oops, that RHASH_TBL error method is from Rubiniuses ruby.h file. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28967&group_id=494 From noreply at rubyforge.org Fri Apr 22 23:48:30 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 22 Apr 2011 23:48:30 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-27432 ] Segfault during garbage collection Message-ID: <20110423034830.6A3A81858367@rubyforge.org> Bugs item #27432, was opened at 2009-11-13 11:08 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27432&group_id=494 Category: memory Group: v0.5 Status: Open >Resolution: Accepted Priority: 3 Submitted By: Mat Brown (outoftime) >Assigned to: Charlie Savage (cfis) Summary: Segfault during garbage collection Initial Comment: Tracked down a persistent segfault during big Solr reindexes (using libxml-ruby to build the Solr docs) to libxml-ruby. These operations involve building thousands of XML messages and the segfault generally occurs at an unpredictable time during the operation. We're linking against libxml2 2.6.32 I hope this is helpful - I'm no C expert - but here is the backtrace from the core dump: #0 0x00000035c2a30215 in raise () from /lib64/libc.so.6 #1 0x00000035c2a31cc0 in abort () from /lib64/libc.so.6 #2 0x000000000049729c in rb_bug () #3 0x000000000047495d in ?? () #4 #5 0x000000000042f577 in ?? () #6 0x000000000042f60f in rb_gc_mark () #7 0x00002b8f12be0db9 in rxml_node_mark (xnode=0x195ad980) at ruby_xml_node.c:82 #8 0x00002b8f12bdc463 in rxml_attributes_mark (xnode=0x44) at ruby_xml_attributes.c:39 #9 0x000000000042fa73 in ?? () #10 0x000000000042f5f2 in ?? () #11 0x000000000042f3a9 in ?? () #12 0x000000000042f3d6 in rb_gc_mark_locations () #13 0x00000000004252a4 in ?? () #14 0x000000000042fa73 in ?? () #15 0x000000000042f5f2 in ?? () #16 0x000000000042f3e9 in ?? () #17 0x000000000047764d in st_foreach () #18 0x000000000042f40b in ?? () #19 0x000000000042fa89 in ?? () #20 0x000000000042f5f2 in ?? () #21 0x000000000042f3e9 in ?? () #22 0x000000000047764d in st_foreach () #23 0x000000000042f40b in ?? () #24 0x000000000042fa89 in ?? () #25 0x000000000042f5f2 in ?? () #26 0x000000000042f3e9 in ?? () #27 0x000000000047764d in st_foreach () #28 0x000000000042f40b in ?? () #29 0x000000000042f9be in ?? () #30 0x000000000042f5f2 in ?? () #31 0x000000000042f97c in ?? () #32 0x000000000042f5f2 in ?? () #33 0x000000000042f715 in ?? () #34 0x000000000042f5f2 in ?? () #35 0x000000000042f3e9 in ?? () #36 0x000000000047764d in st_foreach () #37 0x000000000042f40b in ?? () #38 0x000000000042f9ad in ?? () #39 0x000000000042f5f2 in ?? () #40 0x000000000042f97c in ?? () #41 0x000000000042f5f2 in ?? () #42 0x000000000042f715 in ?? () #43 0x000000000042f5f2 in ?? () #44 0x000000000042f3e9 in ?? () #45 0x000000000047764d in st_foreach () #46 0x000000000042f40b in ?? () #47 0x000000000042f9ad in ?? () #48 0x000000000042f5f2 in ?? () #49 0x000000000042f97c in ?? () #50 0x000000000042f5f2 in ?? () #51 0x000000000042f715 in ?? () #52 0x000000000042f5f2 in ?? () #53 0x000000000042f3e9 in ?? () #54 0x000000000047764d in st_foreach () #55 0x000000000042f40b in ?? () #56 0x000000000042f9ad in ?? () #57 0x000000000042f5f2 in ?? () #58 0x000000000042f3e9 in ?? () #59 0x000000000047764d in st_foreach () #60 0x000000000042f40b in ?? () #61 0x000000000042f9be in ?? () #62 0x000000000042f5f2 in ?? () #63 0x000000000042f97c in ?? () #64 0x000000000042f5f2 in ?? () #65 0x000000000042f97c in ?? () #66 0x000000000042f5f2 in ?? () #67 0x000000000042f97c in ?? () #68 0x000000000042f5f2 in ?? () #69 0x000000000042f715 in ?? () #70 0x000000000042f5f2 in ?? () #71 0x000000000042f715 in ?? () #72 0x000000000042f5f2 in ?? () #73 0x000000000042f715 in ?? () #74 0x000000000042f5f2 in ?? () #75 0x0000000000430545 in rb_gc_mark_frame () #76 0x00000000004305f0 in ?? () #77 0x000000000042eb41 in ruby_xmalloc () #78 0x0000000000421982 in ?? () #79 0x0000000000421a2e in ?? () #80 0x0000000000422108 in ?? () #81 0x000000000042221b in rb_block_proc () #82 0x00000000004174b5 in ?? () #83 0x000000000041cd71 in ?? () #84 0x000000000041d284 in ?? () #85 0x000000000041660b in ?? () #86 0x000000000041546d in ?? () #87 0x00000000004171af in ?? () #88 0x000000000041cd71 in ?? () #89 0x000000000041d284 in ?? () #90 0x000000000041d47c in ?? () #91 0x000000000041c30e in ?? () #92 0x000000000041d284 in ?? () #93 0x00000000004163bf in ?? () #94 0x000000000041cd71 in ?? () #95 0x000000000041d284 in ?? () #96 0x000000000041660b in ?? () #97 0x0000000000419d42 in ?? () #98 0x000000000041a111 in rb_yield () #99 0x000000000048b3ff in ?? () #100 0x000000000041c322 in ?? () #101 0x000000000041d284 in ?? () #102 0x00000000004163bf in ?? () #103 0x000000000041546d in ?? () #104 0x000000000041cd71 in ?? () #105 0x000000000041d284 in ?? () #106 0x000000000041660b in ?? () #107 0x00000000004171af in ?? () #108 0x0000000000414855 in ?? () #109 0x000000000041cd71 in ?? () #110 0x000000000041d284 in ?? () #111 0x000000000041660b in ?? () #112 0x000000000041cd71 in ?? () #113 0x000000000041d284 in ?? () #114 0x00000000004163bf in ?? () #115 0x000000000041cd71 in ?? () #116 0x000000000041d284 in ?? () #117 0x0000000000416696 in ?? () #118 0x0000000000417278 in ?? () #119 0x0000000000415937 in ?? () #120 0x000000000041cd71 in ?? () #121 0x000000000041d284 in ?? () #122 0x0000000000416696 in ?? () #123 0x0000000000414b55 in ?? () #124 0x000000000041cd71 in ?? () #125 0x000000000041d284 in ?? () #126 0x000000000041d9fd in rb_call_super () #127 0x00000000004169d6 in ?? () #128 0x000000000041546d in ?? () #129 0x000000000041cd71 in ?? () #130 0x000000000041d284 in ?? () #131 0x000000000041660b in ?? () #132 0x0000000000422e74 in ?? () #133 0x00000000004151fc in ?? () #134 0x0000000000415e39 in ?? () #135 0x000000000041cd71 in ?? () #136 0x000000000041d284 in ?? () #137 0x000000000041d8a9 in rb_funcall2 () #138 0x000000000041b921 in ?? () #139 0x000000000041d0d8 in ?? () #140 0x00000000004163bf in ?? () #141 0x000000000041546d in ?? () #142 0x0000000000419d42 in ?? () #143 0x000000000041eaff in ?? () #144 0x000000000041e91f in ?? () #145 0x000000000041eb24 in ?? () #146 0x000000000041eb93 in ?? () #147 0x000000000041ecf4 in rb_obj_instance_eval () #148 0x000000000041c30e in ?? () #149 0x000000000041d284 in ?? () #150 0x00000000004163bf in ?? () #151 0x0000000000422e74 in ?? () #152 0x00000000004151fc in ?? () #153 0x000000000041cd71 in ?? () #154 0x000000000041d284 in ?? () #155 0x00000000004163bf in ?? () #156 0x0000000000422e74 in ?? () #157 0x00000000004151fc in ?? () #158 0x000000000041cd71 in ?? () #159 0x000000000041d284 in ?? () #160 0x000000000041660b in ?? () #161 0x000000000041546d in ?? () #162 0x0000000000419d42 in ?? () #163 0x000000000041eaff in ?? () #164 0x000000000041e91f in ?? () #165 0x000000000041eb24 in ?? () #166 0x000000000041eb93 in ?? () #167 0x000000000041ecf4 in rb_obj_instance_eval () #168 0x000000000041c30e in ?? () #169 0x000000000041d284 in ?? () #170 0x00000000004163bf in ?? () #171 0x0000000000422e74 in ?? () #172 0x00000000004151fc in ?? () #173 0x000000000041cd71 in ?? () #174 0x000000000041d284 in ?? () #175 0x000000000041d8a9 in rb_funcall2 () #176 0x00000000004206c8 in rb_obj_call_init () #177 0x0000000000445d39 in rb_class_new_instance () #178 0x000000000041c30e in ?? () #179 0x000000000041d284 in ?? () #180 0x00000000004163bf in ?? () #181 0x0000000000422e74 in ?? () #182 0x00000000004151fc in ?? () #183 0x0000000000417278 in ?? () #184 0x000000000041cd71 in ?? () #185 0x000000000041d284 in ?? () #186 0x000000000041d8a9 in rb_funcall2 () #187 0x00000000004206c8 in rb_obj_call_init () #188 0x0000000000445d39 in rb_class_new_instance () #189 0x000000000041c30e in ?? () #190 0x000000000041d284 in ?? () #191 0x00000000004163bf in ?? () #192 0x0000000000422e74 in ?? () #193 0x00000000004151fc in ?? () #194 0x000000000041cd71 in ?? () #195 0x000000000041d284 in ?? () #196 0x00000000004163bf in ?? () #197 0x000000000041546d in ?? () #198 0x00000000004161d7 in ?? () #199 0x00000000004161d7 in ?? () #200 0x000000000041546d in ?? () #201 0x0000000000417278 in ?? () #202 0x000000000041cd71 in ?? () #203 0x000000000041d284 in ?? () #204 0x000000000041d47c in ?? () #205 0x000000000041c30e in ?? () #206 0x000000000041d284 in ?? () #207 0x00000000004163bf in ?? () #208 0x000000000041cd71 in ?? () #209 0x000000000041d284 in ?? () #210 0x00000000004163bf in ?? () #211 0x00000000004171af in ?? () #212 0x00000000004161d7 in ?? () #213 0x0000000000414b55 in ?? () #214 0x000000000041cd71 in ?? () #215 0x000000000041d284 in ?? () #216 0x00000000004163bf in ?? () #217 0x0000000000419d42 in ?? () #218 0x000000000041a111 in rb_yield () #219 0x000000000048a902 in rb_ary_each () #220 0x000000000041c322 in ?? () #221 0x000000000041d284 in ?? () #222 0x0000000000415593 in ?? () #223 0x000000000041cd71 in ?? () #224 0x000000000041d284 in ?? () #225 0x000000000041660b in ?? () #226 0x0000000000419d42 in ?? () #227 0x000000000041a111 in rb_yield () #228 0x000000000048b3b7 in ?? () #229 0x000000000041c322 in ?? () #230 0x000000000041d284 in ?? () #231 0x00000000004163bf in ?? () #232 0x000000000041546d in ?? () #233 0x00000000004171af in ?? () #234 0x000000000041cd71 in ?? () #235 0x000000000041d284 in ?? () #236 0x000000000041660b in ?? () #237 0x0000000000419d42 in ?? () #238 0x000000000041586a in ?? () #239 0x000000000041cd71 in ?? () #240 0x000000000041d284 in ?? () #241 0x00000000004163bf in ?? () #242 0x0000000000422e74 in ?? () #243 0x00000000004151fc in ?? () #244 0x00000000004161d7 in ?? () #245 0x00000000004161d7 in ?? () #246 0x00000000004177c4 in ?? () #247 0x000000000041781a in ?? () #248 0x00000000004171af in ?? () #249 0x000000000041cd71 in ?? () #250 0x000000000041d284 in ?? () #251 0x000000000041660b in ?? () #252 0x000000000041546d in ?? () #253 0x000000000041cd71 in ?? () #254 0x000000000041d284 in ?? () #255 0x00000000004163bf in ?? () #256 0x000000000041cd71 in ?? () #257 0x000000000041d284 in ?? () #258 0x000000000041660b in ?? () #259 0x000000000041cd71 in ?? () #260 0x000000000041d284 in ?? () #261 0x00000000004163bf in ?? () #262 0x000000000041cd71 in ?? () #263 0x000000000041d284 in ?? () #264 0x00000000004163bf in ?? () #265 0x0000000000419d42 in ?? () #266 0x000000000041586a in ?? () #267 0x0000000000414fb0 in ?? () #268 0x0000000000419d42 in ?? () #269 0x000000000041586a in ?? () #270 0x0000000000415b4a in ?? () #271 0x000000000041cd71 in ?? () #272 0x000000000041d284 in ?? () #273 0x000000000041660b in ?? () #274 0x000000000041546d in ?? () #275 0x000000000041cd71 in ?? () #276 0x000000000041d284 in ?? () #277 0x000000000041660b in ?? () #278 0x000000000041546d in ?? () #279 0x000000000041cd71 in ?? () #280 0x000000000041d284 in ?? () #281 0x00000000004163bf in ?? () #282 0x0000000000415937 in ?? () #283 0x0000000000419d42 in ?? () #284 0x000000000041a111 in rb_yield () #285 0x000000000048a902 in rb_ary_each () #286 0x000000000041c322 in ?? () #287 0x000000000041d284 in ?? () #288 0x00000000004163bf in ?? () #289 0x000000000041546d in ?? () #290 0x0000000000419d42 in ?? () #291 0x0000000000422642 in ?? () #292 0x0000000000422803 in ?? () #293 0x000000000041c2ff in ?? () #294 0x000000000041d284 in ?? () #295 0x00000000004163bf in ?? () #296 0x0000000000419d42 in ?? () #297 0x000000000041a111 in rb_yield () #298 0x000000000048a902 in rb_ary_each () #299 0x000000000041c322 in ?? () #300 0x000000000041d284 in ?? () #301 0x00000000004163bf in ?? () #302 0x000000000041546d in ?? () #303 0x000000000041cd71 in ?? () #304 0x000000000041d284 in ?? () #305 0x000000000041660b in ?? () #306 0x0000000000419d42 in ?? () #307 0x000000000041586a in ?? () #308 0x0000000000415b4a in ?? () #309 0x000000000041cd71 in ?? () #310 0x000000000041d284 in ?? () #311 0x00000000004163bf in ?? () #312 0x000000000041546d in ?? () #313 0x000000000041cd71 in ?? () #314 0x000000000041d284 in ?? () #315 0x000000000041660b in ?? () #316 0x000000000041cd71 in ?? () #317 0x000000000041d284 in ?? () #318 0x00000000004163bf in ?? () #319 0x000000000041cd71 in ?? () #320 0x000000000041d284 in ?? () #321 0x000000000041660b in ?? () #322 0x0000000000419d42 in ?? () #323 0x000000000041a111 in rb_yield () #324 0x000000000048a902 in rb_ary_each () #325 0x000000000041c322 in ?? () #326 0x000000000041d284 in ?? () #327 0x00000000004163bf in ?? () #328 0x000000000041546d in ?? () #329 0x0000000000419d42 in ?? () #330 0x000000000041586a in ?? () #331 0x0000000000415937 in ?? () #332 0x000000000041cd71 in ?? () #333 0x000000000041d284 in ?? () #334 0x000000000041660b in ?? () #335 0x000000000041546d in ?? () #336 0x000000000041cd71 in ?? () #337 0x000000000041d284 in ?? () #338 0x0000000000416696 in ?? () #339 0x0000000000419d42 in ?? () #340 0x000000000041586a in ?? () #341 0x0000000000415937 in ?? () #342 0x000000000041cd71 in ?? () #343 0x000000000041d284 in ?? () #344 0x000000000041660b in ?? () #345 0x000000000041546d in ?? () #346 0x000000000041cd71 in ?? () #347 0x000000000041d284 in ?? () #348 0x00000000004163bf in ?? () #349 0x000000000041188f in ?? () #350 0x000000000041f178 in rb_load () #351 0x000000000041f4ea in ?? () #352 0x000000000041c30e in ?? () #353 0x000000000041d284 in ?? () #354 0x000000000041660b in ?? () #355 0x000000000041188f in ?? () #356 0x0000000000411fc3 in ?? () #357 0x000000000041200f in ruby_exec () #358 0x0000000000412033 in ruby_run () #359 0x000000000040fd79 in main () ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 21:48 Message: I realize this is pretty old now - but do you still see this with the latest release? Charlie ---------------------------------------------------------------------- Comment By: Niel Drummond (cyanescent) Date: 2010-01-02 17:20 Message: you need to recompile libxml2 (and libxml-ruby) with debug flags enabled for your backtrace to become useful. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27432&group_id=494 From noreply at rubyforge.org Sat Apr 23 00:19:08 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 23 Apr 2011 00:19:08 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-27848 ] Error#code_to_s gives incosistent answer (sometimes wrong) Message-ID: <20110423041908.566F91858363@rubyforge.org> Bugs item #27848, was opened at 2010-02-17 05:52 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27848&group_id=494 Category: General Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Jarl Friis (jarl) >Assigned to: Charlie Savage (cfis) Summary: Error#code_to_s gives incosistent answer (sometimes wrong) Initial Comment: Hi. Version 1.1.3 I experience that LibXML::XML::Error#code_to_s gives answers that varies arbitrary. If I have a Empty document, the parse will give me a Error object with code 4. but when I use code_to_s on that object it some times returns "DOCUMENT EMPTY" and sometimes "DTD" I believe it is because the constants defined in Error are not prefixed (as they are in libxml), hence there are two constants with the same value: irb(main):004:0> XML::Error.const_get("DTD") => 4 irb(main):005:0> XML::Error.const_get("DOCUMENT_EMPTY") => 4 Jarl ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 22:19 Message: The code is correct. Both XML::DTD and XML::DOCUMENT_EMPTY have the same value. They come from two different enums defined in Libxml. A bit confusing I know, but correct. Thanks - Charlie ---------------------------------------------------------------------- Comment By: Jarl Friis (jarl) Date: 2010-02-17 06:31 Message: I have made a workaround file, I would not go so far as to call it a patch... It's a monkey patch. In a Rails app, the file can be placed in app/helpers, which works around the problem. Note also my new implementation only creates the number to name map once. Jarl ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27848&group_id=494 From noreply at rubyforge.org Sat Apr 23 00:39:16 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 23 Apr 2011 00:39:16 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-27666 ] segfault under linux/x86 and ruby 1.9.1p376 Message-ID: <20110423043916.304611858363@rubyforge.org> Bugs item #27666, was opened at 2010-01-06 15:31 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27666&group_id=494 Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Aaron Turner (synfinatic) >Assigned to: Charlie Savage (cfis) Summary: segfault under linux/x86 and ruby 1.9.1p376 Initial Comment: This is a repeatable crash although the backtrace tends to be different occasionally. I've attached a unit test of the issue (tends to happen on the 21st request) and some additional backtraces. I also know this issue occurs with older ruby 1.9.1 versions. /usr/lib/ruby1.9/1.9.1/webrick/httprequest.rb:74: [BUG] Segmentation fault ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-linux] -- control frame ---------- c:0007 p:0196 s:0030 b:0030 l:000029 d:000029 METHOD /usr/lib/ruby1.9/1.9.1/webrick/httprequest.rb:74 c:0006 p:---- s:0026 b:0026 l:000025 d:000025 FINISH c:0005 p:---- s:0024 b:0024 l:000023 d:000023 CFUNC :new c:0004 p:0044 s:0020 b:0020 l:000019 d:000019 METHOD /usr/lib/ruby1.9/1.9.1/webrick/httpserver.rb:46 c:0003 p:0123 s:0009 b:0009 l:0019ec d:000008 BLOCK /usr/lib/ruby1.9/1.9.1/webrick/server.rb:183 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:---- s:0002 b:0002 l:000001 d:000001 TOP --------------------------- -- Ruby level backtrace information----------------------------------------- /usr/lib/ruby1.9/1.9.1/webrick/httprequest.rb:74:in `initialize' /usr/lib/ruby1.9/1.9.1/webrick/httpserver.rb:46:in `new' /usr/lib/ruby1.9/1.9.1/webrick/httpserver.rb:46:in `run' /usr/lib/ruby1.9/1.9.1/webrick/server.rb:183:iart_thread' -- C level backtrace information ------------------------------------------- 0x3547be /usr/lib/libruby1.9.so.1.9(rb_vm_bugreport+0x3e) [0x3547be] 0x26fa5c /usr/lib/libruby1.9.so.1.9 [0x26fa5c] 0x26faca /usr/lib/libruby1.9.so.1.9(rb_bug+0x3a) [0x26faca] 0x2fd930 /usr/lib/libruby1.9.so.1.9 [0x2fd930] 0x11c890 /lib/tls/libpthread.so.0 [0x11c890] 0x414d30 /lib/tls/libc.so.6 [0x414d30] 0x41533a /lib/tls/libc.so.6(__libc_free+0x8a) [0x41533a] 0x26daed3 /usr/lib/libxml2.so.2(xmlDictFree+0x135) [0x26daed3] 0x263a7c4 /usr/lib/libxml2.so.2(xmlFreeDoc+0x19d) [0x263a7c4] 0x63edd3 /usr/lib/ruby1.9/gems/1.9.1/gems/libxml-ruby-1.1.3/lib/libxml_ruby.so(rxml_document_free+0x23) [0x63edd3] 0x283ffc /usr/lib/libruby1.9.so.1.9 [0x283ffc] 0x28412f /usr/lib/libruby1.9.so.1.9 [0x28412f] 0x2841ae /usr/lib/libruby1.9.so.1.9 [0x2841ae] 0x3582f7 /usr/lib/libruby1.9.so.1.9 [0x3582f7] 0x34b189 /usr/lib/libruby1.9.so.1.9 [0x34b189] 0x34b89f /usr/lib/libruby1.9.so.1.9 [0x34b89f] 0x34d06e /usr/lib/libruby1.9.so.1.9 [0x34d06e] 0x34e0d0 /usr/lib/libruby1.9.so.1.9(rb_funcall2+0x120) [0x34e0d0] 0x274ec1 /usr/lib/libruby1.9.so.1.9(rb_obj_call_init+0x51) [0x274ec1] 0x2a900a /usr/lib/libruby1.9.so.1.9(rb_class_new_instance+0x3a) [0x2a900a] 0x34219e /usr/lib/libruby1.9.so.1.9 [0x34219e] 0x34efaf /usr/lib/libruby1.9.so.1.9 [0x34efaf] 0x3461df /usr/lib/libruby1.9.so.1.9 [0x3461df] 0x34b89f /usr/lib/libruby1.9.so.1.9 [0x34b89f] 0x34bed2 /usr/lib/libruby1.9.so.1.9 [0x34bed2] 0x34c4a6 /usr/lib/libruby1.9.so.1.9(rb_vm_invoke_proc+0xa6) [0x34c4a6] 0x3599cb /usr/lib/libruby1.9.so.1.9 [0x3599cb] 0x359b51 /usr/lib/libruby1.9.so.1.9 [0x359b51] 0x116371 /lib/tls/libpthread.so.0 [0x116371] 0x47affe /lib/tls/libc.so.6(__clone+0x5e) [0x47affe] [NOTE] You may encounter a bug of Ruby interpreter. Bug reports are welcome. For details: http://www.ruby-lang.org/bugreport.html Aborted ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 22:39 Message: Hi Aaron, Sorry this wasn't attended to last year, but just to let you know the latest version of libxml-ruby runs your test script without an issues for all 100 iterations. Thanks - Charlie ---------------------------------------------------------------------- Comment By: Aaron Turner (synfinatic) Date: 2010-01-12 12:31 Message: I was hoping to get an update on this ticket: is someone looking at this? Do I need to provide any more information? My project is currently at a standstill and I either need to figure out a fix or rewrite my code to use a different XML parser. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27666&group_id=494 From noreply at rubyforge.org Sat Apr 23 00:40:09 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 23 Apr 2011 00:40:09 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-27909 ] Installing libxml on Win2k3 Standard Edition SErvice Pack 2 not working Message-ID: <20110423044009.BFFF81858363@rubyforge.org> Bugs item #27909, was opened at 2010-03-01 15:32 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27909&group_id=494 Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Sirisha Pusapati (sirishapusapati) >Assigned to: Charlie Savage (cfis) Summary: Installing libxml on Win2k3 Standard Edition SErvice Pack 2 not working Initial Comment: I am trying to install libxml using the command libxml-ruby and I am seeing the following errors. Building native extensions. This could take a while... ERROR: Error installing libxml-ruby: ERROR: Failed to build gem native extension. D:/Ruby/bin/ruby.exe -rubygems D:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rak e RUBYARCHDIR=D:/Ruby/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.3-x86-mswin32-60/li b RUBYLIBDIR=D:/Ruby/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.3-x86-mswin32-60/lib rake aborted! No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb) D:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2377:in `raw_load_rakefile ' (See full trace by running task with --trace) Gem files will remain installed in D:/Ruby/lib/ruby/gems/1.8/gems/libxml-ruby-1. 1.3-x86-mswin32-60 for inspection. Results logged to D:/Ruby/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.3-x86-mswin32-6 0/ext/mingw/gem_make.out MY PATH is Path=D:\Ruby\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Prog ram Files\Microsoft ADS\bin;C:\Program Files\Microsoft ADS\tools;c:\devtools;c:\ localbin;C:\Program Files\BladeLogic\OM\bin Can you guys tell me what I am missing Thanks Sirisha ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 22:40 Message: Hmm, try the latest release. It now works with the Ruby One Click installer. Thanks - Charlie ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27909&group_id=494 From noreply at rubyforge.org Sat Apr 23 00:40:57 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 23 Apr 2011 00:40:57 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-27977 ] libxml-ruby-1.1.3 failing test Message-ID: <20110423044057.624661858363@rubyforge.org> Bugs item #27977, was opened at 2010-03-16 16:31 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27977&group_id=494 Category: General Group: None Status: Open >Resolution: Accepted Priority: 3 Submitted By: Matthew Kent (mattkent) >Assigned to: Charlie Savage (cfis) Summary: libxml-ruby-1.1.3 failing test Initial Comment: Packaging libxml-ruby for CentOS 5.4 and I'm getting one failing test 1) Failure: test_mode(TestReader) [./test/tc_reader.rb:178]: <3> expected but was <5>. 289 tests, 1284 assertions, 1 failures, 0 errors looks like it's still in XML::Reader::MODE_READING mode This is with libxml2-2.6.26-2.1.2.8 libxml2-devel-2.6.26-2.1.2.8 ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 22:40 Message: Could you try the latest version? Thanks - Chalrie ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27977&group_id=494 From noreply at rubyforge.org Sat Apr 23 00:41:54 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 23 Apr 2011 00:41:54 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-25203 ] Calling find without a namespace core dumps on the second error. Message-ID: <20110423044154.3652C1858363@rubyforge.org> Bugs item #25203, was opened at 2009-04-06 13:38 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=25203&group_id=494 Category: General Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: John Gorman (jgorman) >Assigned to: Charlie Savage (cfis) Summary: Calling find without a namespace core dumps on the second error. Initial Comment: This programs demonstrates a bug in libxml-ruby-1.1.3 running ruby 1.8.5 (2006-08-25) [i386-linux] on CentOS 5.3. Calling find without a namespace core dumps on the second error. See the simple attached program to reproduce the problem. Thanks! ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 22:41 Message: This has been fixed in the latest release. Thanks for the report - Charlie ---------------------------------------------------------------------- Comment By: John Gorman (jgorman) Date: 2009-04-07 10:52 Message: Actually, any namespace error of any kind in the same ruby process will core dump on the second error. Yikes. Kills rails in a hurry. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=25203&group_id=494 From noreply at rubyforge.org Sat Apr 23 00:54:18 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 23 Apr 2011 00:54:18 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-24833 ] Docs for LibXML::XML::Document.validate_schema claim that it takes an optional block; it does not. Message-ID: <20110423045418.D824C1858367@rubyforge.org> Bugs item #24833, was opened at 2009-03-24 16:54 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=24833&group_id=494 Category: General Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Nobody (None) >Assigned to: Charlie Savage (cfis) Summary: Docs for LibXML::XML::Document.validate_schema claim that it takes an optional block; it does not. Initial Comment: Summary is descriptigve; this is a bug in the docs. ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 22:54 Message: Thanks for the report. Documentation has been updated: * Removed reference to block * Updated docs to say that on errors an exception is raised. This is done to pass error information back to the client before it is lost. Thanks - Charlie ---------------------------------------------------------------------- Comment By: Xavier Holt (xavierholt) Date: 2010-04-08 01:33 Message: Another vote for this bug! I would be using the feature as we speak if only it worked (hopefully the fix will involve bringing the code around to match the documentation and not the other way around)... I find that the documentation for LibXML::XML::Document.validate_schema is wrong in two places: 1) As noted by the original reporter, the "error handler" block passed is ignored. 2) The function is claimed to return true on a successful validation, and false if errors were found. While it does return true on success, it raises the last error as an exception on failure (line 815 in my ruby_xml_document.c file) before returning false (line 816), rendering the return statement irrelevant. Many thanks in advance to whoever fixes this! - XH libxml-ruby 1.1.3 libxml2 2.7.6-1.fc12 (x86_64) libxml2-devel 2.7.6-1.fc12 (x86_64) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=24833&group_id=494 From noreply at rubyforge.org Sat Apr 23 00:55:13 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 23 Apr 2011 00:55:13 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-25366 ] malloc error in v1.1.3 on OS X Leopard Message-ID: <20110423045513.0E7AB1858367@rubyforge.org> Bugs item #25366, was opened at 2009-04-11 01:38 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=25366&group_id=494 Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Jeff Smick (sprsquish) >Assigned to: Charlie Savage (cfis) Summary: malloc error in v1.1.3 on OS X Leopard Initial Comment: I'm getting the following error when using v1.1.3 on OS X Leopard. I can reproduce it consistently. I know that it wont happen when I turn off garbage collection or if the script never reaches a point where garbage collection is needed. I also tried running the same code against v1.1.2 and did not receive the error. ruby(74165) malloc: *** error for object 0x1808910: incorrect checksum for freed object - object was probably modified after being freed. *** set a breakpoint in malloc_error_break to debug ruby(74165) malloc: *** error for object 0x17affe0: incorrect checksum for freed object - object was probably modified after being freed. *** set a breakpoint in malloc_error_break to debug ruby(74165) malloc: *** error for object 0x17a7e70: incorrect checksum for freed object - object was probably modified after being freed. *** set a breakpoint in malloc_error_break to debug This happens when I run the test suite for Blather. The code for doing so is below: git clone git://github.com/sprsquish/blather.git cd blather rake build rake --Jeff ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 22:55 Message: This should be fixed in the latest release. Thanks - Charlie ---------------------------------------------------------------------- Comment By: Alexander Seith (alxs) Date: 2009-04-17 12:05 Message: I'm running into a similar problem as Jeff with v1.1.3 on OSX 10.5 and believe that it's the same issue. ruby(26242) malloc: *** mmap(size=2097152) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug ruby(26242) malloc: *** mmap(size=2097152) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug ruby(26242) malloc: *** mmap(size=2097152) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug ruby(26242) malloc: *** mmap(size=2097152) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug ruby(26242) malloc: *** mmap(size=2097152) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug [FATAL] failed to allocate memory I have a GC.start call in my code and disabled that one, but it didn't resolve the memory exhaustion. Also, I didn't try out v1.1.2, but everything was working fine with v0.9.8. -- Alex ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=25366&group_id=494 From noreply at rubyforge.org Sat Apr 23 00:55:41 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 23 Apr 2011 00:55:41 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-26562 ] Invalid free when using XML SAX parser Message-ID: <20110423045541.E71311858367@rubyforge.org> Bugs item #26562, was opened at 2009-07-08 10:28 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=26562&group_id=494 Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Todd Fisher (taf2) >Assigned to: Charlie Savage (cfis) Summary: Invalid free when using XML SAX parser Initial Comment: I'm running a fairly complex script, combination of a few different binaries... right now this is what i know is happening from valgrind: ==11639== Invalid free() / delete / delete[] ==11639== at 0x4C2433D: free (vg_replace_malloc.c:323) ==11639== by 0xD5AB4CA: xmlFreeParserCtxt (in /usr/lib64/libxml2.so.2.7.3) ==11639== by 0x4E77D51: (within /usr/lib64/libruby.so.1.8.6) ==11639== by 0x4E780E6: ruby_xmalloc (in /usr/lib64/libruby.so.1.8.6) ==11639== by 0xC69C7BE: alloc_hpricot_struct (hpricot_scan.rl:618) ==11639== by 0x4E62E00: (within /usr/lib64/libruby.so.1.8.6) ==11639== by 0x4E62FFC: (within /usr/lib64/libruby.so.1.8.6) ==11639== by 0x4E63D17: (within /usr/lib64/libruby.so.1.8.6) ==11639== by 0x4E63FC4: rb_funcall (in /usr/lib64/libruby.so.1.8.6) ==11639== by 0x4E8E06E: rb_obj_alloc (in /usr/lib64/libruby.so.1.8.6) ==11639== by 0xC69CD13: rb_hpricot_token (hpricot_scan.rl:302) ==11639== by 0xC6A7A20: hpricot_scan (hpricot_scan.rl:68) ==11639== Address 0xd5773a0 is 0 bytes inside data symbol "rxml_sax_handler" I will work on reducing this to a easier to reproduce test case... ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 22:55 Message: This is fixed in the latest release. Thanks for the report - Charlie ---------------------------------------------------------------------- Comment By: Marcin Raczkowski (swistak) Date: 2009-10-28 16:07 Message: I'm expiriencing something similar: Starting parsing #FOG_Product_20091026171339.xml with_libxml.rb:44:in `parse': undefined method `on_error' for false:FalseClass (NoMethodError) from with_libxml.rb:44:in `parse' from with_libxml.rb:53 *** glibc detected *** ruby: free(): invalid pointer: 0xb77787a0 *** ======= Backtrace: ========= /lib/i686/cmov/libc.so.6[0xb7c6e1d4] /lib/i686/cmov/libc.so.6(cfree+0x96)[0xb7c70186] /usr/lib/libxml2.so.2(xmlFreeParserCtxt+0xe1)[0xb7641fd1] /usr/local/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.3/lib/libxml_ruby.so[0xb776138d] ruby(rb_gc_call_finalizer_at_exit+0x9f)[0x80e787f] ruby[0x80cf899] ruby(ruby_cleanup+0x168)[0x80dc738] ruby(ruby_stop+0x11)[0x80dc831] ruby[0x80e0360] ruby(SHA1_Update+0x28f)[0x80646ef] /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7c15775] ruby(SHA1_Update+0x1b1)[0x8064611] source code of the script: http://pastie.org/674111 XML is big (> 2GB) but it doesn't seem to have problem with even bigger ones(> 5GB), so I don't think that's the issue, ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=26562&group_id=494 From noreply at rubyforge.org Sat Apr 23 00:56:12 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 23 Apr 2011 00:56:12 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-26564 ] invalid XPath causes segmentation fault on Solaris Message-ID: <20110423045612.31BCB1858367@rubyforge.org> Bugs item #26564, was opened at 2009-07-08 17:53 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=26564&group_id=494 Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Mars Hall (marsipan) >Assigned to: Charlie Savage (cfis) Summary: invalid XPath causes segmentation fault on Solaris Initial Comment: Doing a #find using an invalid XPath indirectly causes a segmentation fault on Solaris. I say "indirectly", because the XPath eval error does not immediately cause the segfault; instead the segfault occurs at some point after the invalid XPath eval. On Mac OS X, invalid XPath does not cause the ruby app to exit. The error logged is: Error: Invalid expression. xmlXPathEval: evaluation failed /usr/local/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.3/lib/libxml/node.rb:71: [BUG] Segmentation fault ruby 1.8.6 (2007-03-13) [i386-solaris2.10] The invalid path in question mistakenly used a double-pipe "||" instead of a single-pipe "|" for a logical "or". Correcting this XPath prevents the segfault, but ideally this XPath error should raise a ruby exception, not kill the process. ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 22:56 Message: This is fixed in the latest release. Thanks for the report - Charlie ---------------------------------------------------------------------- Comment By: Lars Haugseth (lhz) Date: 2009-11-06 04:28 Message: I also get segfaults on Ubuntu 8.04 with libxml-ruby 1.1.3 when trying to evaluate an invalid XPath expression: Error: Invalid expression. xmlXPathEval: evaluation failed /usr/local/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.3/lib/libxml/document.rb:119: [BUG] Segmentation fault ruby 1.8.6 (2009-08-04) [x86_64-linux] ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=26564&group_id=494 From noreply at rubyforge.org Sat Apr 23 00:57:12 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 23 Apr 2011 00:57:12 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-26672 ] Segmentation fault Message-ID: <20110423045712.9EFEA1858363@rubyforge.org> Bugs item #26672, was opened at 2009-07-20 07:06 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=26672&group_id=494 Category: None Group: None Status: Open >Resolution: Accepted Priority: 3 Submitted By: Thomas Preymesser (thopre) >Assigned to: Charlie Savage (cfis) Summary: Segmentation fault Initial Comment: /usr/local/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3/lib/libxml/attributes.rb:6: [BUG] Segmentation fault ruby 1.9.2dev (2009-07-20 trunk 24213) [i686-linux] -- control frame ---------- c:0032 p:0014 s:0137 b:0135 l:000120 d:000134 BLOCK /usr/local/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3/lib/libxml/attributes.rb:6 c:0031 p:---- s:0131 b:0131 l:000130 d:000130 FINISH c:0030 p:---- s:0129 b:0129 l:000124 d:000128 IFUNC :hash c:0029 p:---- s:0127 b:0127 l:000126 d:000126 CFUNC :each c:0028 p:---- s:0125 b:0125 l:000124 d:000124 CFUNC :inject c:0027 p:0013 s:0121 b:0121 l:000120 d:000120 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3/lib/libxml/attributes.rb:5 c:0026 p:0461 s:0118 b:0117 l:000082 d:000116 BLOCK /home/tp/ruby-test/roo/lib/roo/excelx.rb:448 c:0025 p:0028 s:0106 b:0106 l:000097 d:000105 BLOCK /usr/local/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3/lib/libxml/node.rb:112 c:0024 p:---- s:0103 b:0103 l:000102 d:000102 FINISH c:0023 p:---- s:0101 b:0101 l:000100 d:000100 CFUNC :each c:0022 p:0011 s:0098 b:0098 l:000097 d:000097 METHOD /usr/local/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3/lib/libxml/node.rb:111 c:0021 p:0148 s:0095 b:0095 l:000082 d:000094 BLOCK /home/tp/ruby-test/roo/lib/roo/excelx.rb:407 c:0020 p:---- s:0088 b:0088 l:000087 d:000087 FINISH c:0019 p:---- s:0086 b:0086 l:000085 d:000085 CFUNC :each c:0018 p:0144 s:0083 b:0083 l:000082 d:000082 METHOD /home/tp/ruby-test/roo/lib/roo/excelx.rb:395 c:0017 p:0035 s:0077 b:0077 l:000076 d:000076 METHOD /home/tp/ruby-test/roo/lib/roo/excelx.rb:153 c:0016 p:0018 s:0063 b:0061 l:000053 d:000060 BLOCK /home/tp/ruby-test/roo/test/test_roo.rb:1004 c:0015 p:0217 s:0058 b:0058 l:000057 d:000057 METHOD /home/tp/ruby-test/roo/test/test_roo.rb:157 c:0014 p:0021 s:0054 b:0054 l:000053 d:000053 METHOD /home/tp/ruby-test/roo/test/test_roo.rb:1003 c:0013 p:0062 s:0051 b:0051 l:000050 d:000050 METHOD /usr/local/lib/ruby/1.9.1/minitest/unit.rb:458 c:0012 p:0109 s:0045 b:0045 l:000044 d:000044 METHOD /home/tp/ruby-test/roo/test/test_roo.rb:99 c:0011 p:0090 s:0037 b:0037 l:000018 d:000036 BLOCK /usr/local/lib/ruby/1.9.1/minitest/unit.rb:426 c:0010 p:---- s:0032 b:0032 l:000031 d:000031 FINISH c:0009 p:---- s:0030 b:0030 l:000029 d:000029 CFUNC :each c:0008 p:0026 s:0027 b:0027 l:000018 d:000026 BLOCK /usr/local/lib/ruby/1.9.1/minitest/unit.rb:420 c:0007 p:---- s:0024 b:0024 l:000023 d:000023 FINISH c:0006 p:---- s:0022 b:0022 l:000021 d:000021 CFUNC :each c:0005 p:0080 s:0019 b:0019 l:000018 d:000018 METHOD /usr/local/lib/ruby/1.9.1/minitest/unit.rb:419 c:0004 p:0153 s:0014 b:0014 l:000013 d:000013 METHOD /usr/local/lib/ruby/1.9.1/minitest/unit.rb:393 c:0003 p:0041 s:0007 b:0007 l:0014f4 d:000006 BLOCK /usr/local/lib/ruby/1.9.1/minitest/unit.rb:334 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:0000 s:0002 b:0002 l:000654 d:000654 TOP --------------------------- /usr/local/lib/ruby/1.9.1/minitest/unit.rb:334:in `block in autorun' /usr/local/lib/ruby/1.9.1/minitest/unit.rb:393:in `run' /usr/local/lib/ruby/1.9.1/minitest/unit.rb:419:in `run_test_suites' /usr/local/lib/ruby/1.9.1/minitest/unit.rb:419:in `each' /usr/local/lib/ruby/1.9.1/minitest/unit.rb:420:in `block in run_test_suites' /usr/local/lib/ruby/1.9.1/minitest/unit.rb:420:in `each' /usr/local/lib/ruby/1.9.1/minitest/unit.rb:426:in `block (2 levels) in run_test_suites' /home/tp/ruby-test/roo/test/test_roo.rb:99:in `run' /usr/local/lib/ruby/1.9.1/minitest/unit.rb:458:in `run' /home/tp/ruby-test/roo/test/test_roo.rb:1003:in `test_seiten_als_date' /home/tp/ruby-test/roo/test/test_roo.rb:157:in `with_each_spreadsheet' /home/tp/ruby-test/roo/test/test_roo.rb:1004:in `block in test_seiten_als_date' /home/tp/ruby-test/roo/lib/roo/excelx.rb:153:in `cell' /home/tp/ruby-test/roo/lib/roo/excelx.rb:395:in `read_cells' /home/tp/ruby-test/roo/lib/roo/excelx.rb:395:in `each' /home/tp/ruby-test/roo/lib/roo/excelx.rb:407:in `block in read_cells' /usr/local/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3/lib/libxml/node.rb:111:in `each_element' /usr/local/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3/lib/libxml/node.rb:111:in `each' /usr/local/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3/lib/libxml/node.rb:112:in `block in each_element' /home/tp/ruby-test/roo/lib/roo/excelx.rb:448:in `block (2 levels) in read_cells' /usr/local/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3/lib/libxml/attributes.rb:5:in `to_h' /usr/local/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3/lib/libxml/attributes.rb:5:in `inject' /usr/local/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3/lib/libxml/attributes.rb:5:in `each' /usr/local/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3/lib/libxml/attributes.rb:6:in `block in to_h' -- C level backtrace information ------------------------------------------- /usr/local/bin/ruby(rb_vm_bugreport+0xb5) [0x81652f5] /usr/local/bin/ruby [0x81a0d7b] /usr/local/bin/ruby(rb_bug+0x28) [0x81a0e08] /usr/local/bin/ruby [0x80fa015] [0xb7f71410] /usr/local/bin/ruby(rb_method_entry+0x56) [0x8152576] /usr/local/bin/ruby [0x815be1f] /usr/local/bin/ruby [0x815c5f2] /usr/local/bin/ruby [0x8163d88] /usr/local/bin/ruby(rb_yield_values+0x7a) [0x816444a] /usr/local/bin/ruby [0x819ca15] /usr/local/bin/ruby [0x8163f51] /usr/local/bin/ruby(rb_yield+0x4f) [0x81640ff] /usr/local/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3/lib/libxml_ruby.so [0xb7c60d5b] /usr/local/bin/ruby [0x815db6a] /usr/local/bin/ruby [0x815dfc9] /usr/local/bin/ruby [0x81616dd] /usr/local/bin/ruby(rb_iterate+0x128) [0x8151708] /usr/local/bin/ruby(rb_block_call+0x3f) [0x81517af] /usr/local/bin/ruby [0x819b912] /usr/local/bin/ruby [0x815132d] /usr/local/bin/ruby [0x8151467] /usr/local/bin/ruby [0x8161a75] /usr/local/bin/ruby [0x8155ce5] /usr/local/bin/ruby [0x815c5f2] /usr/local/bin/ruby [0x8163d88] /usr/local/bin/ruby(rb_yield+0x4f) [0x81640ff] /usr/local/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3/lib/libxml_ruby.so [0xb7c625c3] /usr/local/bin/ruby [0x8151467] /usr/local/bin/ruby [0x8161a75] /usr/local/bin/ruby [0x8155ce5] /usr/local/bin/ruby [0x815c5f2] /usr/local/bin/ruby [0x8163d88] /usr/local/bin/ruby(rb_yield+0x4f) [0x81640ff] /usr/local/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3/lib/libxml_ruby.so [0xb7c5f5c0] /usr/local/bin/ruby [0x8151467] /usr/local/bin/ruby [0x8161a75] /usr/local/bin/ruby [0x8155ce5] /usr/local/bin/ruby [0x815c5f2] /usr/local/bin/ruby [0x8163d88] /usr/local/bin/ruby(rb_yield+0x4f) [0x81640ff] /usr/local/bin/ruby(rb_ary_each+0x41) [0x8173b81] /usr/local/bin/ruby [0x8151467] /usr/local/bin/ruby [0x8161a75] /usr/local/bin/ruby [0x8155ce5] /usr/local/bin/ruby [0x815c5f2] /usr/local/bin/ruby [0x8163d88] /usr/local/bin/ruby(rb_yield+0x4f) [0x81640ff] /usr/local/bin/ruby(rb_ary_each+0x41) [0x8173b81] /usr/local/bin/ruby [0x8151467] /usr/local/bin/ruby [0x8161a75] /usr/local/bin/ruby [0x8155ce5] /usr/local/bin/ruby [0x815c5f2] /usr/local/bin/ruby(rb_vm_invoke_proc+0x246) [0x815d826] /usr/local/bin/ruby(rb_proc_call+0x47) [0x8060a17] /usr/local/bin/ruby(rb_call_end_proc+0x1a) [0x805d77a] /usr/local/bin/ruby(rb_exec_end_proc+0x19c) [0x805eaec] /usr/local/bin/ruby [0x805eb87] /usr/local/bin/ruby(ruby_cleanup+0x87) [0x805ec47] /usr/local/bin/ruby(ruby_run_node+0x4e) [0x805ef1e] /usr/local/bin/ruby(main+0x60) [0x805ca50] /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb7d8e775] /usr/local/bin/ruby [0x805c951] [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 Aborted ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 22:57 Message: Can you try this in the latest release - I believe it is fixed. Thanks - Charlie ---------------------------------------------------------------------- Comment By: Thomas Preymesser (thopre) Date: 2009-07-22 07:02 Message: the error can be reproduced if you install my gem 'roo' (v. 1.3.8), replace the test_roo.rb file with the test_roo.rb file in the attachment and then run 'ruby test/test_roo.rb' from the root directory of the gem. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=26672&group_id=494 From noreply at rubyforge.org Sat Apr 23 01:38:49 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 23 Apr 2011 01:38:49 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-26839 ] segfault: to_s on removed node Message-ID: <20110423053849.EC7591858363@rubyforge.org> Bugs item #26839, was opened at 2009-08-04 01:49 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=26839&group_id=494 Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: sebastian de castelberg (sdecastelberg) >Assigned to: Charlie Savage (cfis) Summary: segfault: to_s on removed node Initial Comment: The following ruby snippet causes a segmentation fault with libxml-ruby 1.1.3. ####File: libxml_segfault.rb require 'rubygems' require 'xml/libxml' root = XML::Node.new("root") a = XML::Node.new("a") b = XML::Node.new("b") root << a root << b a.parent.remove! puts b ####End File Installed versions ================== ruby: 1.8.7-p174 libxml-ruby: 1.1.3 backtrace ========= gdb --args ruby libxml_segfault.rb GNU gdb 6.3.50-20050815 (Apple version gdb-768) (Tue Oct 2 04:07:49 UTC 2007) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-apple-darwin"...Reading symbols for shared libraries .... done (gdb) run Starting program: /Users/sdecaste/apps/ruby18/bin/ruby libxml_segfault.rb Reading symbols for shared libraries +++... done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries . done Reading symbols for shared libraries .... done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000020 0x001dd818 in rxml_node_to_s (argc=0, argv=0x0, self=5899740) at ruby_xml_node.c:571 571 xmlNodeDumpOutput(output, xnode->doc, xnode, level, indent, xencoding); (gdb) backtrace #0 0x001dd818 in rxml_node_to_s (argc=0, argv=0x0, self=5899740) at ruby_xml_node.c:571 #1 0x0001aaa5 in call_cfunc (func=0x1dd6c0 , recv=5899740, len=, argc=0, argv=0x0) at eval.c:5762 #2 0x00024ad2 in rb_call0 (klass=6063400, recv=5899740, id=3137, oid=3137, argc=125864, argv=0x0, body=0x5c7e48, flags=) at eval.c:5917 #3 0x000256dc in rb_call (klass=6063400, recv=5899740, mid=3137, argc=0, argv=0x0, scope=0, self=1296720) at eval.c:6164 #4 0x00023017 in rb_eval (self=1296720, n=) at eval.c:3503 #5 0x00021fb0 in rb_eval (self=1296720, n=) at eval.c:3513 #6 0x00032e67 in ruby_exec_internal () at eval.c:1652 #7 0x00032ea6 in ruby_exec () at eval.c:1672 #8 0x00032eda in ruby_run () at eval.c:1682 #9 0x000019dd in main (argc=0, argv=0x0, envp=0xbffff384) at main.c:48 With libxml-ruby 0.8.3 ====================== When running the script with libxml-ruby 0.8.3, puts b prints the content of b. ruby libxml_segfault.rb ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 23:38 Message: Hi Sebastian, Thanks for the report. This has been fixed in trunk and will be in the next libxml-ruby release. Charlie ---------------------------------------------------------------------- Comment By: sebastian de castelberg (sdecastelberg) Date: 2009-08-04 02:04 Message: btw: libxml versions used: libxml2.2.dylib (os x 10.5.7) and libxml2.so.2.7.3 (linux) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=26839&group_id=494 From noreply at rubyforge.org Sat Apr 23 01:45:38 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 23 Apr 2011 01:45:38 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-26863 ] Libxml::Node#children causes segfault Message-ID: <20110423054541.B9DBE1858367@rubyforge.org> Bugs item #26863, was opened at 2009-08-04 22:27 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=26863&group_id=494 Category: None Group: None Status: Open >Resolution: Accepted Priority: 3 Submitted By: Nobody (None) >Assigned to: Charlie Savage (cfis) Summary: Libxml::Node#children causes segfault Initial Comment: The following ruby snippet causes a segmentation fault with ruby 1.8.7 p160 and libxml-ruby 1.1.3. ###File: libxml_test.rb### #! /usr/local/bin/ruby require "rubygems" require 'xml' require 'xml/libxml' def child(e) e.children.each do |n| # segfault child(n) end end def make_text(txt) return end file = File.open("html") regexp_result = file.read regexp_rexml_result = XML::Parser.string(regexp_result) doc = regexp_rexml_result.parse cnt = 1 loop do elem = doc.find("//*") elem.each{|e| child(e) } p cnt cnt+=1 end ###result### 1 2 3 4 ./libxml_test.rb:8: [BUG] Segmentation fault ruby 1.8.7 (2009-04-08 patchlevel 160) [x86_64-linux] ###trace### gdb --args ruby ./libxml_test.rb GNU gdb Fedora (6.8-27.el5) Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu"... (gdb) run Starting program: /usr/local/bin/ruby ./libxml_test.rb [Thread debugging using libthread_db enabled] [New Thread 0x2b59906fb1b0 (LWP 25792)] 1 2 3 4 Program received signal SIGSEGV, Segmentation fault. 0x0000000000472959 in st_lookup (table=0x2b599137c7e0, key=10937, value=0x7fffbc525290) at st.c:250 250 hash_val = do_hash(key, table); (gdb) backtrace #0 0x0000000000472959 in st_lookup (table=0x2b599137c7e0, key=10937, value=0x7fffbc525290) at st.c:250 #1 0x00000000004115e5 in search_method (klass=47663683986880, id=10937, origin=0x7fffbc5252c8) at eval.c:475 #2 0x0000000000411657 in rb_get_method_body (klassp=0x7fffbc525310, idp=0x7fffbc525318, noexp=0x7fffbc525324) at eval.c:496 #3 0x000000000041c215 in rb_call (klass=47663683986880, recv=47663683986080, mid=10937, argc=0, argv=0x0, scope=0, self=47663675716280) at eval.c:6128 #4 0x0000000000416ebb in rb_eval (self=47663675716280, n=) at eval.c:3494 #5 0x0000000000416dc7 in rb_eval (self=47663675716280, n=) at eval.c:3488 #6 0x0000000000418fcf in rb_eval (self=47663675716280, n=) at eval.c:3224 #7 0x000000000041bda0 in rb_call0 (klass=47663675726440, recv=47663675716280, id=10921, oid=, argc=11097, argv=0x7fffbc526048, body=0x2b5990739640, flags=) at eval.c:6057 #8 0x000000000041c258 in rb_call (klass=47663675726440, recv=47663675716280, mid=10921, argc=1, argv=0x7fffbc526040, scope=1, self=47663675716280) at eval.c:6153 #9 0x0000000000416ff3 in rb_eval (self=, n=) at eval.c:3509 #10 0x000000000041a2b5 in rb_yield_0 (val=47663683986080, self=47663675716280, klass=0, flags=, avalue=0) at eval.c:5079 #11 0x0000000000486791 in rb_ary_each (ary=47663675330080) at array.c:1261 #12 0x000000000041b54a in rb_call0 (klass=47663675661400, recv=47663675330080, id=4001, oid=4001, argc=0, argv=0x0, body=0x2b599074d410, flags=) at eval.c:5906 #13 0x000000000041c258 in rb_call (klass=47663675661400, recv=47663675330080, mid=4001, argc=0, argv=0x0, scope=0, self=47663675716280) at eval.c:6153 #14 0x0000000000416ebb in rb_eval (self=47663675716280, n=) at eval.c:3494 #15 0x0000000000418fcf in rb_eval (self=47663675716280, n=) at eval.c:3224 #16 0x000000000041bda0 in rb_call0 (klass=47663675726440, recv=47663675716280, id=10921, oid=, argc=0, argv=0x7fffbc527218, body=0x2b5990739640, flags=) at eval.c:6057 #17 0x000000000041c258 in rb_call (klass=47663675726440, recv=47663675716280, mid=10921, argc=1, argv=0x7fffbc527210, scope=1, self=47663675716280) at eval.c:6153 #18 0x0000000000416ff3 in rb_eval (self=, n=) at eval.c:3509 #19 0x000000000041a2b5 in rb_yield_0 (val=47663683988920, self=47663675716280, klass=0, flags=, avalue=0) at eval.c:5079 #20 0x0000000000486791 in rb_ary_each (ary=47663675344200) at array.c:1261 #21 0x000000000041b54a in rb_call0 (klass=47663675661400, recv=47663675344200, id=4001, oid=4001, argc=0, argv=0x0, body=0x2b599074d410, flags=) at eval.c:5906 #22 0x000000000041c258 in rb_call (klass=47663675661400, recv=47663675344200, mid=4001, argc=0, argv=0x0, scope=0, self=47663675716280) at eval.c:6153 #23 0x0000000000416ebb in rb_eval (self=47663675716280, n=) at eval.c:3494 #24 0x0000000000418fcf in rb_eval (self=47663675716280, n=) at eval.c:3224 #25 0x000000000041bda0 in rb_call0 (klass=47663675726440, recv=47663675716280, id=10921, oid=, argc=32767, argv=0x7fffbc5283e8, body=0x2b5990739640, flags=) at eval.c:6057 #26 0x000000000041c258 in rb_call (klass=47663675726440, recv=47663675716280, mid=10921, argc=1, argv=0x7fffbc5283e0, scope=1, self=47663675716280) at eval.c:6153 #27 0x0000000000416ff3 in rb_eval (self=, n=) at eval.c:3509 #28 0x000000000041a2b5 in rb_yield_0 (val=47663684015880, self=47663675716280, klass=0, flags=, avalue=0) at eval.c:5079 #29 0x00002b5991381066 in rxml_xpath_object_each (self=47663678310840) at ruby_xml_xpath_object.c:184 #30 0x000000000041b54a in rb_call0 (klass=47663682999600, recv=47663678310840, id=4001, oid=4001, argc=0, argv=0x0, body=0x2b5990e4d440, flags=) at eval.c:5906 #31 0x000000000041c258 in rb_call (klass=47663682999600, recv=47663678310840, mid=4001, argc=0, argv=0x0, scope=0, self=47663675716280) at eval.c:6153 #32 0x0000000000416ebb in rb_eval (self=47663675716280, n=) at eval.c:3494 #33 0x0000000000418fcf in rb_eval (self=47663675716280, n=) at eval.c:3224 #34 0x000000000041a2b5 in rb_yield_0 (val=6, self=47663675716280, klass=0, flags=, avalue=0) at eval.c:5079 #35 0x0000000000424e47 in loop_i () at eval.c:5211 #36 0x0000000000410704 in rb_rescue2 (b_proc=0x424e30 , data1=0, r_proc=0, data2=0) at eval.c:5475 #37 0x00000000004108e0 in rb_f_loop () at eval.c:5236 #38 0x000000000041b54a in rb_call0 (klass=47663675726160, recv=47663675716280, id=4121, oid=4121, argc=0, argv=0x0, body=0x2b5990759b98, flags=) at eval.c:5906 #39 0x000000000041c258 in rb_call (klass=47663675726160, recv=47663675716280, mid=4121, argc=0, argv=0x0, scope=1, self=47663675716280) at eval.c:6153 #40 0x0000000000416ff3 in rb_eval (self=, n=) at eval.c:3509 #41 0x0000000000418fcf in rb_eval (self=47663675716280, n=) at eval.c:3224 #42 0x00000000004279e9 in ruby_exec_internal () at eval.c:1643 #43 0x0000000000427a35 in ruby_exec () at eval.c:1663 #44 0x0000000000427a5f in ruby_run () at eval.c:1673 #45 0x000000000040ddc3 in main (argc=2, argv=0x7fffbc52a328, envp=) at main.c:48 ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 23:45 Message: Does the html file have specific content, or just any html file? If I save this page to the file html, and run the script, all is well with the new release. Could you retest with the new release? Thanks - Charlie ---------------------------------------------------------------------- Comment By: Josh Glover (jmglov) Date: 2011-03-04 07:58 Message: Ah, but this can't be right: (gdb) up 5 #5 0x0000000000491639 in st_lookup (table=0x7f2b21c20660, key=10985, value=0x7fffc02954d8) at st.c:250 250 hash_val = do_hash(key, table); table is again WAAAAAY out there; no way that's going to be addressable. table comes from eval.c#L486 : 478 static NODE* 479 search_method(klass, id, origin) 480 VALUE klass, *origin; 481 ID id; 482 { 483 st_data_t body; 484 485 if (!klass) return 0; 486 while (!st_lookup(RCLASS(klass)->m_tbl, id, &body)) { 487 klass = RCLASS(klass)->super; 488 if (!klass) return 0; 489 } 490 491 if (origin) *origin = klass; 492 return (NODE *)body; 493 } So some class has lost its pointer to its function pointer table. I don't think I have the time to take this much further, but hopefully this info is useful to someone. :-/ ---------------------------------------------------------------------- Comment By: Josh Glover (jmglov) Date: 2011-03-04 07:03 Message: (gdb) info locals hash_val = 0 bin_pos = 32122193 ptr = 0x7f2b21f2dd40 (gdb) l 245 st_data_t *value; 246 { 247 unsigned int hash_val, bin_pos; 248 register st_table_entry *ptr; 249 250 hash_val = do_hash(key, table); 251 FIND_ENTRY(table, ptr, hash_val, bin_pos); 252 253 if (ptr == 0) { 254 return 0; Oops, ptr hasn't been assigned to yet at L250. I'll keep digging. BTW, I compiled Ruby like this to get all of the debug symbols: CFLAGS='-O0 -g -Wall' ./configure --disable-pthread && make ---------------------------------------------------------------------- Comment By: Josh Glover (jmglov) Date: 2011-03-04 07:01 Message: : josh at josh; gdb ~/tmp/ruby-1.8.7-p334/ruby core GNU gdb (GDB) 7.2-ubuntu [...] Program terminated with signal 6, Aborted. #0 0x00007f2b225c5ba5 in raise (sig=) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. in ../nptl/sysdeps/unix/sysv/linux/raise.c (gdb) bt #0 0x00007f2b225c5ba5 in raise (sig=) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x00007f2b225c96b0 in abort () at abort.c:92 #2 0x00000000004c284e in rb_bug (fmt=0x4e1b13 "Segmentation fault") at error.c:213 #3 0x000000000048e1b9 in sigsegv (sig=11) at signal.c:634 #4 #5 0x0000000000491639 in st_lookup (table=0x7f2b21c20660, key=10985, value=0x7fffc02954d8) at st.c:250 #6 0x000000000040e861 in search_method (klass=139823229885920, id=10985, origin=0x7fffc0295528) at eval.c:486 [...] (gdb) up 5 #5 0x0000000000491639 in st_lookup (table=0x7f2b21c20660, key=10985, value=0x7fffc02954d8) at st.c:250 250 hash_val = do_hash(key, table); (gdb) info locals hash_val = 0 bin_pos = 32122193 ptr = 0x7f2b21f2dd40 0x7f2b21f2dd40 is 139_823_229_885_760 in decimal, so unless my ThinkPad T510i has 139 terrabytes of memory, this is a segmentation fault. :) ---------------------------------------------------------------------- Comment By: Josh Glover (jmglov) Date: 2011-03-04 06:55 Message: Breaks in ruby-1.8.7-p334: : josh at josh; ~/tmp/ruby-1.8.7-p334/ruby test/tc_node_child.rb >/dev/null test/tc_node_child.rb:21: [BUG] Segmentation fault ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux] Aborted (core dumped) ---------------------------------------------------------------------- Comment By: Josh Glover (jmglov) Date: 2011-03-04 06:42 Message: Interesting data point, it works on ruby 1.8.7_0 but not 1.8.7_299: : josh at josh; /usr/bin/ruby -v ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux] : josh at josh; /usr/bin/ruby test/tc_node_child.rb >/dev/null test/tc_node_child.rb:21: [BUG] Segmentation fault ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux] Aborted (core dumped) : josh at josh; ~/tmp/ruby-1.8.7/ruby -v ruby 1.8.7 (2008-05-31 patchlevel 0) [x86_64-linux] : josh at josh; ~/tmp/ruby-1.8.7/ruby test/tc_node_child.rb >/dev/null # Victory! ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=26863&group_id=494 From noreply at rubyforge.org Sat Apr 23 01:47:18 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 23 Apr 2011 01:47:18 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-26888 ] Error in documentation of XML::Document#to_s Message-ID: <20110423054718.B2FD81858367@rubyforge.org> Bugs item #26888, was opened at 2009-08-07 04:46 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=26888&group_id=494 Category: General Group: v0.5 >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Lars Haugseth (lhz) >Assigned to: Charlie Savage (cfis) Summary: Error in documentation of XML::Document#to_s Initial Comment: Documentation for the method XML::Document#to_s includes the following example: document.to_s(:indent => true, :encoding => 'UTF-8') ? "string" This doesn't work. The correct way (mentioned in the body of the method documentation) is: document.to_s(:indent => true, :encoding => XML::Encoding::UTF8) ? "string" ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 23:47 Message: Hi Lars, Thanks - fixed in trunk. Charlie ---------------------------------------------------------------------- Comment By: Lars Haugseth (lhz) Date: 2009-08-07 05:07 Message: EDIT: There's another error in the body documentation. The correct constant is actually XML::Encoding::UTF_8. Note the underscore, which is missing in the documentation. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=26888&group_id=494 From noreply at rubyforge.org Sat Apr 23 01:48:59 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 23 Apr 2011 01:48:59 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-27081 ] Segmentation Fault with Ruby1.9.1 Message-ID: <20110423054900.233E01858367@rubyforge.org> Bugs item #27081, was opened at 2009-09-09 23:39 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27081&group_id=494 Category: None Group: None >Status: Closed Resolution: None Priority: 3 Submitted By: Kenji Takahashi (azamew) >Assigned to: Charlie Savage (cfis) Summary: Segmentation Fault with Ruby1.9.1 Initial Comment: I encountered segmentation fault when I used LibXML-ruby with Ruby 1.9.1. My environment is as follows: OS: Windows XP Professional SP2 Ruby: ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mswin32] LibXml-ruby: 1.1.3 I can reproduce error just running ruby script which only require 'xml'. I can run libxml-ruby successfully with ruby 1.8.6 and 1.8.7. Following is the error message: ============================================================ C:/ruby19/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3-x86-mswin32-60/lib/libxml_r uby.so: [BUG] Segmentation fault ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mswin32] -- control frame ---------- c:0011 p:-2605816 s:0028 b:0028 l:000027 d:000027 TOP c:0010 p:---- s:0026 b:0026 l:000025 d:000025 CFUNC :require c:0009 p:0072 s:0022 b:0022 l:000021 d:000021 TOP C:/ruby19/lib/ruby/gems/1.9 .1/gems/libxml-ruby-1.1.3-x86-mswin32-60/lib/libxml.rb:9 c:0008 p:---- s:0020 b:0020 l:000019 d:000019 FINISH c:0007 p:---- s:0018 b:0018 l:000017 d:000017 CFUNC :require c:0006 p:0011 s:0014 b:0014 l:000013 d:000013 TOP C:/ruby19/lib/ruby/gems/1.9 .1/gems/libxml-ruby-1.1.3-x86-mswin32-60/lib/xml.rb:11 c:0005 p:---- s:0012 b:0012 l:000011 d:000011 FINISH c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :require c:0003 p:0011 s:0006 b:0006 l:001fb4 d:002484 EVAL test.rb:1 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:0000 s:0002 b:0002 l:001fb4 d:001fb4 TOP
:33 --------------------------- -- Ruby level backtrace information----------------------------------------- C:/ruby19/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3-x86-mswin32-60/lib/libxml.rb:9:in `require' C:/ruby19/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3-x86-mswin32-60/lib/libxml.rb:9:in `' C:/ruby19/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3-x86-mswin32-60/lib/xml.rb:11:in `require' C:/ruby19/lib/ruby/gems/1.9.1/gems/libxml-ruby-1.1.3-x86-mswin32-60/lib/xml.rb:11:in `' test.rb:1:in `require' test.rb:1:in `
' [NOTE] You may encounter a bug of Ruby interpreter. Bug reports are welcome. For details: http://www.ruby-lang.org/bugreport.html This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. ============================================================ Could you repair this issue? ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 23:48 Message: Ok, closing this. Should be fixed in latest release. Charlie ---------------------------------------------------------------------- Comment By: Charlie Savage (cfis) Date: 2011-04-18 12:34 Message: Could you try this again with the latest release? Thanks - Charlie ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27081&group_id=494 From noreply at rubyforge.org Sat Apr 23 01:50:25 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 23 Apr 2011 01:50:25 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-27438 ] libxml-ruby-1.1.3 - Schema validation for schema containing xs:any Message-ID: <20110423055026.1ED9B1858367@rubyforge.org> Bugs item #27438, was opened at 2009-11-15 22:18 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27438&group_id=494 Category: General Group: None Status: Open >Resolution: Accepted Priority: 3 Submitted By: Sudhindra K (sudhi312) >Assigned to: Charlie Savage (cfis) Summary: libxml-ruby-1.1.3 - Schema validation for schema containing xs:any Initial Comment: Hi, I cannot get the schema validation working for a schema containing . From the forum I cam to know that this is a known limitation, considering that this is so frequently used by schema developers can this be fixed? My question to forum and the reply -- ---------- Forwarded message ---------- From: Darko Miletic Date: Wed, Nov 11, 2009 at 6:50 PM Subject: Re: [xml] Regarding LibXML Schema validation To: Sudhindra Kulkarni Cc: xml at gnome.org Sudhindra Kulkarni wrote: Hi, I have a problem validating a xml generated from a schema which contains an element having . When I try to include a element from another schema I get an error "No matching global element declaration available but demanded by the strict wildcard" This is a limitation of libxml. You must have all declarations from all schemas in one file. So if your xml file uses 6 schemas in order to validate them in libxml you must create new schema that includes all 6 separate schemas and than use that xsd for validation. Something like this: ="" xmlns: ="" xmlns: ="" version="1.0" elementFormDefault ="qualified" attributeFormDefault="unqualified" > -------------- Regards, Sudhindra ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 23:50 Message: Hi Sudhindra, Do you still want us to look into this issue? Thanks - Charlie ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27438&group_id=494 From noreply at rubyforge.org Sat Apr 23 01:53:40 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 23 Apr 2011 01:53:40 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-27419 ] rb_gc_mark(): unknown data type starting in 1.1.3 Message-ID: <20110423055340.4C7721858367@rubyforge.org> Bugs item #27419, was opened at 2009-11-10 17:30 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27419&group_id=494 Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Jason Heiss (jheiss) >Assigned to: Charlie Savage (cfis) Summary: rb_gc_mark(): unknown data type starting in 1.1.3 Initial Comment: I upgraded my Rails app which uses libxml to libxml-ruby 1.1.3 and it crashes in the same spot in my test suite about half the time with this error: /home/t/ruby-ypc/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/module/introspection.rb:73: [BUG] rb_gc_mark(): unknown data type 0x0(0x58ce300) non object ruby 1.8.6 (2008-03-03) [x86_64-linux] Rolling back to 1.1.2 or earlier makes the problem go away. I'm not quite sure what further information would be useful, but I would be happy to provide whatever would be useful. ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 23:53 Message: This should be fixed in the latest release. Thanks - Charlie ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27419&group_id=494 From noreply at rubyforge.org Sat Apr 23 01:54:07 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 23 Apr 2011 01:54:07 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-28693 ] Too many open files after many calls to Document.file Message-ID: <20110423055407.6F025185836B@rubyforge.org> Bugs item #28693, was opened at 2010-11-06 09:17 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28693&group_id=494 Category: General Group: None Status: Open >Resolution: Accepted Priority: 3 Submitted By: James Pharaoh (jamespharaoh) >Assigned to: Charlie Savage (cfis) Summary: Too many open files after many calls to Document.file Initial Comment: Making a lot of calls to Document.file will result in a "too many open files error". I think what is happening is that the parser isn't cleaned up until it is finalized by garbage collection. Calling GC.start from time to time supresses this error and is a workaround. Really there should be a way of telling the parser to clean up its resources, and convenience methods such as Document.file should be using it. Perhaps even the parser should be expected to clean up its resources as soon as the document is parsed, I'm not entirely sure. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28693&group_id=494 From noreply at rubyforge.org Sat Apr 23 01:54:28 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 23 Apr 2011 01:54:28 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-29140 ] segfaults randomly Message-ID: <20110423055428.71C91185836B@rubyforge.org> Bugs item #29140, was opened at 2011-04-21 07:46 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=29140&group_id=494 Category: memory Group: None Status: Open >Resolution: Accepted Priority: 3 Submitted By: James Pharaoh (jamespharaoh) >Assigned to: Charlie Savage (cfis) Summary: segfaults randomly Initial Comment: I am getting segfaults pretty regularly in my ruby 1.9.1 webrick application. They are always in a block which is accessing libxml nodes. Here's an example, I can add more as I get them, or provide any other help solving this. I don't really know where to start. /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/home.rb:15: [BUG] Segmentation fault ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux] -- control frame ---------- c:0019 p:---- s:0088 b:0088 l:000087 d:000087 CFUNC :[] c:0018 p:0015 s:0084 b:0084 l:000074 d:000083 BLOCK /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/home.rb:15 c:0017 p:---- s:0080 b:0080 l:000079 d:000079 FINISH c:0016 p:---- s:0078 b:0078 l:000077 d:000077 CFUNC :sort! c:0015 p:0063 s:0075 b:0075 l:000074 d:000074 METHOD /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/home.rb:15 c:0014 p:0188 s:0069 b:0069 l:000068 d:000068 METHOD /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/consolehandler.rb:10 c:0013 p:0078 s:0062 b:0062 l:000620 d:000061 BLOCK /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/server.rb:92 c:0012 p:---- s:0059 b:0059 l:000058 d:000058 FINISH c:0011 p:---- s:0057 b:0057 l:000056 d:000056 CFUNC :catch c:0010 p:0148 s:0053 b:0053 l:000620 d:002360 BLOCK /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/server.rb:86 c:0009 p:---- s:0048 b:0048 l:000047 d:000047 FINISH c:0008 p:---- s:0046 b:0046 l:000045 d:000045 CFUNC :call c:0007 p:0017 s:0041 b:0041 l:000040 d:000040 METHOD /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/server.rb:16 c:0006 p:0056 s:0036 b:0036 l:000035 d:000035 METHOD /usr/lib/ruby/1.9.1/webrick/httpservlet/abstract.rb:35 c:0005 p:0257 s:0030 b:0030 l:000029 d:000029 METHOD /usr/lib/ruby/1.9.1/webrick/httpserver.rb:111 c:0004 p:0393 s:0020 b:0020 l:000019 d:000019 METHOD /usr/lib/ruby/1.9.1/webrick/httpserver.rb:70 c:0003 p:0126 s:0009 b:0009 l:000c18 d:000008 BLOCK /usr/lib/ruby/1.9.1/webrick/server.rb:183 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:---- s:0002 b:0002 l:000001 d:000001 TOP --------------------------- -- Ruby level backtrace information ---------------------------------------- /usr/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread' /usr/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run' /usr/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service' /usr/lib/ruby/1.9.1/webrick/httpservlet/abstract.rb:35:in `service' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/server.rb:16:in `do_GET' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/server.rb:16:in `call' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/server.rb:86:in `block in run' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/server.rb:86:in `catch' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/server.rb:92:in `block (2 levels) in run' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/consolehandler.rb:10:in `handle' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/home.rb:15:in `handle' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/home.rb:15:in `sort!' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/home.rb:15:in `block in handle' /home/james/projects/zattikka-mandar/mandar/ruby/mandar/console/home.rb:15:in `[]' *** glibc detected *** ruby1.9.1: malloc(): memory corruption: 0x000000000325bc00 *** ---------------------------------------------------------------------- Comment By: Charlie Savage (cfis) Date: 2011-04-22 21:23 Message: Have you updated to the latest libxml version? What is the ruby code you are using? And what data is it trying to parse? Thanks - Charlie ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=29140&group_id=494 From noreply at rubyforge.org Mon Apr 25 13:42:51 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 25 Apr 2011 13:42:51 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-27848 ] Error#code_to_s gives incosistent answer (sometimes wrong) Message-ID: <20110425174251.5299F1858378@rubyforge.org> Bugs item #27848, was opened at 2010-02-17 13:52 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27848&group_id=494 Category: General Group: None Status: Closed Resolution: Accepted Priority: 3 Submitted By: Jarl Friis (jarl) Assigned to: Charlie Savage (cfis) Summary: Error#code_to_s gives incosistent answer (sometimes wrong) Initial Comment: Hi. Version 1.1.3 I experience that LibXML::XML::Error#code_to_s gives answers that varies arbitrary. If I have a Empty document, the parse will give me a Error object with code 4. but when I use code_to_s on that object it some times returns "DOCUMENT EMPTY" and sometimes "DTD" I believe it is because the constants defined in Error are not prefixed (as they are in libxml), hence there are two constants with the same value: irb(main):004:0> XML::Error.const_get("DTD") => 4 irb(main):005:0> XML::Error.const_get("DOCUMENT_EMPTY") => 4 Jarl ---------------------------------------------------------------------- >Comment By: Jarl Friis (jarl) Date: 2011-04-25 19:42 Message: So what is the reason that this bug has been marked closed. Is it fixed? If so, in what version. ---------------------------------------------------------------------- Comment By: Charlie Savage (cfis) Date: 2011-04-23 06:19 Message: The code is correct. Both XML::DTD and XML::DOCUMENT_EMPTY have the same value. They come from two different enums defined in Libxml. A bit confusing I know, but correct. Thanks - Charlie ---------------------------------------------------------------------- Comment By: Jarl Friis (jarl) Date: 2010-02-17 14:31 Message: I have made a workaround file, I would not go so far as to call it a patch... It's a monkey patch. In a Rails app, the file can be placed in app/helpers, which works around the problem. Note also my new implementation only creates the number to name map once. Jarl ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27848&group_id=494 From noreply at rubyforge.org Mon Apr 25 16:13:33 2011 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 25 Apr 2011 16:13:33 -0400 (EDT) Subject: [libxml-devel] [ libxml-Bugs-27848 ] Error#code_to_s gives incosistent answer (sometimes wrong) Message-ID: <20110425201333.B7D8118583A3@rubyforge.org> Bugs item #27848, was opened at 2010-02-17 05:52 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27848&group_id=494 Category: General Group: None Status: Closed Resolution: Accepted Priority: 3 Submitted By: Jarl Friis (jarl) Assigned to: Charlie Savage (cfis) Summary: Error#code_to_s gives incosistent answer (sometimes wrong) Initial Comment: Hi. Version 1.1.3 I experience that LibXML::XML::Error#code_to_s gives answers that varies arbitrary. If I have a Empty document, the parse will give me a Error object with code 4. but when I use code_to_s on that object it some times returns "DOCUMENT EMPTY" and sometimes "DTD" I believe it is because the constants defined in Error are not prefixed (as they are in libxml), hence there are two constants with the same value: irb(main):004:0> XML::Error.const_get("DTD") => 4 irb(main):005:0> XML::Error.const_get("DOCUMENT_EMPTY") => 4 Jarl ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-25 14:13 Message: both those constants in the underlying libxml library have a value of #4. They do come from different enums: typedef enum { XML_ERR_OK = 0, XML_ERR_INTERNAL_ERROR, /* 1 */ XML_ERR_NO_MEMORY, /* 2 */ XML_ERR_DOCUMENT_START, /* 3 */ XML_ERR_DOCUMENT_EMPTY, /* 4 */ ... } xmlParserErrors; typedef enum { XML_FROM_DTD, /* The XML DTD validation with parser context*/ .... } xmlErrorDomain; So the first one is the actual error, the second one is where the error came from. Perhaps we could have added two separate classes, one for each enum, but that didn't seem worth doing since the usage should be fairly separate. One is error.code, one is error.domain. Hope that helps - not seeing that there is a bug here. Charlie ---------------------------------------------------------------------- Comment By: Jarl Friis (jarl) Date: 2011-04-25 11:42 Message: So what is the reason that this bug has been marked closed. Is it fixed? If so, in what version. ---------------------------------------------------------------------- Comment By: Charlie Savage (cfis) Date: 2011-04-22 22:19 Message: The code is correct. Both XML::DTD and XML::DOCUMENT_EMPTY have the same value. They come from two different enums defined in Libxml. A bit confusing I know, but correct. Thanks - Charlie ---------------------------------------------------------------------- Comment By: Jarl Friis (jarl) Date: 2010-02-17 06:31 Message: I have made a workaround file, I would not go so far as to call it a patch... It's a monkey patch. In a Rails app, the file can be placed in app/helpers, which works around the problem. Note also my new implementation only creates the number to name map once. Jarl ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=27848&group_id=494 From smnesari at gmail.com Tue Apr 26 12:13:54 2011 From: smnesari at gmail.com (Swetha Nesari) Date: Tue, 26 Apr 2011 12:13:54 -0400 Subject: [libxml-devel] compile libxml-ruby mannualy Message-ID: Hi, I am using Rubyinstaller on Windows 7. I tried installing libxml-ruby1.1.4 and 2.0.2 1. using the command gem install libxml-ruby 2. gem install libxml-ruby --platform=x86- mingw32 3. gem install libxml-ruby -v 2.0.2 and After that when i give 'bundle install' , I get this error : 1. Faliling to install libxml-ruby 1.1.4 native extensions 2.extconfig failure : need zlib Am I missing something here? How do you manually compile libxml-ruby for windows? Rdocs says that Win32 has all builtin binaries for libxml-ruby and its dependencies. Please, I need advice. Thanks, Swetha -------------- next part -------------- An HTML attachment was scrubbed... URL: