From transfire at gmail.com Fri Feb 1 16:29:45 2008 From: transfire at gmail.com (Trans) Date: Fri, 1 Feb 2008 13:29:45 -0800 (PST) Subject: [libxml-devel] package name: libxml-ruby -> libxml ? Message-ID: <708616c6-c77b-4c8f-b6a6-0137f8ada45a@n20g2000hsh.googlegroups.com> I think we may want to change the package name from 'libxml-ruby' to just 'libxml'. The reason I suggest this is b/c, while it might suffice as is, it's confusing in light of platform gems. Ie. the "- ruby" looks like a platform specification. I know other gems use the "- ruby" suffix to indicate a pure ruby version of an otherwise compiled library. Thoughts? T. From danj at 3skel.com Fri Feb 1 19:37:22 2008 From: danj at 3skel.com (Dan Janowski) Date: Fri, 1 Feb 2008 19:37:22 -0500 Subject: [libxml-devel] package name: libxml-ruby -> libxml ? In-Reply-To: <708616c6-c77b-4c8f-b6a6-0137f8ada45a@n20g2000hsh.googlegroups.com> References: <708616c6-c77b-4c8f-b6a6-0137f8ada45a@n20g2000hsh.googlegroups.com> Message-ID: <14E33E9D-B3D5-465B-9C07-538444835F8B@3skel.com> Never liked it much myself. Dan On Feb 1, 2008, at 16:29, Trans wrote: > I think we may want to change the package name from 'libxml-ruby' to > just 'libxml'. The reason I suggest this is b/c, while it might > suffice as is, it's confusing in light of platform gems. Ie. the "- > ruby" looks like a platform specification. I know other gems use the > "- > ruby" suffix to indicate a pure ruby version of an otherwise compiled > library. > > Thoughts? > T. > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel From cfis at savagexi.com Fri Feb 1 19:37:40 2008 From: cfis at savagexi.com (Charlie Savage) Date: Fri, 01 Feb 2008 17:37:40 -0700 Subject: [libxml-devel] package name: libxml-ruby -> libxml ? In-Reply-To: <14E33E9D-B3D5-465B-9C07-538444835F8B@3skel.com> References: <708616c6-c77b-4c8f-b6a6-0137f8ada45a@n20g2000hsh.googlegroups.com> <14E33E9D-B3D5-465B-9C07-538444835F8B@3skel.com> Message-ID: <47A3BB54.5080606@savagexi.com> rlibxml? Charlie Dan Janowski wrote: > Never liked it much myself. > > Dan > > > On Feb 1, 2008, at 16:29, Trans wrote: > >> I think we may want to change the package name from 'libxml-ruby' to >> just 'libxml'. The reason I suggest this is b/c, while it might >> suffice as is, it's confusing in light of platform gems. Ie. the "- >> ruby" looks like a platform specification. I know other gems use the >> "- >> ruby" suffix to indicate a pure ruby version of an otherwise compiled >> library. >> >> Thoughts? >> T. >> _______________________________________________ >> libxml-devel mailing list >> libxml-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/libxml-devel > > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3237 bytes Desc: S/MIME Cryptographic Signature Url : http://rubyforge.org/pipermail/libxml-devel/attachments/20080201/2c272bad/attachment.bin From saurabhnanda at gmail.com Tue Feb 5 10:08:46 2008 From: saurabhnanda at gmail.com (Saurabh Nanda) Date: Tue, 5 Feb 2008 20:38:46 +0530 Subject: [libxml-devel] Segfault while validating multiple XML files against the same schema Message-ID: <794f042d0802050708l72022c03t9925b9337e4bea21@mail.gmail.com> Hi, I'm trying to write a RESTful web service in Rails. Before processing each POST request, I want to validate the XML against an XSD schema. It does not make sense to re-read the schema each time a request is processed. Therefore, I tried loading the schema once in a global variable ($schema) at application startup (from environment.rb). However, only the first schema validation works. Whenever I post a second request, the xml.validate_schema($schema) call given in the code snippet below causes a segfault. I've tried storing loading the schema into a constant (SCHEMA) directly from environment.rb, but that too, causes a segfault. --- Code snippet --- module HelperMethods require 'xml/libxml' def self.read_schema $schema = XML::Schema.from_string(File.read('lib/schemas/trip.xsd')) end def self.do_xsd_validation(xml) error_message = "" puts("ABOUT TO VALIDATE") xml.validate_schema($schema) { |message, error| error_message += message } end end --- Relevant output, though I don't know how much it'll help --- ABOUT TO VALIDATE ./lib/helper_methods.rb:15: [BUG] Segmentation fault ruby 1.8.5 (2006-08-25) [i486-linux] Aborted (core dumped) --- in environment.rb I've put the following --- HelperMethods.read_schema Saurabh. -- http://nandz.blogspot.com http://foodieforlife.blogspot.com From saurabhnanda at gmail.com Tue Feb 5 10:20:41 2008 From: saurabhnanda at gmail.com (Saurabh Nanda) Date: Tue, 5 Feb 2008 20:50:41 +0530 Subject: [libxml-devel] Guaranteed non-crashing way to load an XML document? Message-ID: <794f042d0802050720wa83fae7jf7af24867c097118@mail.gmail.com> I have a long running RESTful web service that needs to read XML documents from HTTP content bodies. I've noticed lots of instances where it has randomly crashed due to an error in libxml. I came across the following post while digging for some clues: http://rubyforge.org/pipermail/libxml-devel/2007-November/000586.html Is there a preferred (guaranteed to not crash) way of parsing XML strings in libxml? Here's what I'm doing: parser=XML::Parser.new parser.string= content xml = parser.parse Is there a better way? I've attaced the error log, just in case it helps. Saurabh. -- http://nandz.blogspot.com http://foodieforlife.blogspot.com -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: crash-log-for-libxml.txt Url: http://rubyforge.org/pipermail/libxml-devel/attachments/20080205/6695e4de/attachment-0001.txt From noreply at rubyforge.org Tue Feb 5 09:17:24 2008 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 5 Feb 2008 09:17:24 -0500 (EST) Subject: [libxml-devel] [ libxml-Bugs-8337 ] Opening many files causes segfault on fbsd-amd64 Message-ID: <20080205141725.294651858689@rubyforge.org> Bugs item #8337, was opened at 2007-01-31 23:17 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=8337&group_id=494 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: Opening many files causes segfault on fbsd-amd64 Initial Comment: I have a number of xml files I'm parsing, and it seems the libxml-ruby will cause a segfault if I open too many files too quickly. For example, if your script test.rb is: -- require 'xml/libxml' (1..10000).each{|time| XML::Document.file('test.xml') p time if time % 100 == 0 } -- and test.xml is -- -- Then, on fbsd-amd64, you'll see 100 200 300 400 500 test.rb:5: [BUG] Segmentation fault ruby 1.8.5 (2006-08-25) [amd64-freebsd6] zsh: abort (core dumped) ruby test.rb It seems to error in the same place every time. Interestingly, for so short an XML file, if you remove the if clause from the p statement, there won't be any errors, however longer XML files will still suffer this problem. More interestingly, the problem can be avoided entirely by disabling the GC. ---------------------------------------------------------------------- Comment By: Saurabh Nanda (saurabhnanda) Date: 2008-02-05 19:47 Message: I think I'm also facing a similar issue. I'm on a 64 bit Intel machine with libxml-ruby-0.5.2. I'm trying to write a long running RESTful service in Rails. After the first few XML POSTs to the Rails server, it suddenly segfaults. I can attach the error log. How do I attach a file? ---------------------------------------------------------------------- Comment By: Dan Janowski (danj) Date: 2007-08-30 18:46 Message: There is a new memory model released but I do not have this system combo to test. Please take a few minutes and go to the project page and download the MEM2 release 0.5.0 and run the rwtest/doc_file.rb from the 'ext' directory (to use the local build instead of a system installed libxml). Please follow up. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=8337&group_id=494 From noreply at rubyforge.org Tue Feb 5 09:13:25 2008 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 5 Feb 2008 09:13:25 -0500 (EST) Subject: [libxml-devel] [ libxml-Bugs-7018 ] Parsing an empty string causes Segfault / Bus Error Message-ID: <20080205141326.07A3A1858683@rubyforge.org> Bugs item #7018, was opened at 2006-12-03 02:33 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=7018&group_id=494 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: Parsing an empty string causes Segfault / Bus Error Initial Comment: Running on Mac OS X with libxml-ruby 0.3.8.4, if you try to parse an empty string you get a segfault. irb(main):001:0> require 'rubygems' => true irb(main):002:0> require 'xml/libxml' => true irb(main):003:0> string = '' => "" irb(main):004:0> XML::Parser.string(string).parse (irb):4: [BUG] Bus Error ruby 1.8.4 (2005-12-24) [i686-darwin8.7.1] Abort trap Expected behaviour would be simlar to what a single space character gets: irb(main):001:0> require 'rubygems' => true irb(main):002:0> require 'xml/libxml' => true irb(main):003:0> string = ' ' => " " irb(main):004:0> XML::Parser.string(string).parse Entity: line 1: parser error : Start tag expected, '<' not found ^ XML::Parser::ParseError: Document didn't parse from (irb):4:in `parse' from (irb):4 irb(main):005:0> ---------------------------------------------------------------------- Comment By: Saurabh Nanda (saurabhnanda) Date: 2008-02-05 19:43 Message: I see there's a patch submitted for this already. Has this been applied? I'm running libxml-ruby-0.5.2 and still facing this issue. ---------------------------------------------------------------------- Comment By: Todd Fisher (taf2) Date: 2006-12-17 19:19 Message: Here's a patch and test. ctxt is null in the case of nil input... Index: ext/xml/ruby_xml_parser.c =================================================================== RCS file: /var/cvs/libxml/libxml/ext/xml/ruby_xml_parser.c,v retrieving revision 1.5 diff -u -r1.5 ruby_xml_parser.c --- ext/xml/ruby_xml_parser.c 20 Nov 2006 01:22:07 -0000 1.5 +++ ext/xml/ruby_xml_parser.c 17 Dec 2006 13:45:04 -0000 @@ -1123,7 +1123,9 @@ case RUBY_LIBXML_SRC_TYPE_IO: Data_Get_Struct(rxp->ctxt, ruby_xml_parser_context, rxpc); if (xmlParseDocument(rxpc->ctxt) == -1) { - xmlFreeDoc(rxpc->ctxt->myDoc); + if (rxpc->ctxt && rxpc->ctxt->myDoc) { + xmlFreeDoc(rxpc->ctxt->myDoc); + } rb_raise(eXMLParserParseError, "Document didn't parse"); } require "libxml_test" require 'test/unit' class EmptyString < Test::Unit::TestCase def test_parse_empty_string begin string = '' XML::Parser.string(string).parse rescue => e assert e, "Document didn't parse" end end end ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=7018&group_id=494 From keith at oreilly.com Tue Feb 5 10:46:20 2008 From: keith at oreilly.com (Keith Fahlgren) Date: Tue, 05 Feb 2008 07:46:20 -0800 Subject: [libxml-devel] Guaranteed non-crashing way to load an XML document? In-Reply-To: <794f042d0802050720wa83fae7jf7af24867c097118@mail.gmail.com> References: <794f042d0802050720wa83fae7jf7af24867c097118@mail.gmail.com> Message-ID: <47A884CC.9050005@oreilly.com> On 2/5/08 7:20 AM, Saurabh Nanda wrote: > Is there a preferred (guaranteed to not crash) way of parsing XML > strings in libxml? Here's what I'm doing: > > parser=XML::Parser.new > parser.string= content > xml = parser.parse > > Is there a better way? I've attaced the error log, just in case it helps. Do you have crashes that can break out of a begin block? What does that content look like? parser = XML::Parser.new # => # parser.string = "" # => "" begin xml = parser.parse rescue XML::Parser::ParseError # ? end Keith From saurabhnanda at gmail.com Tue Feb 5 11:24:31 2008 From: saurabhnanda at gmail.com (Saurabh Nanda) Date: Tue, 5 Feb 2008 21:54:31 +0530 Subject: [libxml-devel] Guaranteed non-crashing way to load an XML document? In-Reply-To: <47A884CC.9050005@oreilly.com> References: <794f042d0802050720wa83fae7jf7af24867c097118@mail.gmail.com> <47A884CC.9050005@oreilly.com> Message-ID: <794f042d0802050824p653adc8fkcd5d394e79640a03@mail.gmail.com> > Do you have crashes that can break out of a begin block? What does that content > look like? I didn't quite understand your question. The code snippet in the original posting is not placed inside a begin-rescue block. The incoming XML can also be an illegal XML (something which doesn't parse), but that shouldn't cause libxml to segfault. Saurabh. -- http://nandz.blogspot.com http://foodieforlife.blogspot.com From keith at oreilly.com Tue Feb 5 11:26:42 2008 From: keith at oreilly.com (Keith Fahlgren) Date: Tue, 05 Feb 2008 08:26:42 -0800 Subject: [libxml-devel] Guaranteed non-crashing way to load an XML document? In-Reply-To: <794f042d0802050824p653adc8fkcd5d394e79640a03@mail.gmail.com> References: <794f042d0802050720wa83fae7jf7af24867c097118@mail.gmail.com> <47A884CC.9050005@oreilly.com> <794f042d0802050824p653adc8fkcd5d394e79640a03@mail.gmail.com> Message-ID: <47A88E42.5050402@oreilly.com> On 2/5/08 8:24 AM, Saurabh Nanda wrote: >> Do you have crashes that can break out of a begin block? What does that content >> look like? > > I didn't quite understand your question. The code snippet in the > original posting is not placed inside a begin-rescue block. The > incoming XML can also be an illegal XML (something which doesn't > parse), but that shouldn't cause libxml to segfault. Well, we might have different opinions on what libxml should do with bad input (I agree that segfaulting isn't very nice). That said, I can't imagine parsing bytes in the wild as "xml" and not doing a lot of error handling. Keith From saurabhnanda at gmail.com Tue Feb 5 11:32:00 2008 From: saurabhnanda at gmail.com (Saurabh Nanda) Date: Tue, 5 Feb 2008 22:02:00 +0530 Subject: [libxml-devel] Guaranteed non-crashing way to load an XML document? In-Reply-To: <47A88E42.5050402@oreilly.com> References: <794f042d0802050720wa83fae7jf7af24867c097118@mail.gmail.com> <47A884CC.9050005@oreilly.com> <794f042d0802050824p653adc8fkcd5d394e79640a03@mail.gmail.com> <47A88E42.5050402@oreilly.com> Message-ID: <794f042d0802050832s1a8c52ffjbe6e6f79c185544@mail.gmail.com> > Well, we might have different opinions on what libxml should do with bad input > (I agree that segfaulting isn't very nice). That said, I can't imagine parsing > bytes in the wild as "xml" and not doing a lot of error handling. Will putting the code snippet in a begin-rescue block help? I'll do that right away, but a begin-rescue block will help only if libxml doesn't segfault. I hope the segfault is not due to the way I'm parsing the XML. WIll using XML::Document.parse(xml) help? Saurabh. -- http://nandz.blogspot.com http://foodieforlife.blogspot.com From saurabhnanda at gmail.com Wed Feb 6 14:30:46 2008 From: saurabhnanda at gmail.com (Saurabh Nanda) Date: Thu, 7 Feb 2008 01:00:46 +0530 Subject: [libxml-devel] Guaranteed non-crashing way to load an XML document? In-Reply-To: <794f042d0802050832s1a8c52ffjbe6e6f79c185544@mail.gmail.com> References: <794f042d0802050720wa83fae7jf7af24867c097118@mail.gmail.com> <47A884CC.9050005@oreilly.com> <794f042d0802050824p653adc8fkcd5d394e79640a03@mail.gmail.com> <47A88E42.5050402@oreilly.com> <794f042d0802050832s1a8c52ffjbe6e6f79c185544@mail.gmail.com> Message-ID: <794f042d0802061130t3eac53adjcff8918adce8a995@mail.gmail.com> No inputs from anyone on this? Any help would be appreciated. Saurabh. -- http://nandz.blogspot.com http://foodieforlife.blogspot.com From saurabhnanda at gmail.com Wed Feb 6 17:11:05 2008 From: saurabhnanda at gmail.com (Saurabh Nanda) Date: Thu, 7 Feb 2008 03:41:05 +0530 Subject: [libxml-devel] Code snippet to crash libxml (segfault) Message-ID: <794f042d0802061411j2e693763p5453bd44a02443b0@mail.gmail.com> Why does the following code always cause a segfault on the last statement, when simply trying to refer to 'doc'? The answer to this could probably give me some pointers to my previous queries. require 'xml/libxml' x=XML::Parser.string("something") doc=x.parse x.parse puts '-- about to print refer to doc' doc Thanks, Saurabh. -- http://nandz.blogspot.com http://foodieforlife.blogspot.com From danj at 3skel.com Wed Feb 6 19:51:03 2008 From: danj at 3skel.com (Dan Janowski) Date: Wed, 6 Feb 2008 19:51:03 -0500 Subject: [libxml-devel] Code snippet to crash libxml (segfault) In-Reply-To: <794f042d0802061411j2e693763p5453bd44a02443b0@mail.gmail.com> References: <794f042d0802061411j2e693763p5453bd44a02443b0@mail.gmail.com> Message-ID: <0DF76E7F-0ED6-447B-850E-5028A6ECD6C1@3skel.com> Are you sure it is the doc reference and not the GC finalizers running? Put a print statement after it and see what happens. Dan On Feb 6, 2008, at 17:11, Saurabh Nanda wrote: > Why does the following code always cause a segfault on the last > statement, when simply trying to refer to 'doc'? The answer to this > could probably give me some pointers to my previous queries. > > require 'xml/libxml' > x=XML::Parser.string("something") > doc=x.parse > x.parse > puts '-- about to print refer to doc' > doc > > Thanks, > Saurabh. > -- > http://nandz.blogspot.com > http://foodieforlife.blogspot.com > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel From danj at 3skel.com Wed Feb 6 22:09:50 2008 From: danj at 3skel.com (Dan Janowski) Date: Wed, 6 Feb 2008 22:09:50 -0500 Subject: [libxml-devel] Guaranteed non-crashing way to load an XML document? In-Reply-To: <794f042d0802050720wa83fae7jf7af24867c097118@mail.gmail.com> References: <794f042d0802050720wa83fae7jf7af24867c097118@mail.gmail.com> Message-ID: <9A2035A2-0816-411E-B067-774540201E0A@3skel.com> A double free on the context seems the likely candidate. If you can send a bug exploit that I can reproduce then there is a possibility of resolution. The stack trace is identification. Dan On Feb 5, 2008, at 10:20, Saurabh Nanda wrote: > I have a long running RESTful web service that needs to read XML > documents from HTTP content bodies. I've noticed lots of instances > where it has randomly crashed due to an error in libxml. > > I came across the following post while digging for some clues: > http://rubyforge.org/pipermail/libxml-devel/2007-November/000586.html > > Is there a preferred (guaranteed to not crash) way of parsing XML > strings in libxml? Here's what I'm doing: > > parser=XML::Parser.new > parser.string= content > xml = parser.parse > > Is there a better way? I've attaced the error log, just in case it > helps. > > Saurabh. > -- > http://nandz.blogspot.com > http://foodieforlife.blogspot.com > libxml.txt>_______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel From saurabhnanda at gmail.com Thu Feb 7 03:36:15 2008 From: saurabhnanda at gmail.com (Saurabh Nanda) Date: Thu, 7 Feb 2008 14:06:15 +0530 Subject: [libxml-devel] Code snippet to crash libxml (segfault) In-Reply-To: <0DF76E7F-0ED6-447B-850E-5028A6ECD6C1@3skel.com> References: <794f042d0802061411j2e693763p5453bd44a02443b0@mail.gmail.com> <0DF76E7F-0ED6-447B-850E-5028A6ECD6C1@3skel.com> Message-ID: <794f042d0802070036g3cc19762lf10095be7f943c1c@mail.gmail.com> > Are you sure it is the doc reference and not the GC finalizers > running? Put a print statement after it and see what happens. Probably what you're saying is right. I don't fully understand what effect the GC finalizers have, but I've tried the following script (same script without the doc reference) in two cases: 1. ruby /tmp/xml/rb -- segfaults 2. copy paste script in an irb session. Doesn't segfault at that moment. However, as soon as you exit irb, it segfaults. require 'xml/libxml' x=XML::Parser.string("something") doc=x.parse x.parse What could the problem be? Nandz. -- http://nandz.blogspot.com http://foodieforlife.blogspot.com From luc at honk-honk.com Thu Feb 7 07:17:04 2008 From: luc at honk-honk.com (Luc Heinrich) Date: Thu, 7 Feb 2008 13:17:04 +0100 Subject: [libxml-devel] Crash in ruby_xml_xpath_object_mark Message-ID: Greetings, I have recently switched from REXML to libxml-ruby (0.5.2) because I really needed a major speed boost for a web application and libxml- ruby really delivered. Some parts of the code which were taking more than 30 seconds are now running under 0.2 seconds, I'll take a 150x speed boost any day ;) HOWEVER, I also discovered that this comes at a price: libxml-ruby is *VERY* unstable and crashes very frequently under high(-ish) memory pressures. I have seen mentions in past messages about a new memory model being used, but I still get very frequent crashes. For example, I was able to track one down in 'ruby_xml_xpath_object_mark' (that's in ext/xml/ ruby_xml_xpath_object.c) where the use of 'xpop->nodesetval->nodeNr' causes the crash because 'nodesetval' is NULL. The top of the stack always looks like this: 0 libxml_so.bundle 0x002f2484 ruby_xml_xpath_object_mark + 92 1 libruby.dylib 0x00238dd8 gc_mark_children + 1628 2 libruby.dylib 0x00238744 gc_mark + 196 3 libruby.dylib 0x002383e8 mark_locations_array + 148 4 libruby.dylib 0x00239c24 garbage_collect + 340 5 libruby.dylib 0x00237f80 rb_newobj + 44 ... I don't know the libxml-ruby code well enough yet to propose a clean fix (I'm not sure that simply testing for NULL on nodesetval would be enough or appropriate), so if anyone could chime in... :) Thanks. -- Luc Heinrich From luc at honk-honk.com Thu Feb 7 11:27:10 2008 From: luc at honk-honk.com (Luc Heinrich) Date: Thu, 7 Feb 2008 17:27:10 +0100 Subject: [libxml-devel] Crash in ruby_xml_xpath_object_mark In-Reply-To: References: Message-ID: On 7 f?vr. 08, at 13:17, Luc Heinrich wrote: > I don't know the libxml-ruby code well enough yet to propose a clean > fix (I'm not sure that simply testing for NULL on nodesetval would be > enough or appropriate), so if anyone could chime in... :) After a bit of debugging, it seems that having the 'nodesetval' field of an 'xmlXPathObject' set to NULL is perfectly normal as far as libxml2 is concerned. If you have a look at xpath.c in the libxml2 sources, the 'xmlXPathNodeCollectAndTest' function explicitely calls 'xmlXPathCacheWrapNodeSet' with a NULL value, wich creates an 'xmlXPathObject' with a NULL 'nodesetval'. And that's exactly why the 'ruby_xml_xpath_object_mark' function crashes in my case. So it seems that simply checking for a NULL 'nodesetval' in 'ruby_xml_xpath_object_mark' actually makes sense after all. -- Luc Heinrich From luc at honk-honk.com Thu Feb 7 12:48:20 2008 From: luc at honk-honk.com (Luc Heinrich) Date: Thu, 7 Feb 2008 18:48:20 +0100 Subject: [libxml-devel] Crash in ruby_xml_xpath_object_mark In-Reply-To: References: Message-ID: On 7 f?vr. 08, at 17:27, Luc Heinrich wrote: > So it seems that simply checking for a NULL 'nodesetval' in > 'ruby_xml_xpath_object_mark' actually makes sense after all. Er, nevermind, just ignore me. It seems that this is already fixed in the subversion repository. Sorry for the noise. Any plans to make a release soon ? -- Luc Heinrich From jstehle at yahoo.com Thu Feb 7 11:31:57 2008 From: jstehle at yahoo.com (Sun Tea) Date: Thu, 7 Feb 2008 08:31:57 -0800 (PST) Subject: [libxml-devel] Does libxml-ruby install on windows or not Message-ID: <12aa76a0-dae3-41f0-a01c-b0b3e0108618@f47g2000hsd.googlegroups.com> Hi, I am having the same issues trying to install the libxml-ruby gem c:/ruby/bin/ruby.exe extconf.rb install libxml-ruby checking for socket() in socket.lib... no checking for gethostbyname() in nsl.lib... no checking for atan() in m.lib... yes checking for inflate() in z.lib... no checking for inflate() in zlib.lib... no checking for inflate() in zlib1.lib... no extconf failure: need zlib as others have and posted the issue here. In trying not to waste time I would like to know if there is a successful work around to this or not. I have all the depend lib/dll installed and their location in the PATH Also I know there is a command to list functions in a dll or lib can someone remind me what it is? Thanks John From danj at 3skel.com Thu Feb 7 15:56:54 2008 From: danj at 3skel.com (Dan Janowski) Date: Thu, 7 Feb 2008 15:56:54 -0500 Subject: [libxml-devel] Code snippet to crash libxml (segfault) In-Reply-To: <794f042d0802070036g3cc19762lf10095be7f943c1c@mail.gmail.com> References: <794f042d0802061411j2e693763p5453bd44a02443b0@mail.gmail.com> <0DF76E7F-0ED6-447B-850E-5028A6ECD6C1@3skel.com> <794f042d0802070036g3cc19762lf10095be7f943c1c@mail.gmail.com> Message-ID: <8988FE74-A41F-47A8-9359-95478B06FCDC@3skel.com> C sure is lovely, isn't it. I will try to reproduce this. If you would not mind, please post this as a bug so I can track it at: http://rubyforge.org/tracker/?atid=1971&group_id=494&func=browse Dan On Feb 7, 2008, at 03:36, Saurabh Nanda wrote: >> Are you sure it is the doc reference and not the GC finalizers >> running? Put a print statement after it and see what happens. > > Probably what you're saying is right. I don't fully understand what > effect the GC finalizers have, but I've tried the following script > (same script without the doc reference) in two cases: > > 1. ruby /tmp/xml/rb -- segfaults > 2. copy paste script in an irb session. Doesn't segfault at that > moment. However, as soon as you exit irb, it segfaults. > > require 'xml/libxml' > x=XML::Parser.string("something") > doc=x.parse > x.parse > > > What could the problem be? > > Nandz. > -- > http://nandz.blogspot.com > http://foodieforlife.blogspot.com > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel From danj at 3skel.com Thu Feb 7 16:04:48 2008 From: danj at 3skel.com (Dan Janowski) Date: Thu, 7 Feb 2008 16:04:48 -0500 Subject: [libxml-devel] Crash in ruby_xml_xpath_object_mark In-Reply-To: References: Message-ID: <39A9B5F2-5C28-4690-9DD0-64C1CC50BA7D@3skel.com> Glad you found that. I would like to make a release, but I am not sure of the finality of the build system changes. As soon as there is a read on that, I will bundle and release. Dan On Feb 7, 2008, at 12:48, Luc Heinrich wrote: > On 7 f?vr. 08, at 17:27, Luc Heinrich wrote: > >> So it seems that simply checking for a NULL 'nodesetval' in >> 'ruby_xml_xpath_object_mark' actually makes sense after all. > > Er, nevermind, just ignore me. It seems that this is already fixed in > the subversion repository. Sorry for the noise. Any plans to make a > release soon ? > > -- > Luc Heinrich > > > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel From cfis at savagexi.com Thu Feb 7 16:09:34 2008 From: cfis at savagexi.com (Charlie Savage) Date: Thu, 07 Feb 2008 14:09:34 -0700 Subject: [libxml-devel] Release and Windows Gem In-Reply-To: <39A9B5F2-5C28-4690-9DD0-64C1CC50BA7D@3skel.com> References: <39A9B5F2-5C28-4690-9DD0-64C1CC50BA7D@3skel.com> Message-ID: <47AB738E.9050409@savagexi.com> And talking about releases, has a windows build system been setup yet? If not, I'm happy to volunteer and create a windows gem. Charlie Dan Janowski wrote: > Glad you found that. I would like to make a release, but I am not sure > of the finality of the build system changes. As soon as there is a > read on that, I will bundle and release. > > Dan > > On Feb 7, 2008, at 12:48, Luc Heinrich wrote: > >> On 7 f?vr. 08, at 17:27, Luc Heinrich wrote: >> >>> So it seems that simply checking for a NULL 'nodesetval' in >>> 'ruby_xml_xpath_object_mark' actually makes sense after all. >> Er, nevermind, just ignore me. It seems that this is already fixed in >> the subversion repository. Sorry for the noise. Any plans to make a >> release soon ? >> >> -- >> Luc Heinrich >> >> >> _______________________________________________ >> libxml-devel mailing list >> libxml-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/libxml-devel > > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3237 bytes Desc: S/MIME Cryptographic Signature Url : http://rubyforge.org/pipermail/libxml-devel/attachments/20080207/264afb63/attachment.bin From saurabhnanda at gmail.com Thu Feb 7 22:09:36 2008 From: saurabhnanda at gmail.com (Saurabh Nanda) Date: Fri, 8 Feb 2008 08:39:36 +0530 Subject: [libxml-devel] Code snippet to crash libxml (segfault) In-Reply-To: <8988FE74-A41F-47A8-9359-95478B06FCDC@3skel.com> References: <794f042d0802061411j2e693763p5453bd44a02443b0@mail.gmail.com> <0DF76E7F-0ED6-447B-850E-5028A6ECD6C1@3skel.com> <794f042d0802070036g3cc19762lf10095be7f943c1c@mail.gmail.com> <8988FE74-A41F-47A8-9359-95478B06FCDC@3skel.com> Message-ID: <794f042d0802071909q82d53eanfbad24763857eb8b@mail.gmail.com> > C sure is lovely, isn't it. I will try to reproduce this. If you would > not mind, please post this as a bug so I can track it at: > > http://rubyforge.org/tracker/?atid=1971&group_id=494&func=browse Done - http://rubyforge.org/tracker/index.php?func=detail&aid=17885&group_id=494&atid=1971 Were you able to figure out why it's happening? Saurabh. -- http://nandz.blogspot.com http://foodieforlife.blogspot.com From transfire at gmail.com Fri Feb 8 14:40:29 2008 From: transfire at gmail.com (Trans) Date: Fri, 8 Feb 2008 14:40:29 -0500 Subject: [libxml-devel] Release and Windows Gem In-Reply-To: <47AB738E.9050409@savagexi.com> References: <39A9B5F2-5C28-4690-9DD0-64C1CC50BA7D@3skel.com> <47AB738E.9050409@savagexi.com> Message-ID: <4b6f054f0802081140k4b4ba5e8v973a2c85454a3262@mail.gmail.com> 2008/2/7 Charlie Savage : > And talking about releases, has a windows build system been setup yet? > If not, I'm happy to volunteer and create a windows gem. Rather then a one-off script, care to help me automate that functionality in Reap? I've just reached an early beta status with this project, and these two features are on the upcoming todo list: binary platform packages and mingw Windows cross compile. http://reap.rubyforge.org T. From cfis at savagexi.com Fri Feb 8 14:51:24 2008 From: cfis at savagexi.com (Charlie Savage) Date: Fri, 08 Feb 2008 12:51:24 -0700 Subject: [libxml-devel] Release and Windows Gem In-Reply-To: <4b6f054f0802081140k4b4ba5e8v973a2c85454a3262@mail.gmail.com> References: <39A9B5F2-5C28-4690-9DD0-64C1CC50BA7D@3skel.com> <47AB738E.9050409@savagexi.com> <4b6f054f0802081140k4b4ba5e8v973a2c85454a3262@mail.gmail.com> Message-ID: <47ACB2BC.9030802@savagexi.com> > Rather then a one-off script, care to help me automate that > functionality in Reap? Took a quick look, does it have any support for building c extensions? The problem you'll run into is that you can't use extconf.rb on Windows with MinGW because all the CONFIG settings are based on VC++ and not on MingW. Ruby needs something like Python's DistUtils, which support for using various different compiles. So, you have to roll your own solution (I don't know of any good one sadly). My approach with ruby-prof is to have a rakefile that I run from a msys prompt that invokes gcc. You could of course just use Make instead. I've just reached an early beta status with > this project, and these two features are on the upcoming todo list: > binary platform packages and mingw Windows cross compile. I wouldn't bother with the cross-compile (if you mean build Windows libraries on Linux or some other OS). First you'll need access to the VC++ ruby libraries. Second I can't see how that will work anymore in the latest version of Ruby Gems (which seems to require building on the same OS and what you deploy to, at least for Windows). Long story short - you have to roll a custom solution for MinGw and create a separate GEM for win32. I'd love if there is a better way, but I've never found one. Charlie -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3237 bytes Desc: S/MIME Cryptographic Signature Url : http://rubyforge.org/pipermail/libxml-devel/attachments/20080208/e5ac1223/attachment-0001.bin From transfire at gmail.com Fri Feb 8 17:19:13 2008 From: transfire at gmail.com (Trans) Date: Fri, 8 Feb 2008 17:19:13 -0500 Subject: [libxml-devel] Release and Windows Gem In-Reply-To: <47ACB2BC.9030802@savagexi.com> References: <39A9B5F2-5C28-4690-9DD0-64C1CC50BA7D@3skel.com> <47AB738E.9050409@savagexi.com> <4b6f054f0802081140k4b4ba5e8v973a2c85454a3262@mail.gmail.com> <47ACB2BC.9030802@savagexi.com> Message-ID: <4b6f054f0802081419r17996c8ep9782864c061cbc53@mail.gmail.com> 2008/2/8 Charlie Savage : > > > > Rather then a one-off script, care to help me automate that > > functionality in Reap? > > Took a quick look, does it have any support for building c extensions? Yes, using extconf.rb and make. > The problem you'll run into is that you can't use extconf.rb on Windows > with MinGW because all the CONFIG settings are based on VC++ and not on > MingW. Oh? Hmm... I'm just going by what I've read others doing --cross compiling on Linux using mingw. I'm not sure at all about actually compiling on a WIndows platform, since I don't use Windows at all. > Ruby needs something like Python's DistUtils, which support for > using various different compiles. That would be nice, of course. But I imagine that's a whole additional level of heavy involvement. Ultimately it would be great to add this level of functionality to Reap. But that's outside of my scope. If other would like to do so though, I'd be more than happy to work with them in accomplishing it. > So, you have to roll your own solution (I don't know of any good one > sadly). My approach with ruby-prof is to have a rakefile that I run > from a msys prompt that invokes gcc. You could of course just use Make > instead. If that's the case, it might be possible right now. $ reap-make That's the same as running extconf.rb and then make by hand. The only thing substantially missing is building binary packages. That shouldn't be too hard though, as it basically means setting the platform field and not doing a full distclean before packaging. Or am I missing something? > I've just reached an early beta status with > > this project, and these two features are on the upcoming todo list: > > binary platform packages and mingw Windows cross compile. > > I wouldn't bother with the cross-compile (if you mean build Windows > libraries on Linux or some other OS). First you'll need access to the > VC++ ruby libraries. Yea, I'm not sure. I haven't really tested it. I simply read of others doing it and their examples. Basically it requires re-compiling ruby itself with mingw, and from there supposedly one can make it work. > Second I can't see how that will work anymore in > the latest version of Ruby Gems (which seems to require building on the > same OS and what you deploy to, at least for Windows). Arghh... If that's true, that pisses me off. Eric Hodel is a source of endless headaches! > Long story short - you have to roll a custom solution for MinGw and > create a separate GEM for win32. I'd love if there is a better way, > but I've never found one. I wrote a script for it actually, but before I could test it, I accidentally deleted it :-( Basically it downloaded Ruby source, compiled it under mingw and then compiled one's project against that. That at least is the account of others who have done it manually --I'm just trying to automate what they reportedly have done by hand. Is there more to it then I am understanding? I admit I'm pretty amateurish when it comes to compiling --I really don't have any love for c. T. From cfis at savagexi.com Fri Feb 8 18:31:48 2008 From: cfis at savagexi.com (Charlie Savage) Date: Fri, 08 Feb 2008 16:31:48 -0700 Subject: [libxml-devel] Release and Windows Gem In-Reply-To: <4b6f054f0802081419r17996c8ep9782864c061cbc53@mail.gmail.com> References: <39A9B5F2-5C28-4690-9DD0-64C1CC50BA7D@3skel.com> <47AB738E.9050409@savagexi.com> <4b6f054f0802081140k4b4ba5e8v973a2c85454a3262@mail.gmail.com> <47ACB2BC.9030802@savagexi.com> <4b6f054f0802081419r17996c8ep9782864c061cbc53@mail.gmail.com> Message-ID: <47ACE664.8050801@savagexi.com> > Oh? Hmm... I'm just going by what I've read others doing --cross > compiling on Linux using mingw. I'm not sure at all about actually > compiling on a WIndows platform, since I don't use Windows at all. I haven't tried that - you have some links I can look at? Just to be a bit more clear about the issues on Windows - the problem is that all the library and directory information that extconf.rb pulls from the Config::CONFIG (which is compiled into the Ruby executable) is hard-coded for the original compiler. On Windows that is VC++6, so MingW can't work with extconf.rb. The opposite is also true, if the Ruby executable is built with MingW then extconf.rb won't work with VC++6. Ruby needs something like Python's DistUtils, which support for >> using various different compiles. > > That would be nice, of course. But I imagine that's a whole additional > level of heavy involvement. Ultimately it would be great to add this > level of functionality to Reap. Oh definitely - wasn't suggesting doing it. Just dreaming. Someone should just go take DistUtils and do a direct port to Ruby and be done with it. > If that's the case, it might be possible right now. > > $ reap-make > > That's the same as running extconf.rb and then make by hand. The only > thing substantially missing is building binary packages. That > shouldn't be too hard though, as it basically means setting the > platform field and not doing a full distclean before packaging. > Or am I missing something? You need to call the correct make program (make vs nmake), link to the right libraries, set up the correct include paths, etc. Also, what about the depedency on libxml? How would that work in a cross-compiled environment? > Yea, I'm not sure. I haven't really tested it. I simply read of others > doing it and their examples. Basically it requires re-compiling ruby > itself with mingw, and from there supposedly one can make it work. So...I think it could be quite hard getting this working in a cross-compiler environment, but I've never tried so don't know. To show how we do it with ruby-prof, I've included below the rakefile we use. The requirements are having Ruby installed, MinGW and msys. ruby-prof also includes a VC++ 2005 project file, which also works fine. The reason we don't use it to distribute the ruby-prof.dll though is to avoid the dependency on the VC++ 2005 runtime files. And that raises another interesting question - libxml for Windows is compiled with the Windows XP DDK (http://www.zlatkovic.com/libxml.en.html) - and I'm not sure what VC++ version that is. Charlie # We can't use Ruby's standard build procedures # on Windows because the Ruby executable is # built with VC++ while here we want to build # with MingW. So just roll our own... require 'rake/clean' require 'rbconfig' RUBY_INCLUDE_DIR = Config::CONFIG["archdir"] RUBY_BIN_DIR = Config::CONFIG["bindir"] RUBY_LIB_DIR = Config::CONFIG["libdir"] RUBY_SHARED_LIB = Config::CONFIG["LIBRUBY"] RUBY_SHARED_DLL = RUBY_SHARED_LIB.gsub(/lib$/, 'dll') CLEAN.include('*.o') CLOBBER.include('ruby_prof.so') task :default => "ruby_prof" SRC = FileList['../ext/*.c'] OBJ = SRC.collect do |file_name| File.basename(file_name).ext('o') end SRC.each do |srcfile| objfile = File.basename(srcfile).ext('o') file objfile => srcfile do sh "gcc -c -fPIC -O2 -Wall -o #{objfile} #{srcfile} -I#{RUBY_INCLUDE_DIR}" end end file "ruby_prof" => OBJ do sh "gcc -shared -o ruby_prof.so #{OBJ} #{RUBY_BIN_DIR}/#{RUBY_SHARED_DLL}" end -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3237 bytes Desc: S/MIME Cryptographic Signature Url : http://rubyforge.org/pipermail/libxml-devel/attachments/20080208/1fa0ae76/attachment.bin From luc at honk-honk.com Sat Feb 9 12:37:34 2008 From: luc at honk-honk.com (Luc Heinrich) Date: Sat, 9 Feb 2008 18:37:34 +0100 Subject: [libxml-devel] More crashes, in malloc... Message-ID: <77A743C9-C67E-47A4-BE35-F8751B5C6D39@honk-honk.com> Greetings, So my last posts about crashes in 'ruby_xml_xpath_object_mark' turned out to be a non-issue since the problem is already fixed. However, I'm still getting *lots* of random crashes which prevent my web application to stay up for more than 10mn, which is of course unacceptable. The strange thing is that those crashes have different code paths but all end up in the system malloc. Here are four examples... Example 1: 0 libSystem.B.dylib 0x90003cf4 szone_malloc + 956 1 libSystem.B.dylib 0x90003600 malloc + 632 2 libxml2.2.dylib 0x015615e8 xmlXPathNodeSetCreate + 56 3 libxml2.2.dylib 0x01561764 xmlXPathNewNodeSet + 116 4 libxml2.2.dylib 0x01572b14 xmlXPathRunStreamEval + 148 5 libxml2.2.dylib 0x01572f28 xmlXPathRunEval + 248 6 libxml2.2.dylib 0x015737fc xmlXPathCompiledEvalInternal + 364 7 libxml2.2.dylib 0x01573950 xmlXPathCompiledEval + 32 8 libxml_so.bundle 0x01132c38 ruby_xml_xpath_find + 472 9 libxml_so.bundle 0x01132d58 ruby_xml_xpath_find2 + 56 10 libxml_so.bundle 0x0112978c ruby_xml_node_find + 96 11 libxml_so.bundle 0x011297b0 ruby_xml_node_find_first + 16 12 libruby.dylib 0x002254dc call_cfunc + 256 13 libruby.dylib 0x00224b20 rb_call0 + 1168 .... Example 2: 0 libSystem.B.dylib 0x90003cf4 szone_malloc + 956 1 libSystem.B.dylib 0x90003600 malloc + 632 2 libxml2.2.dylib 0x01561728 xmlXPathNewNodeSet + 56 3 libxml2.2.dylib 0x01570b54 xmlXPathCompOpEvalPredicate + 260 4 libxml2.2.dylib 0x015719c4 xmlXPathNodeCollectAndTest + 3380 5 libxml2.2.dylib 0x0156fa28 xmlXPathCompOpEval + 2072 6 libxml2.2.dylib 0x015703a0 xmlXPathCompOpEval + 4496 7 libxml2.2.dylib 0x01572fe8 xmlXPathRunEval + 440 8 libxml2.2.dylib 0x015737fc xmlXPathCompiledEvalInternal + 364 9 libxml2.2.dylib 0x01573950 xmlXPathCompiledEval + 32 10 libxml_so.bundle 0x01132c38 ruby_xml_xpath_find + 472 11 libxml_so.bundle 0x01132d58 ruby_xml_xpath_find2 + 56 12 libxml_so.bundle 0x0112978c ruby_xml_node_find + 96 13 libxml_so.bundle 0x011297b0 ruby_xml_node_find_first + 16 14 libruby.dylib 0x002254dc call_cfunc + 256 15 libruby.dylib 0x00224b20 rb_call0 + 1168 .... Example 3: 0 libSystem.B.dylib 0x90003cf4 szone_malloc + 956 1 libSystem.B.dylib 0x90003600 malloc + 632 2 libruby.dylib 0x002379d8 ruby_xmalloc + 136 3 libruby.dylib 0x0021f268 rb_eval + 6780 4 libruby.dylib 0x0021dd44 rb_eval + 1368 5 libruby.dylib 0x00225148 rb_call0 + 2744 6 libruby.dylib 0x00225b18 rb_call + 600 7 libruby.dylib 0x0021f41c rb_eval + 7216 8 libruby.dylib 0x0021dd44 rb_eval + 1368 9 libruby.dylib 0x0021f220 rb_eval + 6708 10 libruby.dylib 0x0021f298 rb_eval + 6828 11 libruby.dylib 0x00222c24 rb_yield_0 + 1368 12 libruby.dylib 0x00223070 rb_yield_values + 180 13 libruby.dylib 0x00215b2c each_with_index_i + 48 .... Example 4: 0 libSystem.B.dylib 0x90003cf4 szone_malloc + 956 1 libSystem.B.dylib 0x90003600 malloc + 632 2 libxml2.2.dylib 0x0158a918 xmlStrndup + 72 3 libxml2.2.dylib 0x01530fc4 xmlNewPropInternal + 340 4 libxml2.2.dylib 0x015e2fbc xmlSAX2StartElementNs + 1468 5 libxml2.2.dylib 0x0151bbbc xmlParseStartTag2 + 3612 6 libxml2.2.dylib 0x015282cc xmlParseElement + 220 7 libxml2.2.dylib 0x01526ae8 xmlParseContent + 312 8 libxml2.2.dylib 0x015284d8 xmlParseElement + 744 9 libxml2.2.dylib 0x01526ae8 xmlParseContent + 312 10 libxml2.2.dylib 0x015284d8 xmlParseElement + 744 11 libxml2.2.dylib 0x01526ae8 xmlParseContent + 312 12 libxml2.2.dylib 0x015284d8 xmlParseElement + 744 13 libxml2.2.dylib 0x01526ae8 xmlParseContent + 312 14 libxml2.2.dylib 0x015284d8 xmlParseElement + 744 15 libxml2.2.dylib 0x01528c38 xmlParseDocument + 1096 16 libxml_so.bundle 0x0112de60 ruby_xml_parser_parse + 96 17 libruby.dylib 0x002254f0 call_cfunc + 276 .... I have a bad feeling about these problems, I don't see why malloc would crash. Anyone have an idea ? This is on OS X by the way. -- Luc Heinrich From rubys at intertwingly.net Sat Feb 9 12:52:29 2008 From: rubys at intertwingly.net (Sam Ruby) Date: Sat, 09 Feb 2008 12:52:29 -0500 Subject: [libxml-devel] libxml2 on Ruby 1.9 In-Reply-To: <47A1ED3D.1080405@intertwingly.net> References: <479F7792.20406@intertwingly.net> <378860ba-408c-4434-9485-28c4f12c98cf@v4g2000hsf.googlegroups.com> <47A1E593.4030109@intertwingly.net> <47A1E5FB.90807@intertwingly.net> <1AE830AB-2974-4FE5-87A3-819E93E9A0B2@3skel.com> <47A1ED3D.1080405@intertwingly.net> Message-ID: <47ADE85D.80503@intertwingly.net> Sam Ruby wrote: > Dan Janowski wrote: >> Hi Sam, >> >> Thank you for tracking these changes. In the interest of tracking all >> changes so they may be properly applied, please submit this to the >> patch tracker at this location: >> >> http://rubyforge.org/tracker/?func=add&group_id=494&atid=1973 >> >> Dan > > Done: > > http://rubyforge.org/tracker/index.php?func=detail&aid=17666&group_id=494&atid=1973 Has anybody had a chance to look into this? Is there any more information I need to provide? - Sam Ruby From transfire at gmail.com Sat Feb 9 16:09:18 2008 From: transfire at gmail.com (Trans) Date: Sat, 9 Feb 2008 16:09:18 -0500 Subject: [libxml-devel] Release and Windows Gem In-Reply-To: <47ACE664.8050801@savagexi.com> References: <39A9B5F2-5C28-4690-9DD0-64C1CC50BA7D@3skel.com> <47AB738E.9050409@savagexi.com> <4b6f054f0802081140k4b4ba5e8v973a2c85454a3262@mail.gmail.com> <47ACB2BC.9030802@savagexi.com> <4b6f054f0802081419r17996c8ep9782864c061cbc53@mail.gmail.com> <47ACE664.8050801@savagexi.com> Message-ID: <4b6f054f0802091309m62b91befx73091ae208b3694f@mail.gmail.com> 2008/2/8 Charlie Savage : > You need to call the correct make program (make vs nmake), link to the > right libraries, set up the correct include paths, etc. Also, what > about the depedency on libxml? How would that work in a cross-compiled > environment? > > > Yea, I'm not sure. I haven't really tested it. I simply read of others > > doing it and their examples. Basically it requires re-compiling ruby > > itself with mingw, and from there supposedly one can make it work. > > So...I think it could be quite hard getting this working in a > cross-compiler environment, but I've never tried so don't know. > > To show how we do it with ruby-prof, I've included below the rakefile we > use. The requirements are having Ruby installed, MinGW and msys. > > ruby-prof also includes a VC++ 2005 project file, which also works fine. > The reason we don't use it to distribute the ruby-prof.dll though is > to avoid the dependency on the VC++ 2005 runtime files. And that raises > another interesting question - libxml for Windows is compiled with the > Windows XP DDK (http://www.zlatkovic.com/libxml.en.html) - and I'm not > sure what VC++ version that is. > > > Charlie > > > # We can't use Ruby's standard build procedures > # on Windows because the Ruby executable is > # built with VC++ while here we want to build > # with MingW. So just roll our own... > > require 'rake/clean' > require 'rbconfig' > > RUBY_INCLUDE_DIR = Config::CONFIG["archdir"] > RUBY_BIN_DIR = Config::CONFIG["bindir"] > RUBY_LIB_DIR = Config::CONFIG["libdir"] > RUBY_SHARED_LIB = Config::CONFIG["LIBRUBY"] > RUBY_SHARED_DLL = RUBY_SHARED_LIB.gsub(/lib$/, 'dll') > > CLEAN.include('*.o') > CLOBBER.include('ruby_prof.so') > > task :default => "ruby_prof" > > SRC = FileList['../ext/*.c'] > OBJ = SRC.collect do |file_name| > File.basename(file_name).ext('o') > end > > SRC.each do |srcfile| > objfile = File.basename(srcfile).ext('o') > file objfile => srcfile do > sh "gcc -c -fPIC -O2 -Wall -o #{objfile} #{srcfile} > -I#{RUBY_INCLUDE_DIR}" > end > end > > file "ruby_prof" => OBJ do > sh "gcc -shared -o ruby_prof.so #{OBJ} > #{RUBY_BIN_DIR}/#{RUBY_SHARED_DLL}" > end So this works for you to compile on Windows? I guess I'm a confused b/c you are using Config::CONFIG here. Isn't that what extconf.rb uses? But you said that's was why extconf.rb didn't work. T. From cfis at savagexi.com Sat Feb 9 17:03:09 2008 From: cfis at savagexi.com (Charlie Savage) Date: Sat, 09 Feb 2008 15:03:09 -0700 Subject: [libxml-devel] Release and Windows Gem In-Reply-To: <4b6f054f0802091309m62b91befx73091ae208b3694f@mail.gmail.com> References: <39A9B5F2-5C28-4690-9DD0-64C1CC50BA7D@3skel.com> <47AB738E.9050409@savagexi.com> <4b6f054f0802081140k4b4ba5e8v973a2c85454a3262@mail.gmail.com> <47ACB2BC.9030802@savagexi.com> <4b6f054f0802081419r17996c8ep9782864c061cbc53@mail.gmail.com> <47ACE664.8050801@savagexi.com> <4b6f054f0802091309m62b91befx73091ae208b3694f@mail.gmail.com> Message-ID: <47AE231D.7000605@savagexi.com> > So this works for you to compile on Windows? I guess I'm a confused > b/c you are using Config::CONFIG here. Isn't that what extconf.rb > uses? But you said that's was why extconf.rb didn't work. Sorry, that might have been a bit confusing. I only pick out a few parts from it: ["archdir", "/lib/ruby/1.8/i386-mswin32"], ["bindir", "/bin"], ["libdir", "/lib"], ["LIBRUBY_SO", "msvcrt-ruby18.dll"], But look at the rest, which are taken from my 1.8.4 version of Ruby installed with the one-click installer. The values are for building with VC++. Notice that for gcc: * The compiler (CPP) is wrong * The CFLAGS are wrong * The linker command is wrong * The linker flags (DLDFLAGS) Thus you can't use extconf.rb. And this is the big downfall of extconf.rb - it assumes that you use the same compiler to build extensions as you use to build Ruby itself. On Windows at least that is not necessarily so... Charlie ["CC", "cl -nologo"] ["CFLAGS", "-MD -Zi -O2b2xg- -G6"], ["COMMON_HEADERS", "windows.h winsock.h"], ["COMMON_LIBS", "m"], ["COMPILE_C", "cl -nologo -MD -Zi -O2b2xg- -G6 -c -Tc$(<:\\=/)"], ["COMPILE_CXX", "$(CXX) -c -Tp$(<:\\=/)"], ["CPP", "cl"], ["CPPFLAGS", ""], ["CPPOUTFILE", "-P"], ["DLDFLAGS", "-link -incremental:no -debug -opt:ref -opt:icf -dll $(LIBPATH) -def:$(DEFFILE) -implib:$(*F:.so=)-i386-mswin32.lib -pdb:$(*F:.so=)-i386-mswin32.pdb"], ["LDSHARED", "cl -nologo -LD"], ["LIBOBJS", " acosh.obj crypt.obj erf.obj win32.obj"], ["LIBPATHFLAG", " -libpath:\"%s\""], ["LINK_SO", "cl -nologo -LD -Fe$(@) $(OBJS) oldnames.lib user32.lib advapi32.lib wsock32.lib $(LOCAL_LIBS) -link -incremental:no -debug -opt:ref -opt:icf -dll $(LIBPATH) -def:$(DEFFILE) -implib:$(*F:.so=)-i386-mswin32.lib -pdb:$(*F:.so=)-i386-mswin32.pdb"], ["TRY_LINK", "cl -nologo -Feconftest $(INCFLAGS) -I$(hdrdir) -MD -Zi -O2b2xg- -G6 $(src) $(LOCAL_LIBS) oldnames.lib user32.lib advapi32.lib wsock32.lib -link $(LIBPATH) -stack:0x2000000"], ["XCFLAGS", "-DRUBY_EXPORT -I. -IC:/develop/win/ruby/stable -IC:/develop/win/ruby/stable/missing"], -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3237 bytes Desc: S/MIME Cryptographic Signature Url : http://rubyforge.org/pipermail/libxml-devel/attachments/20080209/f814b16a/attachment-0001.bin From transfire at gmail.com Sat Feb 9 21:05:22 2008 From: transfire at gmail.com (Trans) Date: Sat, 9 Feb 2008 18:05:22 -0800 (PST) Subject: [libxml-devel] Release and Windows Gem In-Reply-To: <47AE231D.7000605@savagexi.com> References: <39A9B5F2-5C28-4690-9DD0-64C1CC50BA7D@3skel.com> <47AB738E.9050409@savagexi.com> <4b6f054f0802081140k4b4ba5e8v973a2c85454a3262@mail.gmail.com> <47ACB2BC.9030802@savagexi.com> <4b6f054f0802081419r17996c8ep9782864c061cbc53@mail.gmail.com> <47ACE664.8050801@savagexi.com> <4b6f054f0802091309m62b91befx73091ae208b3694f@mail.gmail.com> <47AE231D.7000605@savagexi.com> Message-ID: <3626d418-c086-4833-86af-91f176d4988b@m34g2000hsb.googlegroups.com> On Feb 9, 5:03 pm, Charlie Savage wrote: > > So this works for you to compile on Windows? I guess I'm a confused > > b/c you are using Config::CONFIG here. Isn't that what extconf.rb > > uses? But you said that's was why extconf.rb didn't work. > > Sorry, that might have been a bit confusing. I only pick out a few > parts from it: > > ["archdir", "/lib/ruby/1.8/i386-mswin32"], > ["bindir", "/bin"], > ["libdir", "/lib"], > ["LIBRUBY_SO", "msvcrt-ruby18.dll"], > > But look at the rest, which are taken from my 1.8.4 version of Ruby > installed with the one-click installer. The values are for building > with VC++. Notice that for gcc: > > * The compiler (CPP) is wrong > * The CFLAGS are wrong > * The linker command is wrong > * The linker flags (DLDFLAGS) > > Thus you can't use extconf.rb. And this is the big downfall of > extconf.rb - it assumes that you use the same compiler to build > extensions as you use to build Ruby itself. On Windows at least that is > not necessarily so... > > Charlie > > ["CC", "cl -nologo"] > ["CFLAGS", "-MD -Zi -O2b2xg- -G6"], > ["COMMON_HEADERS", "windows.h winsock.h"], > ["COMMON_LIBS", "m"], > ["COMPILE_C", "cl -nologo -MD -Zi -O2b2xg- -G6 -c -Tc$(<:\\=/)"], > ["COMPILE_CXX", "$(CXX) -c -Tp$(<:\\=/)"], > ["CPP", "cl"], > ["CPPFLAGS", ""], > ["CPPOUTFILE", "-P"], > ["DLDFLAGS", > "-link -incremental:no -debug -opt:ref -opt:icf -dll $(LIBPATH) > -def:$(DEFFILE) -implib:$(*F:.so=)-i386-mswin32.lib > -pdb:$(*F:.so=)-i386-mswin32.pdb"], > ["LDSHARED", "cl -nologo -LD"], > ["LIBOBJS", " acosh.obj crypt.obj erf.obj win32.obj"], > ["LIBPATHFLAG", " -libpath:\"%s\""], > ["LINK_SO", > "cl -nologo -LD -Fe$(@) $(OBJS) oldnames.lib user32.lib advapi32.lib > wsock32.lib $(LOCAL_LIBS) -link -incremental:no -debug -opt:ref > -opt:icf -dll $(LIBPATH) -def:$(DEFFILE) > -implib:$(*F:.so=)-i386-mswin32.lib -pdb:$(*F:.so=)-i386-mswin32.pdb"], > ["TRY_LINK", > "cl -nologo -Feconftest $(INCFLAGS) -I$(hdrdir) -MD -Zi -O2b2xg- -G6 > $(src) $(LOCAL_LIBS) oldnames.lib user32.lib advapi32.lib wsock32.lib > -link $(LIBPATH) -stack:0x2000000"], > ["XCFLAGS", > "-DRUBY_EXPORT -I. -IC:/develop/win/ruby/stable > -IC:/develop/win/ruby/stable/missing"], Okay. I see what you mean. It occurs to me that extconf.rb is really nothing special. It is mkmf.rb, which extconf.rb uses, that is special. So then we should be able to simply put a master if-condition in there and do the mkmf.rb thing if on Linux, and generate our own Makefile instead if on Windows. Would that work ok? The reason I suggest that is b/c from what I can tell, RubyGems and setup.rb rely on the extconf.rb way of doing things --and if we would like things to work smoothly on Windows --like they do on Linux, then it seems to be what we'd have to do. T. From cfis at savagexi.com Sat Feb 9 21:30:36 2008 From: cfis at savagexi.com (Charlie Savage) Date: Sat, 09 Feb 2008 19:30:36 -0700 Subject: [libxml-devel] Release and Windows Gem In-Reply-To: <3626d418-c086-4833-86af-91f176d4988b@m34g2000hsb.googlegroups.com> References: <39A9B5F2-5C28-4690-9DD0-64C1CC50BA7D@3skel.com> <47AB738E.9050409@savagexi.com> <4b6f054f0802081140k4b4ba5e8v973a2c85454a3262@mail.gmail.com> <47ACB2BC.9030802@savagexi.com> <4b6f054f0802081419r17996c8ep9782864c061cbc53@mail.gmail.com> <47ACE664.8050801@savagexi.com> <4b6f054f0802091309m62b91befx73091ae208b3694f@mail.gmail.com> <47AE231D.7000605@savagexi.com> <3626d418-c086-4833-86af-91f176d4988b@m34g2000hsb.googlegroups.com> Message-ID: <47AE61CC.3030205@savagexi.com> > It occurs to me that extconf.rb is really nothing special. It is > mkmf.rb, which extconf.rb uses, that is special. So then we should be > able to simply put a master if-condition in there and do the mkmf.rb > thing if on Linux, and generate our own Makefile instead if on > Windows. Would that work ok? The reason I suggest that is b/c from > what I can tell, RubyGems and setup.rb rely on the extconf.rb way of > doing things --and if we would like things to work smoothly on Windows > --like they do on Linux, then it seems to be what we'd have to do. Could do it that way. The other way is don't bother at all - just provide a Windows gem with a pre-compiled binary. Besides being simpler, its more realistic - almost no one on Windows has a C/C++ compiler installed so making extconf.rb/mkmf.rb work doesn't really buy you much. Thus for ruby-prof I build a Windows executable on my machine, put it in source control, and create a Windows specific gem for it. I think that's the way to go - its easy and fool-proof. The downside of course is that it means you have to have a special environment setup to rebuild the Windows binary, but that's going to be true no matter what you do. Charlie -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3237 bytes Desc: S/MIME Cryptographic Signature Url : http://rubyforge.org/pipermail/libxml-devel/attachments/20080209/df171f96/attachment.bin From transfire at gmail.com Sun Feb 10 12:11:25 2008 From: transfire at gmail.com (Trans) Date: Sun, 10 Feb 2008 09:11:25 -0800 (PST) Subject: [libxml-devel] Release and Windows Gem In-Reply-To: <47AE61CC.3030205@savagexi.com> References: <39A9B5F2-5C28-4690-9DD0-64C1CC50BA7D@3skel.com> <47AB738E.9050409@savagexi.com> <4b6f054f0802081140k4b4ba5e8v973a2c85454a3262@mail.gmail.com> <47ACB2BC.9030802@savagexi.com> <4b6f054f0802081419r17996c8ep9782864c061cbc53@mail.gmail.com> <47ACE664.8050801@savagexi.com> <4b6f054f0802091309m62b91befx73091ae208b3694f@mail.gmail.com> <47AE231D.7000605@savagexi.com> <3626d418-c086-4833-86af-91f176d4988b@m34g2000hsb.googlegroups.com> <47AE61CC.3030205@savagexi.com> Message-ID: <727d3760-030a-4d52-b975-94c2ebdf3a60@d4g2000prg.googlegroups.com> On Feb 9, 9:30 pm, Charlie Savage wrote: > almost no one on Windows has a C/C++ > compiler installed so making extconf.rb/mkmf.rb work doesn't really buy > you much. Right, right. But just having the compile process be the same --for developers, whatever the platform, is the benefit I'm after here. I understand, we still will need to make a Windows platform package for end-users. > Thus for ruby-prof I build a Windows executable on my machine, put it in > source control, and create a Windows specific gem for it. > > I think that's the way to go - its easy and fool-proof. The downside of > course is that it means you have to have a special environment setup to > rebuild the Windows binary, but that's going to be true no matter what > you do. That's fine. I'm happy to put the cross-compile on an indefinite back- burner. Lord knows, I have enough to do. But I do want to get the compile process uniform from the developers perspective, which means an extconf.rb file that handles any platform --that way it works across the board, with RubyGems, setup.rb and reap. I just updated the extconf.rb, putting in the master if-condition. I added a Makefile template to the data section at the bottom of the file. For the win32 part it simply grabs the DATA and eval it in context to build the Makefile. The template currentlu is just a copy of what extconf.rb already generates -- which can serve a starting point and we can modify it to suit Windows (ideally we will be able to keep the template platform-neutral and add the windows specifics via the eval process.) Will you take a look at it and help me get it in order? T. From cfis at savagexi.com Sun Feb 10 16:17:32 2008 From: cfis at savagexi.com (Charlie Savage) Date: Sun, 10 Feb 2008 14:17:32 -0700 Subject: [libxml-devel] Release and Windows Gem In-Reply-To: <727d3760-030a-4d52-b975-94c2ebdf3a60@d4g2000prg.googlegroups.com> References: <39A9B5F2-5C28-4690-9DD0-64C1CC50BA7D@3skel.com> <47AB738E.9050409@savagexi.com> <4b6f054f0802081140k4b4ba5e8v973a2c85454a3262@mail.gmail.com> <47ACB2BC.9030802@savagexi.com> <4b6f054f0802081419r17996c8ep9782864c061cbc53@mail.gmail.com> <47ACE664.8050801@savagexi.com> <4b6f054f0802091309m62b91befx73091ae208b3694f@mail.gmail.com> <47AE231D.7000605@savagexi.com> <3626d418-c086-4833-86af-91f176d4988b@m34g2000hsb.googlegroups.com> <47AE61CC.3030205@savagexi.com> <727d3760-030a-4d52-b975-94c2ebdf3a60@d4g2000prg.googlegroups.com> Message-ID: <47AF69EC.8010303@savagexi.com> > I just updated the extconf.rb, putting in the master if-condition. I > added a Makefile template to the data section at the bottom of the > file. For the win32 part it simply grabs the DATA and eval it in > context to build the Makefile. The template currentlu is just a copy > of what extconf.rb already generates -- which can serve a starting > point and we can modify it to suit Windows (ideally we will be able to > keep the template platform-neutral and add the windows specifics via > the eval process.) > > Will you take a look at it and help me get it in order? Sure. I'll take a look. Thanks for getting this started. Charlie -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3237 bytes Desc: S/MIME Cryptographic Signature Url : http://rubyforge.org/pipermail/libxml-devel/attachments/20080210/7798e3d3/attachment.bin From transfire at gmail.com Mon Feb 11 09:51:05 2008 From: transfire at gmail.com (Trans) Date: Mon, 11 Feb 2008 06:51:05 -0800 (PST) Subject: [libxml-devel] Release and Windows Gem In-Reply-To: <47ACE664.8050801@savagexi.com> References: <39A9B5F2-5C28-4690-9DD0-64C1CC50BA7D@3skel.com> <47AB738E.9050409@savagexi.com> <4b6f054f0802081140k4b4ba5e8v973a2c85454a3262@mail.gmail.com> <47ACB2BC.9030802@savagexi.com> <4b6f054f0802081419r17996c8ep9782864c061cbc53@mail.gmail.com> <47ACE664.8050801@savagexi.com> Message-ID: <80dd9b7e-dee6-4cb6-abf1-ae3dfda89cea@c23g2000hsa.googlegroups.com> On Feb 8, 6:31 pm, Charlie Savage wrote: > > Oh? Hmm... I'm just going by what I've read others doing --cross > > compiling on Linux using mingw. I'm not sure at all about actually > > compiling on a WIndows platform, since I don't use Windows at all. > > I haven't tried that - you have some links I can look at? http://eigenclass.org/hiki.rb?cross+compiling+rcovrt#f01 http://www.ruby-forum.com/topic/84993 T. From danj at 3skel.com Mon Feb 11 12:57:18 2008 From: danj at 3skel.com (Dan Janowski) Date: Mon, 11 Feb 2008 12:57:18 -0500 Subject: [libxml-devel] More crashes, in malloc... In-Reply-To: <77A743C9-C67E-47A4-BE35-F8751B5C6D39@honk-honk.com> References: <77A743C9-C67E-47A4-BE35-F8751B5C6D39@honk-honk.com> Message-ID: <6ee5862e0802110957w6a142da4nb445a2c7aa007e61@mail.gmail.com> Since it is OS X, did you try to enable any of the malloc debug (man malloc)? There are a whole bunch of env vars that can be set, sometimes they provide useful information. Dan On Feb 9, 2008 12:37 PM, Luc Heinrich wrote: > Greetings, > > So my last posts about crashes in 'ruby_xml_xpath_object_mark' turned > out to be a non-issue since the problem is already fixed. However, > I'm still getting *lots* of random crashes which prevent my web > application to stay up for more than 10mn, which is of course > unacceptable. > > The strange thing is that those crashes have different code paths but > all end up in the system malloc. Here are four examples... > > Example 1: > > 0 libSystem.B.dylib 0x90003cf4 szone_malloc + 956 > 1 libSystem.B.dylib 0x90003600 malloc + 632 > 2 libxml2.2.dylib 0x015615e8 xmlXPathNodeSetCreate + 56 > 3 libxml2.2.dylib 0x01561764 xmlXPathNewNodeSet + 116 > 4 libxml2.2.dylib 0x01572b14 xmlXPathRunStreamEval + 148 > 5 libxml2.2.dylib 0x01572f28 xmlXPathRunEval + 248 > 6 libxml2.2.dylib 0x015737fc xmlXPathCompiledEvalInternal > + 364 > 7 libxml2.2.dylib 0x01573950 xmlXPathCompiledEval + 32 > 8 libxml_so.bundle 0x01132c38 ruby_xml_xpath_find + 472 > 9 libxml_so.bundle 0x01132d58 ruby_xml_xpath_find2 + 56 > 10 libxml_so.bundle 0x0112978c ruby_xml_node_find + 96 > 11 libxml_so.bundle 0x011297b0 ruby_xml_node_find_first + 16 > 12 libruby.dylib 0x002254dc call_cfunc + 256 > 13 libruby.dylib 0x00224b20 rb_call0 + 1168 > .... > > Example 2: > > 0 libSystem.B.dylib 0x90003cf4 szone_malloc + 956 > 1 libSystem.B.dylib 0x90003600 malloc + 632 > 2 libxml2.2.dylib 0x01561728 xmlXPathNewNodeSet + 56 > 3 libxml2.2.dylib 0x01570b54 xmlXPathCompOpEvalPredicate + > 260 > 4 libxml2.2.dylib 0x015719c4 xmlXPathNodeCollectAndTest + > 3380 > 5 libxml2.2.dylib 0x0156fa28 xmlXPathCompOpEval + 2072 > 6 libxml2.2.dylib 0x015703a0 xmlXPathCompOpEval + 4496 > 7 libxml2.2.dylib 0x01572fe8 xmlXPathRunEval + 440 > 8 libxml2.2.dylib 0x015737fc xmlXPathCompiledEvalInternal > + 364 > 9 libxml2.2.dylib 0x01573950 xmlXPathCompiledEval + 32 > 10 libxml_so.bundle 0x01132c38 ruby_xml_xpath_find + 472 > 11 libxml_so.bundle 0x01132d58 ruby_xml_xpath_find2 + 56 > 12 libxml_so.bundle 0x0112978c ruby_xml_node_find + 96 > 13 libxml_so.bundle 0x011297b0 ruby_xml_node_find_first + 16 > 14 libruby.dylib 0x002254dc call_cfunc + 256 > 15 libruby.dylib 0x00224b20 rb_call0 + 1168 > .... > > Example 3: > > 0 libSystem.B.dylib 0x90003cf4 szone_malloc + 956 > 1 libSystem.B.dylib 0x90003600 malloc + 632 > 2 libruby.dylib 0x002379d8 ruby_xmalloc + 136 > 3 libruby.dylib 0x0021f268 rb_eval + 6780 > 4 libruby.dylib 0x0021dd44 rb_eval + 1368 > 5 libruby.dylib 0x00225148 rb_call0 + 2744 > 6 libruby.dylib 0x00225b18 rb_call + 600 > 7 libruby.dylib 0x0021f41c rb_eval + 7216 > 8 libruby.dylib 0x0021dd44 rb_eval + 1368 > 9 libruby.dylib 0x0021f220 rb_eval + 6708 > 10 libruby.dylib 0x0021f298 rb_eval + 6828 > 11 libruby.dylib 0x00222c24 rb_yield_0 + 1368 > 12 libruby.dylib 0x00223070 rb_yield_values + 180 > 13 libruby.dylib 0x00215b2c each_with_index_i + 48 > .... > > Example 4: > > 0 libSystem.B.dylib 0x90003cf4 szone_malloc + 956 > 1 libSystem.B.dylib 0x90003600 malloc + 632 > 2 libxml2.2.dylib 0x0158a918 xmlStrndup + 72 > 3 libxml2.2.dylib 0x01530fc4 xmlNewPropInternal + 340 > 4 libxml2.2.dylib 0x015e2fbc xmlSAX2StartElementNs + 1468 > 5 libxml2.2.dylib 0x0151bbbc xmlParseStartTag2 + 3612 > 6 libxml2.2.dylib 0x015282cc xmlParseElement + 220 > 7 libxml2.2.dylib 0x01526ae8 xmlParseContent + 312 > 8 libxml2.2.dylib 0x015284d8 xmlParseElement + 744 > 9 libxml2.2.dylib 0x01526ae8 xmlParseContent + 312 > 10 libxml2.2.dylib 0x015284d8 xmlParseElement + 744 > 11 libxml2.2.dylib 0x01526ae8 xmlParseContent + 312 > 12 libxml2.2.dylib 0x015284d8 xmlParseElement + 744 > 13 libxml2.2.dylib 0x01526ae8 xmlParseContent + 312 > 14 libxml2.2.dylib 0x015284d8 xmlParseElement + 744 > 15 libxml2.2.dylib 0x01528c38 xmlParseDocument + 1096 > 16 libxml_so.bundle 0x0112de60 ruby_xml_parser_parse + 96 > 17 libruby.dylib 0x002254f0 call_cfunc + 276 > .... > > I have a bad feeling about these problems, I don't see why malloc > would crash. > > Anyone have an idea ? This is on OS X by the way. > > -- > Luc Heinrich > > > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/libxml-devel/attachments/20080211/f82e551e/attachment-0001.html From luc at honk-honk.com Mon Feb 11 15:29:22 2008 From: luc at honk-honk.com (Luc Heinrich) Date: Mon, 11 Feb 2008 21:29:22 +0100 Subject: [libxml-devel] More crashes, in malloc... In-Reply-To: <6ee5862e0802110957w6a142da4nb445a2c7aa007e61@mail.gmail.com> References: <77A743C9-C67E-47A4-BE35-F8751B5C6D39@honk-honk.com> <6ee5862e0802110957w6a142da4nb445a2c7aa007e61@mail.gmail.com> Message-ID: <77C948CE-76BD-4D57-986E-556426AE5445@honk-honk.com> On 11 f?vr. 08, at 18:57, Dan Janowski wrote: > Since it is OS X, did you try to enable any of the malloc debug > (man malloc)? There are a whole bunch of env vars that can be set, > sometimes they provide useful information. Yes, actually, I did. I enabled MallocStackLogging and MallocStackLoggingNoCompact, then ran the application and waited for it to crash, which usually happens after a minute or so. Just before crashing, stderr usually shows messages like this one: ruby(9697,0xa000ed88) malloc: *** Deallocation of a pointer not malloced: 0x2113800; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug. Which is not so helpful. Fortunately I sometime was in a position where the malloc error messages were displayed but the application was not crashed yet, so I was able to use the malloc_history command to dig deeper: every single time the error message was caused by the following sequence: 0 xmlCleanupCharEncodingHandlers 1 xmlCleanupParser 2 ruby_xml_state_free 3 obj_free 4 .... Which would mean that 'ruby_xml_state_free' is called when it shouldn't be. Or something... :) -- Luc Heinrich From jochen at remote.org Mon Feb 11 12:00:12 2008 From: jochen at remote.org (Jochen Topf) Date: Mon, 11 Feb 2008 18:00:12 +0100 Subject: [libxml-devel] require path broken Message-ID: <20080211170012.GA31004@eldorado.remote.org> Just tried to install current libxml-ruby gem. (On Ubuntu 7.10). It used to be that I had to require 'xml/libxml' to use it. But now it was installed in the lib directory directly. So now its require 'libxml' But this fails, it still searches for 'xml/libxml_so'. If I change the beginning of libxml.rb to require 'libxml_so' everything works. Any idea what went wrong here? Jochen -- Jochen Topf jochen at remote.org http://www.remote.org/jochen/ +49-721-388298 From danj at 3skel.com Wed Feb 13 15:56:16 2008 From: danj at 3skel.com (Dan Janowski) Date: Wed, 13 Feb 2008 15:56:16 -0500 Subject: [libxml-devel] libxml2 on Ruby 1.9 In-Reply-To: <47ADE85D.80503@intertwingly.net> References: <479F7792.20406@intertwingly.net> <378860ba-408c-4434-9485-28c4f12c98cf@v4g2000hsf.googlegroups.com> <47A1E593.4030109@intertwingly.net> <47A1E5FB.90807@intertwingly.net> <1AE830AB-2974-4FE5-87A3-819E93E9A0B2@3skel.com> <47A1ED3D.1080405@intertwingly.net> <47ADE85D.80503@intertwingly.net> Message-ID: Have not yet. Looking for time. I appreciate your checking. Dan On Feb 9, 2008, at 12:52, Sam Ruby wrote: > Sam Ruby wrote: >> Dan Janowski wrote: >>> Hi Sam, >>> >>> Thank you for tracking these changes. In the interest of tracking >>> all >>> changes so they may be properly applied, please submit this to the >>> patch tracker at this location: >>> >>> http://rubyforge.org/tracker/?func=add&group_id=494&atid=1973 >>> >>> Dan >> >> Done: >> >> http://rubyforge.org/tracker/index.php?func=detail&aid=17666&group_id=494&atid=1973 > > Has anybody had a chance to look into this? Is there any more > information I need to provide? > > - Sam Ruby > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel From transfire at gmail.com Wed Feb 13 16:42:29 2008 From: transfire at gmail.com (Trans) Date: Wed, 13 Feb 2008 16:42:29 -0500 Subject: [libxml-devel] require path broken In-Reply-To: <20080211170012.GA31004@eldorado.remote.org> References: <20080211170012.GA31004@eldorado.remote.org> Message-ID: <4b6f054f0802131342g55917599t39fefd5cefe801a6@mail.gmail.com> On Feb 11, 2008 12:00 PM, Jochen Topf wrote: > Just tried to install current libxml-ruby gem. (On Ubuntu 7.10). > > It used to be that I had to > require 'xml/libxml' > to use it. > > But now it was installed in the lib directory directly. So now its > require 'libxml' > > But this fails, it still searches for 'xml/libxml_so'. If I change the > beginning of libxml.rb to > > require 'libxml_so' > > everything works. > > Any idea what went wrong here? The gem must be out of date, b/c that change is exactly what is already in the repository. We'll put out a new release here shortly. T. From boumenot at gmail.com Wed Feb 20 15:16:59 2008 From: boumenot at gmail.com (Christopher Boumenot) Date: Wed, 20 Feb 2008 15:16:59 -0500 Subject: [libxml-devel] valgrind: Invalid read of size 4 Message-ID: I recently cut over to using libxml instead of REXML for performance reasons, but my program keeps seg faulting. I ran across a posting on using valgrind with ruby C libraries, and I thought I would try and use it to help me debug the issue. valgrind spits out the message seen at the bottom of this email every 30 seconds or so. (Internally, I am creating an XML document about that frequently for an outside service.) I am running ruby 1.8.5 (ruby 1.8.5 (2006-08-25) [i686-linux]), on CentOS 5.0. Does anyone have pointers on debugging this issue any further? I am running revision 277 of libxml from SVN. (I just noticed that a new version was released yesterday.) Invalid read of size 4 at 0x42293C4: ruby_xml_attr_free (ruby_xml_attr.c:15) by 0x8070649: garbage_collect (in /usr/bin/ruby) by 0x807098B: ruby_xmalloc (in /usr/bin/ruby) by 0x80787DC: rb_file_open_internal (in /usr/bin/ruby) by 0x8078A38: rb_io_open (in /usr/bin/ruby) by 0x807BCB7: rb_io_s_read (in /usr/bin/ruby) by 0x80553A5: call_cfunc (in /usr/bin/ruby) by 0x805DAB1: rb_call0 (in /usr/bin/ruby) by 0x805E6A0: rb_call (in /usr/bin/ruby) by 0x805C1B5: rb_eval (in /usr/bin/ruby) by 0x805CB98: rb_eval (in /usr/bin/ruby) by 0x805E2AA: rb_call0 (in /usr/bin/ruby) by 0x805E6A0: rb_call (in /usr/bin/ruby) by 0x805C1B5: rb_eval (in /usr/bin/ruby) by 0x805A859: rb_eval (in /usr/bin/ruby) Address 0x59FB87C is 20 bytes inside a block of size 48 free'd at 0x4004FDA: free (vg_replace_malloc.c:233) by 0xBCAAE7: xmlFreeProp (in /usr/lib/libxml2.so.2.6.26) by 0xBCAD2A: xmlFreePropList (in /usr/lib/libxml2.so.2.6.26) by 0xBCA929: xmlFreeNodeList (in /usr/lib/libxml2.so.2.6.26) by 0xBCA905: xmlFreeNodeList (in /usr/lib/libxml2.so.2.6.26) by 0xBCA905: xmlFreeNodeList (in /usr/lib/libxml2.so.2.6.26) by 0xBCA72A: xmlFreeDoc (in /usr/lib/libxml2.so.2.6.26) by 0x422D15D: ruby_xml_document_free (ruby_xml_document.c:412) by 0x8070649: garbage_collect (in /usr/bin/ruby) by 0x807098B: ruby_xmalloc (in /usr/bin/ruby) by 0x80787DC: rb_file_open_internal (in /usr/bin/ruby) by 0x8078A38: rb_io_open (in /usr/bin/ruby) by 0x807BCB7: rb_io_s_read (in /usr/bin/ruby) by 0x80553A5: call_cfunc (in /usr/bin/ruby) by 0x805DAB1: rb_call0 (in /usr/bin/ruby) Invalid write of size 4 at 0x42293C7: ruby_xml_attr_free (ruby_xml_attr.c:14) by 0x8070649: garbage_collect (in /usr/bin/ruby) by 0x807098B: ruby_xmalloc (in /usr/bin/ruby) by 0x80787DC: rb_file_open_internal (in /usr/bin/ruby) by 0x8078A38: rb_io_open (in /usr/bin/ruby) by 0x807BCB7: rb_io_s_read (in /usr/bin/ruby) by 0x80553A5: call_cfunc (in /usr/bin/ruby) by 0x805DAB1: rb_call0 (in /usr/bin/ruby) by 0x805E6A0: rb_call (in /usr/bin/ruby) by 0x805C1B5: rb_eval (in /usr/bin/ruby) by 0x805CB98: rb_eval (in /usr/bin/ruby) by 0x805E2AA: rb_call0 (in /usr/bin/ruby) by 0x805E6A0: rb_call (in /usr/bin/ruby) by 0x805C1B5: rb_eval (in /usr/bin/ruby) by 0x805A859: rb_eval (in /usr/bin/ruby) Address 0x59FB868 is 0 bytes inside a block of size 48 free'd at 0x4004FDA: free (vg_replace_malloc.c:233) by 0xBCAAE7: xmlFreeProp (in /usr/lib/libxml2.so.2.6.26) by 0xBCAD2A: xmlFreePropList (in /usr/lib/libxml2.so.2.6.26) by 0xBCA929: xmlFreeNodeList (in /usr/lib/libxml2.so.2.6.26) by 0xBCA905: xmlFreeNodeList (in /usr/lib/libxml2.so.2.6.26) by 0xBCA905: xmlFreeNodeList (in /usr/lib/libxml2.so.2.6.26) by 0xBCA72A: xmlFreeDoc (in /usr/lib/libxml2.so.2.6.26) by 0x422D15D: ruby_xml_document_free (ruby_xml_document.c:412) by 0x8070649: garbage_collect (in /usr/bin/ruby) by 0x807098B: ruby_xmalloc (in /usr/bin/ruby) by 0x80787DC: rb_file_open_internal (in /usr/bin/ruby) by 0x8078A38: rb_io_open (in /usr/bin/ruby) by 0x807BCB7: rb_io_s_read (in /usr/bin/ruby) by 0x80553A5: call_cfunc (in /usr/bin/ruby) Regards, Christopher From pahlke at gmail.com Fri Feb 15 21:44:33 2008 From: pahlke at gmail.com (pahlke at gmail.com) Date: Fri, 15 Feb 2008 18:44:33 -0800 (PST) Subject: [libxml-devel] XML namespace issues Message-ID: <4e15eaab-ab35-4321-94f5-1acc6eecd386@60g2000hsy.googlegroups.com> Hey everyone, I've been working on parsing rss feeds with libxml-ruby, and everything seemed to be working great until I ran across files without namespaces defined. For example, if I try to parse this semi-valid xml file: libxml strips the media namespace out of media:thumbnail. Is there a way to make libxml be less strict about namespaces? Also, if I try to do an xpath search using a nonexistant namespace, such as doc.root.search("itunes:keywords") I get an error: Undefined namespace prefix xmlXPathCompiledEval: evaluation failed Some googling tells me I need to register the namespace, but I couldn't figure out how to do that with the Ruby bindings. I guess this post basically boils down to two questions: 1) Is it possible to turn off strict namespace checking? 2) How do I register a namespace using the ruby bindings? Thanks, - Galen Pahlke From boumenot at gmail.com Wed Feb 20 15:00:19 2008 From: boumenot at gmail.com (Christopher Boumenot) Date: Wed, 20 Feb 2008 15:00:19 -0500 Subject: [libxml-devel] valgrind: Invalid read of size 4 Message-ID: I recently cut over to using libxml instead of REXML for performance reasons, but my program keeps seg faulting. I ran across a posting on using valgrind with ruby C libraries, and I thought I would try and use it to help me debug the issue. valgrind spits out the message seen at the bottom of this email every 30 seconds or so. (Internally, I am creating an XML document about that frequently for an outside service.) I am running ruby 1.8.5 (ruby 1.8.5 (2006-08-25) [i686-linux]), on CentOS 5.0. Does anyone have pointers on debugging this issue any further? I am running revision 277 of libxml from SVN. (I just noticed that a new version was released yesterday.) Invalid read of size 4 at 0x42293C4: ruby_xml_attr_free (ruby_xml_attr.c:15) by 0x8070649: garbage_collect (in /usr/bin/ruby) by 0x807098B: ruby_xmalloc (in /usr/bin/ruby) by 0x80787DC: rb_file_open_internal (in /usr/bin/ruby) by 0x8078A38: rb_io_open (in /usr/bin/ruby) by 0x807BCB7: rb_io_s_read (in /usr/bin/ruby) by 0x80553A5: call_cfunc (in /usr/bin/ruby) by 0x805DAB1: rb_call0 (in /usr/bin/ruby) by 0x805E6A0: rb_call (in /usr/bin/ruby) by 0x805C1B5: rb_eval (in /usr/bin/ruby) by 0x805CB98: rb_eval (in /usr/bin/ruby) by 0x805E2AA: rb_call0 (in /usr/bin/ruby) by 0x805E6A0: rb_call (in /usr/bin/ruby) by 0x805C1B5: rb_eval (in /usr/bin/ruby) by 0x805A859: rb_eval (in /usr/bin/ruby) Address 0x59FB87C is 20 bytes inside a block of size 48 free'd at 0x4004FDA: free (vg_replace_malloc.c:233) by 0xBCAAE7: xmlFreeProp (in /usr/lib/libxml2.so.2.6.26) by 0xBCAD2A: xmlFreePropList (in /usr/lib/libxml2.so.2.6.26) by 0xBCA929: xmlFreeNodeList (in /usr/lib/libxml2.so.2.6.26) by 0xBCA905: xmlFreeNodeList (in /usr/lib/libxml2.so.2.6.26) by 0xBCA905: xmlFreeNodeList (in /usr/lib/libxml2.so.2.6.26) by 0xBCA72A: xmlFreeDoc (in /usr/lib/libxml2.so.2.6.26) by 0x422D15D: ruby_xml_document_free (ruby_xml_document.c:412) by 0x8070649: garbage_collect (in /usr/bin/ruby) by 0x807098B: ruby_xmalloc (in /usr/bin/ruby) by 0x80787DC: rb_file_open_internal (in /usr/bin/ruby) by 0x8078A38: rb_io_open (in /usr/bin/ruby) by 0x807BCB7: rb_io_s_read (in /usr/bin/ruby) by 0x80553A5: call_cfunc (in /usr/bin/ruby) by 0x805DAB1: rb_call0 (in /usr/bin/ruby) Invalid write of size 4 at 0x42293C7: ruby_xml_attr_free (ruby_xml_attr.c:14) by 0x8070649: garbage_collect (in /usr/bin/ruby) by 0x807098B: ruby_xmalloc (in /usr/bin/ruby) by 0x80787DC: rb_file_open_internal (in /usr/bin/ruby) by 0x8078A38: rb_io_open (in /usr/bin/ruby) by 0x807BCB7: rb_io_s_read (in /usr/bin/ruby) by 0x80553A5: call_cfunc (in /usr/bin/ruby) by 0x805DAB1: rb_call0 (in /usr/bin/ruby) by 0x805E6A0: rb_call (in /usr/bin/ruby) by 0x805C1B5: rb_eval (in /usr/bin/ruby) by 0x805CB98: rb_eval (in /usr/bin/ruby) by 0x805E2AA: rb_call0 (in /usr/bin/ruby) by 0x805E6A0: rb_call (in /usr/bin/ruby) by 0x805C1B5: rb_eval (in /usr/bin/ruby) by 0x805A859: rb_eval (in /usr/bin/ruby) Address 0x59FB868 is 0 bytes inside a block of size 48 free'd at 0x4004FDA: free (vg_replace_malloc.c:233) by 0xBCAAE7: xmlFreeProp (in /usr/lib/libxml2.so.2.6.26) by 0xBCAD2A: xmlFreePropList (in /usr/lib/libxml2.so.2.6.26) by 0xBCA929: xmlFreeNodeList (in /usr/lib/libxml2.so.2.6.26) by 0xBCA905: xmlFreeNodeList (in /usr/lib/libxml2.so.2.6.26) by 0xBCA905: xmlFreeNodeList (in /usr/lib/libxml2.so.2.6.26) by 0xBCA72A: xmlFreeDoc (in /usr/lib/libxml2.so.2.6.26) by 0x422D15D: ruby_xml_document_free (ruby_xml_document.c:412) by 0x8070649: garbage_collect (in /usr/bin/ruby) by 0x807098B: ruby_xmalloc (in /usr/bin/ruby) by 0x80787DC: rb_file_open_internal (in /usr/bin/ruby) by 0x8078A38: rb_io_open (in /usr/bin/ruby) by 0x807BCB7: rb_io_s_read (in /usr/bin/ruby) by 0x80553A5: call_cfunc (in /usr/bin/ruby) Regards, Christopher From keith at oreilly.com Wed Feb 20 15:21:44 2008 From: keith at oreilly.com (Keith Fahlgren) Date: Wed, 20 Feb 2008 12:21:44 -0800 Subject: [libxml-devel] XML namespace issues In-Reply-To: <4e15eaab-ab35-4321-94f5-1acc6eecd386@60g2000hsy.googlegroups.com> References: <4e15eaab-ab35-4321-94f5-1acc6eecd386@60g2000hsy.googlegroups.com> Message-ID: <47BC8BD8.4050801@oreilly.com> On 2/15/08 6:44 PM, pahlke at gmail.com wrote: > Hey everyone, > I've been working on parsing rss feeds with libxml-ruby, and > everything seemed to be working great until I ran across files without > namespaces defined. For example, if I try to parse this semi-valid > xml file: > > > > > > > > > libxml strips the media namespace out of media:thumbnail. Is there a > way to make libxml be less strict about namespaces? Hi, Frankly, the answer is, I believe, and should be, "no." The reason XML works is that it sets a minimum standard and doesn't deviate. There is no such thing as a "semi-valid XML file." Who is generating this bogus feed? Sorry, Keith From phlip2005 at gmail.com Thu Feb 21 10:41:26 2008 From: phlip2005 at gmail.com (Phlip) Date: Thu, 21 Feb 2008 07:41:26 -0800 Subject: [libxml-devel] .//xpath can't find the current node Message-ID: LibXml: (I will escalate this question to the libxml mothership if necessary.) I'm porting assert_xpath to libxml. That effort leads to this test case: def test_deep_node_searches node = assert_libxml('content') assert{ node.instance_of? XML::Node } assert{ node.find_first('/foo') } # assert{ node.find_first('foo') } # assert{ node.find_first('./foo') } # assert{ node.find_first('.//foo') } end The first assertion with /foo passes, but the rest fail. I would prefer them to pass! The goal is some assert_xpath calls target a specific foo, but others just want any foo south of the current node. What should I put inside assert_xpath - the find_first, or some other method that treats its xpathage differently? http://assertxpath.rubyforge.org/ <-- only REXML or Hpricot so far! -- Phlip http://assert2.rubyforge.org/ From phlip2005 at gmail.com Thu Feb 21 21:01:14 2008 From: phlip2005 at gmail.com (Phlip) Date: Thu, 21 Feb 2008 18:01:14 -0800 Subject: [libxml-devel] .//xpath can't find the current node In-Reply-To: References: Message-ID: Phlip wrote: > node = assert_libxml('content') > assert{ node.instance_of? XML::Node } > assert{ node.find_first('/foo') } > # assert{ node.find_first('foo') } assert{ node.find_first('descendant-or-self::foo') } D'oh!! (Of course I already knew about the axis trick...;) -- Phlip From cjbottaro at alumni.cs.utexas.edu Wed Feb 27 11:49:50 2008 From: cjbottaro at alumni.cs.utexas.edu (Christopher J. Bottaro) Date: Wed, 27 Feb 2008 10:49:50 -0600 Subject: [libxml-devel] xml/libxml won't load in OS X 10.5.2 Leopard Message-ID: Hello, I installed 0.5.3 via Gem, then removed 0.3.8.4. Now when I try to require 'xml/libxml' I get 'no such file to load -- libxml_so'. That file used to reside here: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.8.4/lib/xml/libxml_so.bundle I'm new to OS X. What is a bundle? Also, I don't think I can get that file back by doing 'gem install libxml-ruby -v 0.3.8.4' because it came preinstalled (as a Framework thing?). The only other places I see *libxml* are here: /usr/lib/libxml2.2.dylib /usr/lib/libxml2.dylib /usr/lib/libxml2.la Thanks for the help. From cbascom at revasystems.com Wed Feb 27 13:43:12 2008 From: cbascom at revasystems.com (Calvin Bascom) Date: Wed, 27 Feb 2008 13:43:12 -0500 Subject: [libxml-devel] xml/libxml won't load in OS X 10.5.2 Leopard In-Reply-To: References: Message-ID: <47C5AF40.2050505@revasystems.com> I ran into this as well installing the 0.5.3 gem on both CentOS and Fedora platforms. To get it working I had to rebuild the .so file manually after the gem install: cd /usr/local/lib/ruby/gems/1.8/gems/libxml-ruby-0.5.3 ruby xml/libxml/extconf.rb make make install make distclean The make install step copied the libxml_so.so file to the correct directory whereas the gem installation didn't for some reason. Don't know what causes this, but it at least worked for me after doing the above. Christopher J. Bottaro wrote: > Hello, > I installed 0.5.3 via Gem, then removed 0.3.8.4. Now when I try to > require 'xml/libxml' I get 'no such file to load -- libxml_so'. > > That file used to reside here: > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.8.4/lib/xml/libxml_so.bundle > > I'm new to OS X. What is a bundle? Also, I don't think I can get > that file back by doing 'gem install libxml-ruby -v 0.3.8.4' because > it came preinstalled (as a Framework thing?). > > The only other places I see *libxml* are here: > /usr/lib/libxml2.2.dylib > /usr/lib/libxml2.dylib > /usr/lib/libxml2.la > > Thanks for the help. > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel > > From transfire at gmail.com Wed Feb 27 21:59:49 2008 From: transfire at gmail.com (Trans) Date: Wed, 27 Feb 2008 18:59:49 -0800 (PST) Subject: [libxml-devel] xml/libxml won't load in OS X 10.5.2 Leopard In-Reply-To: <47C5AF40.2050505@revasystems.com> References: <47C5AF40.2050505@revasystems.com> Message-ID: <94abb038-a936-406f-8223-fc18ea0eb66a@q33g2000hsh.googlegroups.com> On Feb 27, 1:43 pm, Calvin Bascom wrote: > I ran into this as well installing the 0.5.3 gem on both CentOS and > Fedora platforms. To get it working I had to rebuild the .so file > manually after the gem install: > > cd /usr/local/lib/ruby/gems/1.8/gems/libxml-ruby-0.5.3 > ruby xml/libxml/extconf.rb > make > make install > make distclean > > The make install step copied the libxml_so.so file to the correct > directory whereas the gem installation didn't for some reason. Don't > know what causes this, but it at least worked for me after doing the above. I'm glad someone has tried that new gem out finally -- this is a "beta" release (obviously). In contrast to setup.rb, the Gem is not suppose to copy the .so, rather the loadpath should point to it. (At least that's what Eric Hodel told me was the proper way). Interestingly, you used make install to copy the .so over into the proper lib/ directory. I figured out the problem with the gem. In the gemspec, the extensions field isn't getting set properly, so it can't find the extconf.rb. Will fix shortly. Thanks, T. From saurabhnanda at gmail.com Fri Feb 29 08:49:21 2008 From: saurabhnanda at gmail.com (Saurabh Nanda) Date: Fri, 29 Feb 2008 19:19:21 +0530 Subject: [libxml-devel] Random crashes Message-ID: <794f042d0802290549p75a32773se73b72b893a7f773@mail.gmail.com> Hi, I've posted earlier about such crashes but have not been able to resolve my problem. Using libxml validation is extremely critical for my application. I might have to rewrite my XSDs as RelaxNG schemas and use REXML for validation -- and take the accompanying performance hit. I don't want to do that. Please can anyone help me resolve these issues? Even any hints would be appreciated. Now, I'm seeing crashes *after* all libxml code has been executed. In fact, I suspect it usually happens after Rails has generated it's output and hands over the control back to Mongrel. Any help will be appreciated! *** glibc detected *** /usr/local/bin/ruby: free(): invalid pointer: 0x00000000114e3e00 *** ======= Backtrace: ========= /lib64/libc.so.6[0x3ef4e6e8a0] /lib64/libc.so.6(cfree+0x8c)[0x3ef4e71fbc] /usr/lib64/libxml2.so.2(xmlCharEncCloseFunc+0x51)[0x3f0202def1] /usr/lib64/libxml2.so.2(xmlFreeParserInputBuffer+0x2d)[0x3f02057efd] /usr/lib64/libxml2.so.2(xmlFreeInputStream+0x67)[0x3f020322a7] /usr/lib64/libxml2.so.2(xmlFreeParserCtxt+0x19)[0x3f020322e9] /home/cleartrip/rails-libs/ct-gems/gems/libxml-ruby-0.5.2.0/lib/xml/libxml_so.so(ruby_xml_parser_context_free+0x11)[0x2aaab4b16721] /usr/local/bin/ruby[0x42d1b2] /usr/local/bin/ruby(ruby_xmalloc+0x67)[0x42d5c7] /usr/local/bin/ruby[0x45ebac] /usr/local/bin/ruby(rb_reg_new+0x41)[0x45eea1] /usr/local/bin/ruby[0x417090] /usr/local/bin/ruby[0x41576f] /usr/local/bin/ruby[0x416ef4] /usr/local/bin/ruby[0x41918d] /usr/local/bin/ruby[0x4831d7] /usr/local/bin/ruby[0x41a33d] /usr/local/bin/ruby[0x41b058] /usr/local/bin/ruby[0x416c26] /usr/local/bin/ruby[0x417eba] /usr/local/bin/ruby[0x416b32] /usr/local/bin/ruby[0x416b32] /usr/local/bin/ruby[0x416b32] /usr/local/bin/ruby[0x41aba1] /usr/local/bin/ruby[0x41b058] /usr/local/bin/ruby[0x416d5e] /usr/local/bin/ruby[0x4151ef] /usr/local/bin/ruby[0x41ad5b] /usr/local/bin/ruby[0x41b058] /usr/local/bin/ruby[0x416d5e] /usr/local/bin/ruby[0x4151ef] /usr/local/bin/ruby[0x4175ae] /usr/local/bin/ruby[0x415cb3] /usr/local/bin/ruby[0x41aba1] /usr/local/bin/ruby[0x41b058] /usr/local/bin/ruby[0x416d5e] /usr/local/bin/ruby[0x4175ae] /usr/local/bin/ruby[0x41aba1] /usr/local/bin/ruby[0x41b058] /usr/local/bin/ruby[0x416c26] /usr/local/bin/ruby[0x41918d] /usr/local/bin/ruby[0x419e52] /usr/local/bin/ruby[0x41a4d3] /usr/local/bin/ruby[0x41b058] /usr/local/bin/ruby[0x416d5e] /usr/local/bin/ruby[0x4175ae] /usr/local/bin/ruby[0x41aba1] /usr/local/bin/ruby[0x41b058] /usr/local/bin/ruby[0x4234b1] /usr/local/bin/ruby[0x41a33d] /usr/local/bin/ruby[0x41b058] /usr/local/bin/ruby[0x416c26] /usr/local/bin/ruby[0x4175ae] /usr/local/bin/ruby[0x41aba1] /usr/local/bin/ruby[0x41b058] /usr/local/bin/ruby[0x416d5e] /usr/local/bin/ruby[0x41aba1] /usr/local/bin/ruby[0x41b058] /usr/local/bin/ruby[0x416d5e] /usr/local/bin/ruby[0x41aba1] /usr/local/bin/ruby[0x41b058] /usr/local/bin/ruby[0x41b5e8] /usr/local/bin/ruby(rb_funcall+0x83)[0x41b873] ======= Memory map: ======== 00400000-004c2000 r-xp 00000000 08:05 12025858 /usr/local/bin/ruby 006c2000-006c4000 rw-p 000c2000 08:05 12025858 /usr/local/bin/ruby 006c4000-006e1000 rw-p 006c4000 00:00 0 0f72b000-11d86000 rw-p 0f72b000 00:00 0 3ef4600000-3ef461a000 r-xp 00000000 08:01 7972263 /lib64/ld-2.5.so 3ef4819000-3ef481a000 r--p 00019000 08:01 7972263 /lib64/ld-2.5.so 3ef481a000-3ef481b000 rw-p 0001a000 08:01 7972263 /lib64/ld-2.5.so 3ef4a00000-3ef4a14000 r-xp 00000000 08:01 6175180 /usr/lib64/libz.so.1.2.3 3ef4a14000-3ef4c13000 ---p 00014000 08:01 6175180 /usr/lib64/libz.so.1.2.3 3ef4c13000-3ef4c14000 rw-p 00013000 08:01 6175180 /usr/lib64/libz.so.1.2.3 3ef4e00000-3ef4f44000 r-xp 00000000 08:01 7972264 /lib64/libc-2.5.so 3ef4f44000-3ef5144000 ---p 00144000 08:01 7972264 /lib64/libc-2.5.so 3ef5144000-3ef5148000 r--p 00144000 08:01 7972264 /lib64/libc-2.5.so 3ef5148000-3ef5149000 rw-p 00148000 08:01 7972264 /lib64/libc-2.5.so 3ef5149000-3ef514e000 rw-p 3ef5149000 00:00 0 3ef5200000-3ef5282000 r-xp 00000000 08:01 7972270 /lib64/libm-2.5.so 3ef5282000-3ef5481000 ---p 00082000 08:01 7972270 /lib64/libm-2.5.so 3ef5481000-3ef5482000 r--p 00081000 08:01 7972270 /lib64/libm-2.5.so 3ef5482000-3ef5483000 rw-p 00082000 08:01 7972270 /lib64/libm-2.5.so 3ef5600000-3ef5602000 r-xp 00000000 08:01 7972269 /lib64/libdl-2.5.so 3ef5602000-3ef5802000 ---p 00002000 08:01 7972269 /lib64/libdl-2.5.so 3ef5802000-3ef5803000 r--p 00002000 08:01 7972269 /lib64/libdl-2.5.so 3ef5803000-3ef5804000 rw-p 00003000 08:01 7972269 /lib64/libdl-2.5.so 3ef5a00000-3ef5a15000 r-xp 00000000 08:01 7972265 /lib64/libpthread-2.5.so 3ef5a15000-3ef5c14000 ---p 00015000 08:01 7972265 /lib64/libpthread-2.5.so 3ef5c14000-3ef5c15000 r--p 00014000 08:01 7972265 /lib64/libpthread-2.5.so 3ef5c15000-3ef5c16000 rw-p 00015000 08:01 7972265 /lib64/libpthread-2.5.so 3ef5c16000-3ef5c1a000 rw-p 3ef5c16000 00:00 0 3ef5e00000-3ef5e35000 r-xp 00000000 08:01 9365090 /usr/lib64/libreadline.so.5.1 3ef5e35000-3ef6034000 ---p 00035000 08:01 9365090 /usr/lib64/libreadline.so.5.1 3ef6034000-3ef603c000 rw-p 00034000 08:01 9365090 /usr/lib64/libreadline.so.5.1 3ef603c000-3ef603d000 rw-p 3ef603c000 00:00 0 3ef9a00000-3ef9a0d000 r-xp 00000000 08:01 7972150 /lib64/libgcc_s-4.1.1-20070105.so.1 3ef9a0d000-3ef9c0c000 ---p 0000d000 08:01 7972150 /lib64/libgcc_s-4.1.1-20070105.so.1 3ef9c0c000-3ef9c0d000 rw-p 0000c000 08:01 7972150 /lib64/libgcc_s-4.1.1-20070105.so.1 3efb600000-3efb614000 r-xp 00000000 08:01 7972283 /lib64/libnsl-2.5.so 3efb614000-3efb813000 ---p 00014000 08:01 7972283 /lib64/libnsl-2.5.so 3efb813000-3efb814000 r--p 00013000 08:01 7972283 /lib64/libnsl-2.5.so 3efb814000-3efb815000 rw-p 00014000 08:01 7972283 /lib64/libnsl-2.5.so 3efb815000-3efb817000 rw-p 3efb815000 00:00 0 3efe400000-3efe525000 r-xp 00000000 08:01 7972274 /lib64/libcrypto.so.0.9.8b 3efe525000-3efe724000 ---p 00125000 08:01 7972274 /lib64/libcrypto.so.0.9.8b 3efe724000-3efe743000 rw-p 00124000 08:01 7972274 /lib64/libcrypto.so.0.9.8b 3efe743000-3efe747000 rw-p 3efe743000 00:00 0 3efe800000-3efe811000 r-xp 00000000 08:01 7972272 /lib64/libresolv-2.5.so 3efe811000-3efea11000 ---p 00011000 08:01 7972272 /lib64/libresolv-2.5.so 3efea11000-3efea12000 r--p 00011000 08:01 7972272 /lib64/libresolv-2.5.so 3efea12000-3efea13000 rw-p 00012000 08:01 7972272 /lib64/libresolv-2.5.so 3efea13000-3efea15000 rw-p 3efea13000 00:00 0 3efec00000-3efec07000 r-xp 00000000 08:01 9352632 /usr/lib64/libkrb5support.so.0.1 3efec07000-3efee06000 ---p 00007000 08:01 9352632 /usr/lib64/libkrb5support.so.0.1 3efee06000-3efee07000 rw-p 00006000 08:01 9352632 /usr/lib64/libkrb5support.so.0.1 3eff400000-3eff402000 r-xp 00000000 08:01 7972273 /lib64/libcom_err.so.2.1 3eff402000-3eff601000 ---p 00002000 08:01 7972273 /lib64/libcom_err.so.2.1 3eff601000-3eff602000 rw-p 00001000 08:01 7972273 /lib64/libcom_err.so.2.1 3eff800000-3eff884000 r-xp 00000000 08:01 6175186 /usr/lib64/libkrb5.so.3.2 3eff884000-3effa84000 ---p 00084000 08:01 6175186 /usr/lib64/libkrb5.so.3.2 3effa84000-3effa88000 rw-p 00084000 08:01 6175186 /usr/lib64/libkrb5.so.3.2 3effc00000-3effc23000 r-xp 00000000 08:01 6175185 /usr/lib64/libk5crypto.so.3.0 3effc23000-3effe23000 ---p 00023000 08:01 6175185 /usr/lib64/libk5crypto.so.3.0 3effe23000-3effe25000 rw-p 00023000 08:01 6175185 /usr/lib64/libk5crypto.so.3.0 3f00400000-3f00429000 r-xp 00000000 08:01 6175187 /usr/lib64/libgssapi_krb5.so.2.2 3f00429000-3f00628000 ---p 00029000 08:01 6175187 /usr/lib64/libgssapi_krb5.so.2.2 3f00628000-3f0062a000 rw-p 00028000 08:01 6175187 /usr/lib64/libgssapi_krb5.so.2.2 3f00800000-3f00843000 r-xp 00000000 08:01 7972275 /lib64/libssl.so.0.9.8b 3f00843000-3f00a43000 ---p 00043000 08:01 7972275 /lib64/libssl.so.0.9.8b 3f00a43000-3f00a49000 rw-p 00043000 08:01 7972275 /lib64/libssl.so.0.9.8b 3f02000000-3f02133000 r-xp 00000000 08:01 6175181 /usr/lib64/libxml2.so.2.6.26 3f02133000-3f02333000 ---p 00133000 08:01 6175181 /usr/lib64/libxml2.so.2.6.26 3f02333000-3f0233c000 rw-p 00133000 08:01 6175181 /usr/lib64/libxml2.so.2.6.26 3f0233c000-3f0233d000 rw-p 3f0233c000 00:00 0 3f02800000-3f02805000 r-xp 00000000 08:01 7972280 /lib64/libcrypt-2.5.so 3f02805000-3f02a04000 ---p 00005000 08:01 7972280 /lib64/libcrypt-2.5.so 3f02a04000-3f02a05000 r--p 00004000 08:01 7972280 /lib64/libcrypt-2.5.so 3f02a05000-3f02a06000 rw-p 00005000 08:01 7972280 /lib64/libcrypt-2.5.so 3f02a06000-3f02a34000 rw-p 3f02a06000 00:00 0 3f07800000-3f0784f000 r-xp 00000000 08:01 9352576 /usr/lib64/libncurses.so.5.5 3f0784f000-3f07a4e000 ---p 0004f000 08:01 9352576 /usr/lib64/libncurses.so.5.5 3f07a4e000-3f07a5c000 rw-p 0004e000 08:01 9352576 /usr/lib64/libncurses.so.5.5 3f07a5c000-3f07a5d000 rw-p 3f07a5c000 00:00 0 2aaaaaaab000-2aaaaaaaf000 rw-p 2aaaaaaab000 00:00 0 2aaaaaad6000-2aaaaab3b000 rw-p 2aaaaaad6000 00:00 0 2aaaaab3c000-2aaaaabec000 rw-p 2aaaaab3c000 00:00 0 2aaaaabec000-2aaaaabf6000 r-xp 00000000 08:05 12649070 /usr/local/lib/ruby/1.8/x86_64-linux/socket.so 2aaaaabf6000-2aaaaadf6000 ---p 0000a000 08:05 12649070 /usr/local/lib/ruby/1.8/x86_64-linux/socket.so 2aaaaadf6000-2aaaaadf7000 rw-p 0000a000 08:05 12649070 /usr/local/lib/ruby/1.8/x86_64-linux/socket.so 2aaaaadf7000-2aaaaadfb000 r-xp 00000000 08:05 12649051 /usr/local/lib/ruby/1.8/x86_64-linux/stringio.so 2aaaaadfb000-2aaaaaffb000 ---p 00004000 08:05 12649051 /usr/local/lib/ruby/1.8/x86_64-linux/stringio.so 2aaaaaffb000-2aaaaaffc000 rw-p 00004000 08:05 12649051 /usr/local/lib/ruby/1.8/x86_64-linux/stringio.so 2aaaaaffc000-2aaaab018000 r-xp 00000000 08:05 12649067 /usr/local/lib/ruby/1.8/x86_64-linux/syck.so 2aaaab018000-2aaaab217000 ---p 0001c000 08:05 12649067 /usr/local/lib/ruby/1.8/x86_64-linux/syck.so 2aaaab217000-2aaaab218000 rw-p 0001b000 08:05 12649067 /usr/local/lib/ruby/1.8/x86_64-linux/syck.so 2aaaab218000-2aaaab219000 rw-p 2aaaab218000 00:00 0 2aaaab21a000-2aaaab357000 rw-p 2aaaab21a000 00:00 0 2aaaab357000-2aaaab35f000 r-xp 00000000 08:05 12649048 /usr/local/lib/ruby/1.8/x86_64-linux/zlib.so 2aaaab35f000-2aaaab55f000 ---p 00008000 08:05 12649048 /usr/local/lib/ruby/1.8/x86_64-linux/zlib.so 2aaaab55f000-2aaaab560000 rw-p 00008000 08:05 12649048 /usr/local/lib/ruby/1.8/x86_64-linux/zlib.so 2aaaab560000-2aaaab563000 r-xp 00000000 08:05 12649046 /usr/local/lib/ruby/1.8/x86_64-linux/digest.so 2aaaab563000-2aaaab762000 ---p 00003000 08:05 12649046 /usr/local/lib/ruby/1.8/x86_64-linux/digest.so 2aaaab762000-2aaaab763000 rw-p 00002000 08:05 12649046 /usr/local/lib/ruby/1.8/x86_64-linux/digest.so 2aaaab763000-2aaaab766000 r-xp 00000000 08:05 12649054 /usr/local/lib/ruby/1.8/x86_64-linux/digest/sha2.so 2aaaab766000-2aaaab965000 ---p 00003000 08:05 12649054 /usr/local/lib/ruby/1.8/x86_64-linux/digest/sha2.so 2aaaab965000-2aaaab966000 rw-p 00002000 08:05 12649054 /usr/local/lib/ruby/1.8/x86_64-linux/digest/sha2.so 2aaaab966000-2aaaab99f000 r-xp 00000000 08:05 12649058 /usr/local/lib/ruby/1.8/x86_64-linux/openssl.so 2aaaab99f000-2aaaabb9f000 ---p 00039000 08:05 12649058 /usr/local/lib/ruby/1.8/x86_64-linux/openssl.so 2aaaabb9f000-2aaaabba2000 rw-p 00039000 08:05 12649058 /usr/local/lib/ruby/1.8/x86_64-linux/openssl.so 2aaaabba2000-2aaaabba3000 r-xp 00000000 08:05 12649059 /usr/local/lib/ruby/1.8/x86_64-linux/fcntl.so 2aaaabba3000-2aaaabda2000 ---p 00001000 08:05 12649059 /usr/local/lib/ruby/1.8/x86_64-linux/fcntl.so 2aaaabda2000-2aaaabda3000 rw-p 00000000 08:05 12649059 /usr/local/lib/ruby/1.8/x86_64-linux/fcntl.so 2aaaabda3000-2aaaabfdd000 rw-p 2aaaabda3000 00:00 0 2aaaabfdd000-2aaaabfdf000 r-xp 00000000 08:05 12649064 /usr/local/lib/ruby/1.8/x86_64-linux/etc.so 2aaaabfdf000-2aaaac1de000 ---p 00002000 08:05 12649064 /usr/local/lib/ruby/1.8/x86_64-linux/etc.so 2aaaac1de000-2aaaac1df000 rw-p 00001000 08:05 12649064 /usr/local/lib/ruby/1.8/x86_64-linux/etc.so 2aaaac1df000-2aaaac1e4000 r-xp 00000000 08:01 6469194 /home/cleartrip/rails-libs/ct-gems/gems/mongrel-1.1.3/lib/http11.so 2aaaac1e4000-2aaaac3e4000 ---p 00005000 08:01 6469194 /home/cleartrip/rails-libs/ct-gems/gems/mongrel-1.1.3/lib/http11.so 2aaaac3e4000-2aaaac3e5000 rw-p 00005000 08:01 6469194 /home/cleartrip/rails-libs/ct-gems/gems/mongrel-1.1.3/lib/http11.so 2aaaac3e5000-2aaaac3e9000 r-xp 00000000 08:01 6469105 /home/cleartrip/rails-libs/ct-gems/gems/fastthread-1.0.1/lib/fastthread.so 2aaaac3e9000-2aaaac5e8000 ---p 00004000 08:01 6469105 /home/cleartrip/rails-libs/ct-gems/gems/fastthread-1.0.1/lib/fastthread.so 2aaaac5e8000-2aaaac5e9000 rw-p 00003000 08:01 6469105 /home/cleartrip/rails-libs/ct-gems/gems/fastthread-1.0.1/lib/fastthread.so 2aaaac5e9000-2aaaac9eb000 rw-p 2aaaac5e9000 00:00 0 2aaaac9eb000-2aaaac9ef000 r-xp 00000000 08:05 12649045 /usr/local/lib/ruby/1.8/x86_64-linux/strscan.so 2aaaac9ef000-2aaaacbee000 ---p 00004000 08:05 12649045 /usr/local/lib/ruby/1.8/x86_64-linux/strscan.so 2aaaacbee000-2aaaacbef000 rw-p 00003000 08:05 12649045 /usr/local/lib/ruby/1.8/x86_64-linux/strscan.so 2aaaacbef000-2aaaacbf9000 r-xp 00000000 08:05 12649063 /usr/local/lib/ruby/1.8/x86_64-linux/bigdecimal.so 2aaaacbf9000-2aaaacdf9000 ---p 0000a000 08:05 12649063 /usr/local/lib/ruby/1.8/x86_64-linux/bigdecimal.so 2aaaacdf9000-2aaaacdfa000 rw-p 0000a000 08:05 12649063 /usr/local/lib/ruby/1.8/x86_64-linux/bigdecimal.so 2aaaacdfa000-2aaaace36000 r-xp 00000000 08:05 12649050 /usr/local/lib/ruby/1.8/x86_64-linux/nkf.so 2aaaace36000-2aaaad036000 ---p 0003c000 08:05 12649050 /usr/local/lib/ruby/1.8/x86_64-linux/nkf.so 2aaaad036000-2aaaad03a000 rw-p 0003c000 08:05 12649050 /usr/local/lib/ruby/1.8/x86_64-linux/nkf.so 2aaaad03a000-2aaaad771000 rw-p 2aaaad03a000 00:00 0 2aaaad771000-2aaaad782000 r-xp 00000000 08:05 12651841 /usr/local/lib/ruby/site_ruby/1.8/x86_64-linux/oci8lib.so 2aaaad782000-2aaaad881000 ---p 00011000 08:05 12651841 /usr/local/lib/ruby/site_ruby/1.8/x86_64-linux/oci8lib.so 2aaaad881000-2aaaad883000 rw-p 00010000 08:05 12651841 /usr/local/lib/ruby/site_ruby/1.8/x86_64-linux/oci8lib.so 2aaaad8ad000-2aaaad985000 r-xp 00000000 08:01 9374704 /usr/lib64/libruby.so.1.8.5 2aaaad985000-2aaaadb85000 ---p 000d8000 08:01 9374704 /usr/lib64/libruby.so.1.8.5 2aaaadb85000-2aaaadb8a000 rw-p 000d8000 08:01 9374704 /usr/lib64/libruby.so.1.8.5 2aaaadb8a000-2aaaadba8000 rw-p 2aaaadb8a000 00:00 0 2aaaadba8000-2aaaaed5f000 r-xp 00000000 08:05 5701727 /usr/local/oracle/libclntsh.so.10.1 2aaaaed5f000-2aaaaee5f000 ---p 011b7000 08:05 5701727 /usr/local/oracle/libclntsh.so.10.1 2aaaaee5f000-2aaaaef00000 rw-p 011b7000 08:05 5701727 /usr/local/oracle/libclntsh.so.10.1 2aaaaef00000-2aaaaef14000 rw-p 2aaaaef00000 00:00 0 2aaaaef14000-2aaaaf205000 r-xp 00000000 08:05 5701635 /usr/local/oracle/libnnz10.so 2aaaaf205000-2aaaaf304000 ---p 002f1000 08:05 5701635 /usr/local/oracle/libnnz10.so 2aaaaf304000-2aaaaf3b4000 rw-p 002f0000 08:05 5701635 /usr/local/oracle/libnnz10.so 2aaaaf3b4000-2aaaaf3b6000 rw-p 2aaaaf3b4000 00:00 0 2aaaaf3b6000-2aaab3699000 r-xp 00000000 08:05 5701724 /usr/local/oracle/libociei.so 2aaab3699000-2aaab3799000 ---p 042e3000 08:05 5701724 /usr/local/oracle/libociei.so 2aaab3799000-2aaab379b000 rw-p 042e3000 08:05 5701724 /usr/local/oracle/libociei.so 2aaab379b000-2aaab37fa000 rw-p 2aaab379b000 00:00 0 2aaab37fa000-2aaab37fb000 r-xp 00000000 08:05 12649053 /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so 2aaab37fb000-2aaab39fa000 ---p 00001000 08:05 12649053 /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so 2aaab39fa000-2aaab39fb000 rw-p 00000000 08:05 12649053 /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so 2aaab39fb000-2aaab39fe000 r-xp 00000000 08:05 12649072 /usr/local/lib/ruby/1.8/x86_64-linux/racc/cparse.so 2aaab39fe000-2aaab3bfe000 ---p 00003000 08:05 12649072 /usr/local/lib/ruby/1.8/x86_64-linux/racc/cparse.so 2aaab3bfe000-2aaab3bff000 rw-p 00003000 08:05 12649072 /usr/local/lib/ruby/1.8/x86_64-linux/racc/cparse.so 2aaab3bff000-2aaab3c03000 r-xp 00000000 08:05 12649068 /usr/local/lib/ruby/1.8/x86_64-linux/iconv.so 2aaab3c03000-2aaab3e02000 ---p 00004000 08:05 12649068 /usr/local/lib/ruby/1.8/x86_64-linux/iconv.so 2aaab3e02000-2aaab3e03000 rw-p 00003000 08:05 12649068 /usr/local/lib/ruby/1.8/x86_64-linux/iconv.so 2aaab3e03000-2aaab4afe000 rw-p 2aaab3e03000 00:00 0 2aaab4afe000-2aaab4b1f000 r-xp 00000000 08:01 6470109 /home/cleartrip/rails-libs/ct-gems/gems/libxml-ruby-0.5.2.0/lib/xml/libxml_so.so 2aaab4b1f000-2aaab4d1f000 ---p 00021000 08:01 6470109 /home/cleartrip/rails-libs/ct-gems/gems/libxml-ruby-0.5.2.0/lib/xml/libxml_so.so 2aaab4d1f000-2aaab4d21000 rw-p 00021000 08:01 6470109 /home/cleartrip/rails-libs/ct-gems/gems/libxml-ruby-0.5.2.0/lib/xml/libxml_so.so 2aaab4d21000-2aaab4d25000 r-xp 00000000 08:01 6469088 /home/cleartrip/rails-libs/ct-gems/lib/aes.so 2aaab4d25000-2aaab4f25000 ---p 00004000 08:01 6469088 /home/cleartrip/rails-libs/ct-gems/lib/aes.so 2aaab4f25000-2aaab4f29000 rw-p 00004000 08:01 6469088 /home/cleartrip/rails-libs/ct-gems/lib/aes.so 2aaab4f29000-2aaab4f2a000 r-xp 00000000 08:05 12649055 /usr/local/lib/ruby/1.8/x86_64-linux/digest/sha1.so 2aaab4f2a000-2aaab5129000 ---p 00001000 08:05 12649055 /usr/local/lib/ruby/1.8/x86_64-linux/digest/sha1.so 2aaab5129000-2aaab512a000 rw-p 00000000 08:05 12649055 /usr/local/lib/ruby/1.8/x86_64-linux/digest/sha1.so 2aaab5154000-2aaab515e000 r-xp 00000000 08:01 7971996 /lib64/libnss_files-2.5.so 2aaab515e000-2aaab535d000 ---p 0000a000 08:01 7971996 /lib64/libnss_files-2.5.so 2aaab535d000-2aaab535e000 r--p 00009000 08:01 7971996 /lib64/libnss_files-2.5.so 2aaab535e000-2aaab535f000 rw-p 0000a000 08:01 7971996 /lib64/libnss_files-2.5.so 2aaab535f000-2aaab5470000 rw-p 2aaab535f000 00:00 0 2aaab5470000-2aaab5474000 r-xp 00000000 08:05 12649060 /usr/local/lib/ruby/1.8/x86_64-linux/readline.so 2aaab5474000-2aaab5674000 ---p 00004000 08:05 12649060 /usr/local/lib/ruby/1.8/x86_64-linux/readline.so 2aaab5674000-2aaab5675000 rw-p 00004000 08:05 12649060 /usr/local/lib/ruby/1.8/x86_64-linux/readline.so 2aaab5675000-2aaab5677000 rw-p 2aaab5675000 00:00 0 2aaab5677000-2aaab567e000 r--s 00000000 08:01 9409795 /usr/lib64/gconv/gconv-modules.cache 2aaab567e000-2aaab567f000 r-xp 00000000 08:01 9409978 /usr/lib64/gconv/ISO8859-1.so 2aaab567f000-2aaab587f000 ---p 00001000 08:01 9409978 /usr/lib64/gconv/ISO8859-1.so 2aaab587f000-2aaab5881000 rw-p 00001000 08:01 9409978 /usr/lib64/gconv/ISO8859-1.so 2aaab8000000-2aaab8021000 rw-p 2aaab8000000 00:00 0 2aaab8021000-2aaabc000000 ---p 2aaab8021000 00:00 0 7fffb6a2e000-7fffb6a7e000 rwxp 7fffb6a2e000 00:00 0 [stack] 7fffb6a7e000-7fffb6a80000 rw-p 7fffb6a7e000 00:00 0 ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0 [vdso] Saurabh. -- http://nandz.blogspot.com http://foodieforlife.blogspot.com