{"id":5,"date":"2004-12-19T19:30:27","date_gmt":"2004-12-20T00:30:27","guid":{"rendered":"http:\/\/crschmidt.net\/blog\/?p=4"},"modified":"2004-12-19T19:30:27","modified_gmt":"2004-12-20T00:30:27","slug":"redland-bug-squish","status":"publish","type":"post","link":"https:\/\/crschmidt.net\/blog\/archives\/5\/redland-bug-squish\/","title":{"rendered":"Redland Bug Squish"},"content":{"rendered":"<p>Chris: 2, Redland: 0<\/p>\n<p>For quite a while, I&#8217;ve been having some problems with installing the latest version of the Redland RDF Application Framework. I&#8217;m sure that these were problems of my own: I know that my system is a little goofy, in part because I&#8217;ve got a combination of ebuild-built and non-ebuild versions of things. So, for a while, I&#8217;ve been unable to compile the lateset Redland, because whenever I&#8217;d try and compile, the system-wide redland-config would get in the way, and then Redland would try to link against the already installed libraries, etc. etc. <\/p>\n<p>However, yesterday I started having issues with julie crashing, returning a glibc exception. I wrote a small test script, and found that the issue was occuring any time I was using two &#8220;AND&#8221; clauses in an RDQL query.  I recompiled glibc with debug info this morning, and was amazed to find that my backtraces suddenly became much more informative: Instead of gdb returning ?? in ?? in my backtrace, it actually gave me function names and line numbers. I didn&#8217;t think that just recompiling glibc would have helped so much.<\/p>\n<p>After I was able to do this, I sent mail to the Redland-dev list: Here&#8217;s my problem, here&#8217;s my backtrace, where do I go from here? <a href=\"http:\/\/lists.usefulinc.com\/pipermail\/redland-dev\/2004-December\/000722.html\">That Email<\/a> got several responses back and forth from Dave Beckett (maintainer of Redland) and Morten Fredrickson (maintainer of the MySQL storage backend). I ended up stopping all services which used Redland, uninstalling redland completely, and making the latest release successfully. In combination with <a href=\"http:\/\/www.ilrt.bris.ac.uk\/discovery\/chatlogs\/swig\/2004-12-19.html#T19-49-35\">discussion on IRC<\/a>, I moved onto testing with <a href=\"http:\/\/valgrind.kde.org\">valgrind<\/a>, an open-source memory debugger for x86-GNU\/Linux and ppc-GNU\/Linux.  Sending the data dump from that helped Dave to find the problem, which was related to the way that the mysql backend frees results. <\/p>\n<p>One patch later, the problem was cleared up. There&#8217;s still the question of why it broke, which seems to be related to some broken statements in my database. However, it&#8217;s good to know that I helped to find a bug in Redland, rather than just finding something broken locally.<\/p>\n<p>In the end, I did learn a few things:<\/p>\n<p>1. Having glibc debug symbols on is a Good Thing.<br \/>\n2. If you can&#8217;t install the latest version, try uninstalling the previous version first.<br \/>\n3. valgrind is an app which may help you locate the source of bad free() calls<br \/>\n4. glibc has some extra sanity check memory detection: you can adjust its behavior via  MALLOC_CHECK_. Levels of sanity are 0->3, with 0 being &#8220;display error message and kill application&#8221; and 3 being &#8220;do nothing&#8221;. (I found this via <a href=\"http:\/\/ftp.redhat.com\/pub\/redhat\/linux\/beta\/nahant-beta2\/en\/AS\/i386\/RELEASE-NOTES-en.html\">fedora core release notes<\/a>.)<\/p>\n<p>I also was able to compile new Redland bindings: this means that I fixed my Perl Query problem (which has been fixed for a while, but I couldn&#8217;t install new bindings), as well as adding Sparql support to my local Redland tools. Now, I just need to write something that uses it.<\/p>\n<p>So, in the end, I helped squish a bug, and upgraded all my Redland related stuff on my system. That&#8217;s what I call a good day.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Chris: 2, Redland: 0 For quite a while, I&#8217;ve been having some problems with installing the latest version of the Redland RDF Application Framework. I&#8217;m sure that these were problems of my own: I know that my system is a little goofy, in part because I&#8217;ve got a combination of ebuild-built and non-ebuild versions of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-5","post","type-post","status-publish","format-standard","hentry","category-redland-rdf-application-framework"],"_links":{"self":[{"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/posts\/5","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/comments?post=5"}],"version-history":[{"count":0,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/posts\/5\/revisions"}],"wp:attachment":[{"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/media?parent=5"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/categories?post=5"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/crschmidt.net\/blog\/wp-json\/wp\/v2\/tags?post=5"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}