{"id":457,"date":"2011-02-09T05:19:58","date_gmt":"2011-02-09T04:19:58","guid":{"rendered":"http:\/\/www.streppone.it\/cosimo\/blog\/2011\/02\/ubuntu-10-10-modperl-and-apache-segfaulting-fixed\/"},"modified":"2011-02-09T05:19:58","modified_gmt":"2011-02-09T04:19:58","slug":"ubuntu-10-10-modperl-and-apache-segfaulting-fixed","status":"publish","type":"post","link":"https:\/\/www.streppone.it\/cosimo\/blog\/2011\/02\/ubuntu-10-10-modperl-and-apache-segfaulting-fixed\/","title":{"rendered":"Ubuntu 10.10, modperl and Apache segfaulting fixed"},"content":{"rendered":"<p>Last month, before moving to Melbourne, where I am now, to work in the Opera Australia office for a few months, I had to setup a laptop for all the development work I normally do. So I chose <b>Ubuntu 10.10 amd64<\/b>. I have to say I&#39;m quite happy with it. Everything works out of the box for me, including a Quickcam 9000 USB camera I used to shoot <a href=\"http:\/\/www.youtube.com\/watch?v=NrEcwRxIe8k\" rel=\"nofollow\">this poor time-lapse video<\/a> from my new office window. Woot!<\/p>\n<p>Anyway, the development environment for one particular project consists of <b>Apache and mod_perl<\/b>. So I setup the usual list of dependencies, but when I tried to start Apache to run the test suite, it would always stop right away with a segmentation fault.<\/p>\n<p>Didn&#39;t really dig into the problem. Just <code>strace<\/code>d the apache process, and that&#39;s what I got:<\/p>\n<pre><code>[apache starts up, reads a bunch of Perl modules, and opens the access  \r\nlog...]\r\n...\r\nbrk(0x7f342adbd000)                     = 0x7f342adbd000\r\n...\r\n...\r\nbrk(0x7f342adde000)                     = 0x7f342adde000\r\nbrk(0x7f342adff000)                     = 0x7f342adff000\r\nbrk(0x7f342ae20000)                     = 0x7f342ae20000\r\nbrk(0x7f342ae41000)                     = 0x7f342ae41000\r\nstat(&quot;\/usr\/lib\/perl5\/auto\/DBI\/DESTROY.al&quot;, 0x7f341e8459b0) = -1 ENOENT (No  \r\nsuch file or directory)\r\nstat(&quot;\/home\/cosimo\/src\/auth-svn\/lib\/auto\/DBI\/DESTROY.al&quot;, 0x7fffc4e2d520)  \r\n= -1 ENOENT (No such file or directory)\r\nstat(&quot;\/home\/cosimo\/src\/myopera-trunk\/lib\/auto\/DBI\/DESTROY.al&quot;,  \r\n0x7fffc4e2d520) = -1 ENOENT (No such file or directory)\r\nstat(&quot;\/etc\/perl\/auto\/DBI\/DESTROY.al&quot;, 0x7fffc4e2d520) = -1 ENOENT (No such  \r\nfile or directory)\r\nstat(&quot;\/usr\/local\/lib\/perl\/5.10.1\/auto\/DBI\/DESTROY.al&quot;, 0x7fffc4e2d520) =  \r\n-1 ENOENT (No such file or directory)\r\nstat(&quot;\/usr\/local\/share\/perl\/5.10.1\/auto\/DBI\/DESTROY.al&quot;, 0x7fffc4e2d520) =  \r\n-1 ENOENT (No such file or directory)\r\nstat(&quot;\/usr\/lib\/perl5\/auto\/DBI\/DESTROY.al&quot;, 0x7fffc4e2d520) = -1 ENOENT (No  \r\nsuch file or directory)\r\nstat(&quot;\/usr\/share\/perl5\/auto\/DBI\/DESTROY.al&quot;, 0x7fffc4e2d520) = -1 ENOENT  \r\n(No such file or directory)\r\nstat(&quot;\/usr\/lib\/perl\/5.10\/auto\/DBI\/DESTROY.al&quot;, 0x7fffc4e2d520) = -1 ENOENT  \r\n(No such file or directory)\r\nstat(&quot;\/usr\/share\/perl\/5.10\/auto\/DBI\/DESTROY.al&quot;, 0x7fffc4e2d520) = -1  \r\nENOENT (No such file or directory)\r\nstat(&quot;\/usr\/local\/lib\/site_perl\/auto\/DBI\/DESTROY.al&quot;, 0x7fffc4e2d520) = -1  \r\nENOENT (No such file or directory)\r\nstat(&quot;.\/auto\/DBI\/DESTROY.al&quot;, 0x7fffc4e2d520) = -1 ENOENT (No such file or  \r\ndirectory)\r\nstat(&quot;\/var\/tmp\/test_cosimo_22931\/auto\/DBI\/DESTROY.al&quot;, 0x7fffc4e2d520) =  \r\n-1 ENOENT (No such file or directory)\r\n--- SIGSEGV (Segmentation fault) @ 0 (0) ---\r\n+++ killed by SIGSEGV +++\r\n<\/code><\/pre>\n<p>I thought it would be wiser to <a href=\"http:\/\/code.activestate.com\/lists\/perl-dbi-users\/34652\/\" rel=\"nofollow\">ask for advice<\/a> on the DBI and mod_perl mailing lists. Tim Bunce suggested to try and get a stack trace of Apache. Why didn&#39;t I think of that in the first place? A few days later, I got my stack trace:<\/p>\n<pre><code># gdb -c .\/core \/usr\/sbin\/apache2 \r\n... \r\nReading symbols from ... \r\n... \r\nCore was generated by `\/usr\/sbin\/apache2 -d \/var\/tmp\/test_cosimo_9727 -k \r\nstart -C User cosimo -C Group ...&#39;. \r\n\r\nProgram terminated with signal 11, Segmentation fault. \r\n#0 0x00007fdaedfed858 in XS_Class__XSAccessor_END () \r\nfrom \/usr\/lib\/perl5\/auto\/Class\/XSAccessor\/XSAccessor.so \r\n(gdb) backtrace \r\n#0 0x00007fdaedfed858 in XS_Class__XSAccessor_END () \r\nfrom \/usr\/lib\/perl5\/auto\/Class\/XSAccessor\/XSAccessor.so \r\n#1 0x00007fdaf83cf845 in Perl_pp_entersub () from \/usr\/lib\/libperl.so.5.10 \r\n#2 0x00007fdaf83752c6 in Perl_call_sv () from \/usr\/lib\/libperl.so.5.10 \r\n#3 0x00007fdaf86ad40b in modperl_perl_call_list () \r\nfrom \/usr\/lib\/apache2\/modules\/mod_perl.so \r\n#4 0x00007fdaf86b5786 in modperl_perl_destruct () \r\nfrom \/usr\/lib\/apache2\/modules\/mod_perl.so \r\n#5 0x00007fdaf86a6256 in modperl_interp_destroy () \r\nfrom \/usr\/lib\/apache2\/modules\/mod_perl.so \r\n#6 0x00007fdaf86a6715 in modperl_tipool_destroy () \r\nfrom \/usr\/lib\/apache2\/modules\/mod_perl.so \r\n#7 0x00007fdaf86a62b2 in modperl_interp_pool_destroy () \r\nfrom \/usr\/lib\/apache2\/modules\/mod_perl.so \r\n#8 0x00007fdaf98fd4e3 in ?? () from \/usr\/lib\/libapr-1.so.0 \r\n#9 0x00007fdaf98fc3b1 in apr_pool_destroy () from \/usr\/lib\/libapr-1.so.0 \r\n#10 0x00007fdaf98fc27f in apr_pool_clear () from \/usr\/lib\/libapr-1.so.0 \r\n#11 0x00007fdafa1b960d in main (argc=11, argv=0x7fff93b50ef8) \r\nat \/build\/buildd\/apache2-2.2.16\/server\/main.c:692\r\n<\/code><\/pre>\n<p>Even if you don&#39;t know anything about stack traces, this output gently points to <a href=\"http:\/\/search.cpan.org\/dist\/Class-XSAccessor\" rel=\"nofollow\">Class::XSAccessor<\/a>. Perrin Harkins on the mod_perl list suggested to update Class::XSAccessor to the latest CPAN version, since its <a href=\"http:\/\/cpansearch.perl.org\/src\/SMUELLER\/Class-XSAccessor-1.11\/Changes\" rel=\"nofollow\">changelog mentioned some segmentation faults fixed in 0.10<\/a>.<\/p>\n<p>And that did it. No more segfaults on Ubuntu 10.10. Solution: upgrade Class::XSAccessor to 0.10+. Thanks to Class::XSAccessor maintainer(s)!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last month, before moving to Melbourne, where I am now, to work in the Opera Australia office for a few months, I had to setup a laptop for all the development work I normally do. So I chose Ubuntu 10.10 amd64. I have to say I&#39;m quite happy with it. Everything works out of the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[259,344,49,345,91,341,50,342,343],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Ubuntu 10.10, modperl and Apache segfaulting fixed - Random hacking<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.streppone.it\/cosimo\/blog\/2011\/02\/ubuntu-10-10-modperl-and-apache-segfaulting-fixed\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ubuntu 10.10, modperl and Apache segfaulting fixed - Random hacking\" \/>\n<meta property=\"og:description\" content=\"Last month, before moving to Melbourne, where I am now, to work in the Opera Australia office for a few months, I had to setup a laptop for all the development work I normally do. So I chose Ubuntu 10.10 amd64. I have to say I&#039;m quite happy with it. Everything works out of the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.streppone.it\/cosimo\/blog\/2011\/02\/ubuntu-10-10-modperl-and-apache-segfaulting-fixed\/\" \/>\n<meta property=\"og:site_name\" content=\"Random hacking\" \/>\n<meta property=\"article:published_time\" content=\"2011-02-09T04:19:58+00:00\" \/>\n<meta name=\"author\" content=\"cosimo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"cosimo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2011\/02\/ubuntu-10-10-modperl-and-apache-segfaulting-fixed\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2011\/02\/ubuntu-10-10-modperl-and-apache-segfaulting-fixed\/\"},\"author\":{\"name\":\"cosimo\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\"},\"headline\":\"Ubuntu 10.10, modperl and Apache segfaulting fixed\",\"datePublished\":\"2011-02-09T04:19:58+00:00\",\"dateModified\":\"2011-02-09T04:19:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2011\/02\/ubuntu-10-10-modperl-and-apache-segfaulting-fixed\/\"},\"wordCount\":258,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\"},\"keywords\":[\"apache\",\"Class::XSAccessor\",\"cpan\",\"DBI\",\"development\",\"mod_perl\",\"perl\",\"segfault\",\"ubuntu\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.streppone.it\/cosimo\/blog\/2011\/02\/ubuntu-10-10-modperl-and-apache-segfaulting-fixed\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2011\/02\/ubuntu-10-10-modperl-and-apache-segfaulting-fixed\/\",\"url\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2011\/02\/ubuntu-10-10-modperl-and-apache-segfaulting-fixed\/\",\"name\":\"Ubuntu 10.10, modperl and Apache segfaulting fixed - Random hacking\",\"isPartOf\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#website\"},\"datePublished\":\"2011-02-09T04:19:58+00:00\",\"dateModified\":\"2011-02-09T04:19:58+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2011\/02\/ubuntu-10-10-modperl-and-apache-segfaulting-fixed\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.streppone.it\/cosimo\/blog\/2011\/02\/ubuntu-10-10-modperl-and-apache-segfaulting-fixed\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2011\/02\/ubuntu-10-10-modperl-and-apache-segfaulting-fixed\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.streppone.it\/cosimo\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ubuntu 10.10, modperl and Apache segfaulting fixed\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#website\",\"url\":\"https:\/\/www.streppone.it\/cosimo\/blog\/\",\"name\":\"Random hacking\",\"description\":\"Assume nothing. Code defensively. Keep it simple, stupid!\",\"publisher\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.streppone.it\/cosimo\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\",\"name\":\"cosimo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g\",\"caption\":\"cosimo\"},\"logo\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/www.streppone.it\/cosimo\/blog\/author\/cosimo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Ubuntu 10.10, modperl and Apache segfaulting fixed - Random hacking","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.streppone.it\/cosimo\/blog\/2011\/02\/ubuntu-10-10-modperl-and-apache-segfaulting-fixed\/","og_locale":"en_US","og_type":"article","og_title":"Ubuntu 10.10, modperl and Apache segfaulting fixed - Random hacking","og_description":"Last month, before moving to Melbourne, where I am now, to work in the Opera Australia office for a few months, I had to setup a laptop for all the development work I normally do. So I chose Ubuntu 10.10 amd64. I have to say I&#39;m quite happy with it. Everything works out of the [&hellip;]","og_url":"https:\/\/www.streppone.it\/cosimo\/blog\/2011\/02\/ubuntu-10-10-modperl-and-apache-segfaulting-fixed\/","og_site_name":"Random hacking","article_published_time":"2011-02-09T04:19:58+00:00","author":"cosimo","twitter_card":"summary_large_image","twitter_misc":{"Written by":"cosimo","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2011\/02\/ubuntu-10-10-modperl-and-apache-segfaulting-fixed\/#article","isPartOf":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2011\/02\/ubuntu-10-10-modperl-and-apache-segfaulting-fixed\/"},"author":{"name":"cosimo","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1"},"headline":"Ubuntu 10.10, modperl and Apache segfaulting fixed","datePublished":"2011-02-09T04:19:58+00:00","dateModified":"2011-02-09T04:19:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2011\/02\/ubuntu-10-10-modperl-and-apache-segfaulting-fixed\/"},"wordCount":258,"commentCount":0,"publisher":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1"},"keywords":["apache","Class::XSAccessor","cpan","DBI","development","mod_perl","perl","segfault","ubuntu"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.streppone.it\/cosimo\/blog\/2011\/02\/ubuntu-10-10-modperl-and-apache-segfaulting-fixed\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2011\/02\/ubuntu-10-10-modperl-and-apache-segfaulting-fixed\/","url":"https:\/\/www.streppone.it\/cosimo\/blog\/2011\/02\/ubuntu-10-10-modperl-and-apache-segfaulting-fixed\/","name":"Ubuntu 10.10, modperl and Apache segfaulting fixed - Random hacking","isPartOf":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#website"},"datePublished":"2011-02-09T04:19:58+00:00","dateModified":"2011-02-09T04:19:58+00:00","breadcrumb":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2011\/02\/ubuntu-10-10-modperl-and-apache-segfaulting-fixed\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.streppone.it\/cosimo\/blog\/2011\/02\/ubuntu-10-10-modperl-and-apache-segfaulting-fixed\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2011\/02\/ubuntu-10-10-modperl-and-apache-segfaulting-fixed\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.streppone.it\/cosimo\/blog\/"},{"@type":"ListItem","position":2,"name":"Ubuntu 10.10, modperl and Apache segfaulting fixed"}]},{"@type":"WebSite","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#website","url":"https:\/\/www.streppone.it\/cosimo\/blog\/","name":"Random hacking","description":"Assume nothing. Code defensively. Keep it simple, stupid!","publisher":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.streppone.it\/cosimo\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1","name":"cosimo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g","caption":"cosimo"},"logo":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/"},"url":"https:\/\/www.streppone.it\/cosimo\/blog\/author\/cosimo\/"}]}},"_links":{"self":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/posts\/457"}],"collection":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/comments?post=457"}],"version-history":[{"count":0,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/posts\/457\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/media?parent=457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/categories?post=457"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/tags?post=457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}