Hi all,

I have an odd issue that I wonder if anyone's seen before (before I dig into the guts of SVN::* myself...)

If I let SVN::Client automatically handle the connection pool itself, I get a segfault:

use strict; use warnings; use SVN::Client; my $ctx = new SVN::Client; $ctx->cat(\*STDOUT, "https://some/svn/url", "HEAD");
The backtrace of the core is:
(gdb) backtrace #0 0xfe330f20 in ?? () #1 0xfeec41dc in ?? () #2 0xfeec42a8 in ?? () #3 0xfeec3f4c in ?? () #4 0xff098fdc in ?? () #5 0x00086e34 in xmlShell () #6 0x0007e9a8 in Perl_runops_standard () #7 0x00029084 in _PROCEDURE_LINKAGE_TABLE_ () #8 0x00028d7c in _GLOBAL_OFFSET_TABLE_ () #9 0x0002cd88 in S_call_list_body () #10 0x0002c95c in xmlCopyEntity () #11 0x00025d48 in perl_destruct () #12 0x00024cfc in main ()
So it occurs in the destruction of some xs code - presumably the SVN connection. On a hunch, I tried creating and freeing the pool manually:

use strict; use warnings; use SVN::Core; use SVN::Client; my $pool = SVN::Pool->new_default; my $ctx = new SVN::Client; $ctx->cat(\*STDOUT, "https://some/svn/url", "HEAD", $pool); undef $pool;
Which works a treat. Anyone have any familiarity with the SVN::* internals before I go hunting?

Update: I loaded in all the symbol files I could think were relevant and discovered in the backtrace is xml related (and I'm linked against libxml2).


In reply to Segfault on exit when using SVN::Client by aufflick

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.