All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "René Scharfe" <l.s.r@web.de>,
	"Shawn Pearce" <spearce@spearce.org>,
	"Martin von Gagern" <Martin.vGagern@gmx.net>,
	git@vger.kernel.org
Subject: Re: [BUG] resolved deltas
Date: Fri, 29 Aug 2014 16:55:38 -0400	[thread overview]
Message-ID: <20140829205538.GD29456@peff.net> (raw)
In-Reply-To: <xmqq1ts08ax2.fsf@gitster.dls.corp.google.com>

On Thu, Aug 28, 2014 at 04:14:01PM -0700, Junio C Hamano wrote:

> Jeff King <peff@peff.net> writes:
> 
> > On Thu, Aug 28, 2014 at 06:08:21PM -0400, Jeff King wrote:
> >
> >> Interesting. I couldn't convince Helgrind to catch such a case...
> >
> > Ugh. It helps if you actually helgrind the git binary, and not the
> > shell-script from bin-wrappers. I can easily replicate the problem now.
> > The patch I just posted seems to fix it (at least it has been running in
> > a loop for over a minute with no failures, whereas before it took only a
> > few seconds to provoke a failure).
> 
> Thanks for digging.  I'll pick it up and may comment on it in
> tomorrow's cycle (it is a bit too late for today's cycle,
> unfortunately).

Here's a proposed series.

  [1/2]: index-pack: fix race condition with duplicate bases
  [2/2]: index-pack: handle duplicate base objects gracefully

There are two big changes from what has been posted already:

  1. While writing up the commit message, I realized that this can't
     ever happen for OFS_DELTA (neither the race condition, nor the
     duplicate resolution) because offsets by definition point to a
     unique entry in our object_entry array. So even if we have multiple
     copies of the base object in the pack, there's only one possible
     base for an OFS_DELTA.

  2. René's original patch just does nothing for a delta which has
     already been resolved, and continues through the function to try
     any OFS_DELTA objects. If there isn't one, we return NULL to say
     "nothing left to resolve". But that's not quite true. There may
     have been other REF_DELTA against the same base, but we never
     incremented our counter to find it.

     Instead, we need to actually increment our counter and loop again
     to see if there's another REF_DELTA to handle.

-Peff

  reply	other threads:[~2014-08-29 20:55 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-21 11:35 [BUG] resolved deltas Petr Stodulka
2014-08-21 18:25 ` Petr Stodulka
2014-08-22 19:41 ` Martin von Gagern
2014-08-23 10:12   ` René Scharfe
2014-08-23 10:56     ` Jeff King
2014-08-23 11:04       ` Jeff King
2014-08-23 11:18         ` Jeff King
2014-08-25 16:39           ` René Scharfe
2014-08-28 22:08             ` Jeff King
2014-08-28 22:15               ` Jeff King
2014-08-28 23:04                 ` Jeff King
2014-08-28 22:22               ` Jeff King
2014-08-28 23:14                 ` Junio C Hamano
2014-08-29 20:55                   ` Jeff King [this message]
2014-08-29 20:57                     ` [PATCH 1/2] index-pack: fix race condition with duplicate bases Jeff King
2014-08-29 20:58                     ` [PATCH 2/2] index-pack: handle duplicate base objects gracefully Jeff King
2014-08-29 21:56                       ` Junio C Hamano
2014-08-29 22:08                         ` Jeff King
2014-08-30  2:59                           ` Shawn Pearce
2014-08-30 13:16                             ` Jeff King
2014-08-30 16:00                               ` René Scharfe
2014-08-31 15:17                                 ` Jeff King
2014-08-31 16:30                                   ` René Scharfe
2014-08-31  1:10                               ` Shawn Pearce
2014-08-31 15:24                                 ` Jeff King
2014-08-31 22:23                                   ` Junio C Hamano
2014-08-30 13:23                     ` [PATCH 3/2] t5309: mark delta-cycle failover tests as passing Jeff King
2014-08-31 15:15                       ` Jeff King
2014-09-02 17:19                         ` Junio C Hamano
2014-08-25 17:19       ` [BUG] resolved deltas Shawn Pearce

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=20140829205538.GD29456@peff.net \
    --to=peff@peff.net \
    --cc=Martin.vGagern@gmx.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=l.s.r@web.de \
    --cc=spearce@spearce.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.
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.