Package: libsvn0
Version: 1.2.0-1
Severity: normal

I've been seeing a crash in libsvn0 under the commandline svn client
when attempting to do an export from a local client copy.  It's
reproducible many times in a row on the same client copy, but seems to
vary with the state of the client copy or something -- not sure of the
circumstances.

This may be a dupe of #314381 or possibly #316227; they both look
similar but the stack traces in both of those look different.

First a trace, taken with 1.2.0-1 built with DEB_BUILD_OPTIONS=nostrip:

Starting program: /usr/bin/svn export head qpsmtpd-0.31/debian
[Thread debugging using libthread_db enabled]
[New Thread -1215971200 (LWP 5574)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1215971200 (LWP 5574)]
0xb7fdacdf in copy_one_versioned_file (from=0x808f688 "head/foo",
    to=0x808f698 "qpsmtpd-0.31/debian/foo", adm_access=0x8068640,
    revision=0xbffff504, native_eol=0x0, pool=0x808f650)
    at subversion/libsvn_client/export.c:120
120       if ((revision->kind != svn_opt_revision_working &&
(gdb) bt
#0  0xb7fdacdf in copy_one_versioned_file (from=0x808f688 "head/foo",
    to=0x808f698 "qpsmtpd-0.31/debian/foo", adm_access=0x8068640,
    revision=0xbffff504, native_eol=0x0, pool=0x808f650)
    at subversion/libsvn_client/export.c:120
#1  0xb7fdb35b in copy_versioned_files (from=0x80683e0 "head",
    to=0x80683c0 "qpsmtpd-0.31/debian", revision=0xbffff504, force=0,
    recurse=1, native_eol=0x0, ctx=0x8067560, pool=0x8067160)
    at subversion/libsvn_client/export.c:326
#2  0xb7fdbed8 in svn_client_export3 (result_rev=0x0, from=0x80683e0 "head",
    to=0x80683c0 "qpsmtpd-0.31/debian", peg_revision=0xbffff598,
    revision=0xbffff6c4, overwrite=0, ignore_externals=0, recurse=1,
    native_eol=0x0, ctx=0x8067560, pool=0x8067160)
    at subversion/libsvn_client/export.c:904
#3  0x0804cffa in svn_cl__export (os=0x8067198, baton=0x0, pool=0x8067160)
    at subversion/clients/cmdline/export-cmd.c:74
#4  0x0804fe09 in main (argc=4, argv=0xbffff8b4)
    at subversion/clients/cmdline/main.c:1449

The actual fault line was clipped by gdb, but appears thusly:

  if ((revision->kind != svn_opt_revision_working &&
       entry->schedule == svn_wc_schedule_add) ||
      (revision->kind == svn_opt_revision_working &&
       entry->schedule == svn_wc_schedule_delete))
    return SVN_NO_ERROR;

Inspecting those, 'entry' is NULL:

(gdb) p revision->kind
$2 = svn_opt_revision_working
(gdb) p entry
$4 = (const svn_wc_entry_t *) 0x0

'entry' was set NULL by this call to apr_hash_get() in svn_wc_entry():

  if (dir_access)
    {
      apr_hash_t *entries;
      SVN_ERR (svn_wc_entries_read (&entries, dir_access, show_hidden, pool));
      *entry = apr_hash_get (entries, entry_name, APR_HASH_KEY_STRING);
    }
  else
    *entry = NULL;

stepping to which:

759           *entry = apr_hash_get (entries, entry_name, APR_HASH_KEY_STRING);
(gdb) p entry_name
$13 = 0x808f6b8 "foo"
(gdb) n
765     }
(gdb) p *entry
$14 = (const svn_wc_entry_t *) 0x0


The export had created a couple of files successfully in the export tree.  The
one it was working on, "head/foo" was a test file I created, checked in, then
deleted and commited in an attempt to reproduce the problem.  So far all the
instances of the crash I've seen have been associated with points in the
export where it was about to touch a file svn-deleted from that particular
client.

An strace of the export:
http://devin.com/cruft/svn-crash/svn-strace.log

A tarball of the client (28k):
http://devin.com/cruft/svn-crash/working-copy.tar.bz2

A fragment of a dump of the repository, with the only two changes ever to
touch the file on which the crash occurred (one creating, the other deleting):
http://devin.com/cruft/svn-crash/repo-dump-excerpt.txt

Hope this is useful.  I'll try to keep the testcase intact if you need more
data.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.11
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages libsvn0 depends on:
ii  libapr0                    2.0.54-4      the Apache Portable Runtime
ii  libc6                      2.3.2.ds1-22  GNU C Library: Shared libraries an
ii  libdb4.2                   4.2.52-19     Berkeley v4.2 Database Libraries [
ii  libexpat1                  1.95.8-3      XML parsing C library - runtime li
ii  libldap2                   2.1.30-11     OpenLDAP libraries
ii  libneon24                  0.24.7.dfsg-2 An HTTP and WebDAV client library
ii  libssl0.9.7                0.9.7g-1      SSL shared libraries
ii  libxml2                    2.6.20-1      GNOME XML library
ii  zlib1g                     1:1.2.3-1     compression library - runtime

libsvn0 recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to