All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Wong <e@80x24.org>
Cc: Todd Zullinger <tmz@pobox.com>,
	"brian m. carlson" <sandals@crustytoothpaste.net>,
	git@vger.kernel.org
Subject: Re: [PATCH] git-svn: control destruction order to avoid segfault
Date: Tue, 30 Jan 2018 13:15:18 -0800	[thread overview]
Message-ID: <xmqqvafjrqu1.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20180129231653.GA22834@starla> (Eric Wong's message of "Mon, 29 Jan 2018 23:16:53 +0000")

Eric Wong <e@80x24.org> writes:

> Todd Zullinger <tmz@pobox.com> wrote:
>> I'm running the tests with and without your patch as well.
>> So far I've run t9128 300 times with the patch and no
>> failures.  Without it, it's failed 3 times in only a few
>> dozen runs.  That's promising.
>
> Thanks for confirming it works on other systems.
> Pull request and patch below:
>
> The following changes since commit 5be1f00a9a701532232f57958efab4be8c959a29:
>
>   First batch after 2.16 (2018-01-23 13:21:10 -0800)
>
> are available in the Git repository at:
>
>   git://bogomips.org/git-svn.git svn-branch-segfault
>
> for you to fetch changes up to 2784b8d68faca823489949cbc69ead2f296cfc07:
>
>   git-svn: control destruction order to avoid segfault (2018-01-29 23:12:00 +0000)
>
> ----------------------------------------------------------------
> Eric Wong (1):
>       git-svn: control destruction order to avoid segfault
>
>  git-svn.perl | 5 +++++
>  1 file changed, 5 insertions(+)

Thanks.  I'd actually apply this as a patch instead of pullilng, as
I suspect you'd want it in 'maint' as well, though.


> ---------8<---------
> Subject: [PATCH] git-svn: control destruction order to avoid segfault
>
> It seems necessary to control destruction ordering to avoid a
> segfault with SVN 1.9.5 when using "git svn branch".
> I've also reported the problem against libsvn-perl to Debian
> [Bug #888791], but releasing the SVN::Client instance can be
> beneficial anyways to save memory.
>
> ref: https://bugs.debian.org/888791
> Tested-by: Todd Zullinger <tmz@pobox.com>
> Reported-by: brian m. carlson <sandals@crustytoothpaste.net>
> Signed-off-by: Eric Wong <e@80x24.org>
> ---
>  git-svn.perl | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/git-svn.perl b/git-svn.perl
> index 76a75d0b3d..a6b6c3e40c 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -1200,6 +1200,11 @@ sub cmd_branch {
>  	$ctx->copy($src, $rev, $dst)
>  		unless $_dry_run;
>  
> +	# Release resources held by ctx before creating another SVN::Ra
> +	# so destruction is orderly.  This seems necessary with SVN 1.9.5
> +	# to avoid segfaults.
> +	$ctx = undef;
> +
>  	$gs->fetch_all;
>  }

  reply	other threads:[~2018-01-30 21:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-29  1:51 t9128 failing randomly with svn 1.9? brian m. carlson
2018-01-29  2:58 ` Todd Zullinger
2018-01-29 12:06   ` Eric Wong
2018-01-29 18:43     ` Todd Zullinger
2018-01-29 23:16       ` [PATCH] git-svn: control destruction order to avoid segfault Eric Wong
2018-01-30 21:15         ` Junio C Hamano [this message]
2018-01-30  0:25     ` t9128 failing randomly with svn 1.9? brian m. carlson
2018-01-30  3:09   ` Todd Zullinger

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

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

  git send-email \
    --in-reply-to=xmqqvafjrqu1.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=e@80x24.org \
    --cc=git@vger.kernel.org \
    --cc=sandals@crustytoothpaste.net \
    --cc=tmz@pobox.com \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.