git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Friedrich Delgado <delgado@dfn-cert.de>
To: git@vger.kernel.org
Subject: segmentation fault after successful completion of certain git svn commands
Date: Wed, 10 Jul 2013 12:51:16 +0200	[thread overview]
Message-ID: <20130710105116.GA31645@rosita.dfn-cert.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 4544 bytes --]

Hi!

I suspect I may have found a problem in the way git-svn uses SVN::Core
that leads to a segmentation fault. That's a hypothesis based on the
following incomplete findings:

git version 1.8.3.2.50.g531c8dd      (from recent git maint)
svn, version 1.7.10 (r1485443)       (from openSUSE 12.2)
subversion-perl-1.7.10-4.16.1.x86_64 (from openSUSE 12.2)

,----[ ~/.subversion/config ]
  [auth]
  password-stores = kwallet
  store-passwords = yes
  store-ssl-client-cert-pp = yes
`----

~/.subversion/servers is set up to use a pkcs12 certificate for
certain projects.

Unfortunately I'm not the administrator of the box, so I'd have to ask
the system administrator to install the debug packages for me if you
need a useful gdb backtrace. Maybe the following information helps, if
not, I'll see what I can do to provide a meaningful gdb backtrace.

In a git-svn checkout of such a project:

,----[ redacted ]
  > perl -d:Trace ~/anon-vc/git/git-svn rebase 2>&1|tail
  >> /usr/lib/perl5/5.16.0/File/Temp.pm:895:                   @{ $dirs_to_unlink{$$} } : () );
  >> /usr/lib/perl5/5.16.0/File/Temp.pm:896:       foreach my $dir (@dirs) {
  >> /usr/lib/perl5/5.16.0/File/Temp.pm:908:       @{ $files_to_unlink{$$} } = ()
  >> /usr/lib/perl5/5.16.0/File/Temp.pm:910:       @{ $dirs_to_unlink{$$} } = ()
  >> /home/user/local/stow/git/lib/perl5/site_perl/5.16.0/Git/SVN.pm:1659:     unmemoize_svn_mergeinfo_functions();
  >> /home/user/local/stow/git/lib/perl5/site_perl/5.16.0/Git/SVN.pm:1626:             return if not $memoized;
  >> /home/user/local/stow/git/lib/perl5/site_perl/5.16.0/Git/SVN.pm:85:       unlink keys %LOCKFILES if %LOCKFILES;
  >> /home/user/local/stow/git/lib/perl5/site_perl/5.16.0/Git/SVN.pm:86:       unlink keys %INDEX_FILES if %INDEX_FILES;
  >> /usr/lib/perl5/vendor_perl/5.16.0/x86_64-linux-thread-multi/SVN/Core.pm:390:     $globaldestroy = 1;
  >> /usr/lib/perl5/vendor_perl/5.16.0/x86_64-linux-thread-multi/SVN/Core.pm:58:     SVN::_Core::apr_terminate();
  [1]    1631 segmentation fault (core dumped)  perl -d:Trace ~/anon-vc/git/git-svn rebase 2>&1 | 
         1632 done                              tail
`----

(The segfault will also occur after git svn clone.)

It appears that rebase and clone lead to correct results. An strace
seems to indicate that the segfault occurs after a munmap.

,----[ redacted ]
  > strace -f git svn rebase 2>&1|tail -20
  [pid  2355] rt_sigaction(SIGRT_32, NULL, {SIG_DFL, [], 0}, 8) = 0
  [pid  2355] rt_sigaction(SIGABRT, NULL, {SIG_DFL, [], 0}, 8) = 0
  [pid  2355] rt_sigaction(SIGCHLD, NULL, {0x7ff0c737d250, [], SA_RESTORER|SA_NOCLDSTOP, 0x7ff0d00a1140}, 8) = 0
  [pid  2355] rt_sigaction(SIGIO, NULL, {SIG_DFL, [], 0}, 8) = 0
  [pid  2355] rt_sigaction(SIGSYS, NULL, {SIG_DFL, [], 0}, 8) = 0
  [pid  2355] futex(0x7ff0ca0372c0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
  [pid  2355] futex(0x7ff0ca037280, FUTEX_WAKE_PRIVATE, 2147483647) = 0
  [pid  2355] futex(0x7ff0cab9a0a0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
  [pid  2355] write(6, "XXXIXTAMPEREDXWITHXTHISXSTRINGXXXXXXX"..., 37) = 37
  [pid  2355] brk(0x30f7000)              = 0x30f7000
  [pid  2355] close(6)                    = 0
  [pid  2355] munmap(0x7ff0c7940000, 2113920) = 0
  [pid  2355] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x7ff0c7941df0} ---
  [pid  2355] +++ killed by SIGSEGV (core dumped) +++
  <... wait4 resumed> [{WIFSIGNALED(s) && WTERMSIG(s) == SIGSEGV && WCOREDUMP(s)}], 0, NULL) = 2355
  --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_DUMPED, si_pid=2355, si_status=SIGSEGV, si_utime=22, si_stime=95} ---
  write(2, "error: git-svn died of signal 11"..., 33error: git-svn died of signal 11
  ) = 33
  exit_group(139)                         = ?
  +++ exited with 139 +++
`----

(both traces were edited a bit by me)

Maybe the following two urls I found are related or helpful:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=551769
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2356032

That's all I can think of right now. Please tell me if there's any
more information I should provide to help you narrow this down.

Thanks in advance and kind regards
       Friedrich Delgado
-- 
Dipl.-Inform Friedrich Delgado             (Projekt- und Entwicklungsteam)

DFN-CERT Services GmbH, https://www.dfn-cert.de/
Sitz/Register: Hamburg,  AG Hamburg,  HRB 88805,  Ust-IdNr.: DE 232129737
Sachsenstraße 5, 20097 Hamburg/Germany,  CEO: Dr. Klaus-Peter Kossakowski

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5267 bytes --]

                 reply	other threads:[~2013-07-10 11:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130710105116.GA31645@rosita.dfn-cert.de \
    --to=delgado@dfn-cert.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).