git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Luke Diamand <luke@diamand.org>, Git Users <git@vger.kernel.org>,
	Christian Couder <christian.couder@gmail.com>
Subject: Re: could not freshen shared index ..../sharedindex.0000000000000000000000000000000000000000'
Date: Fri, 08 Feb 2019 09:23:56 -0800	[thread overview]
Message-ID: <xmqqzhr6kxcj.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20190208100221.GA22283@ash> (Duy Nguyen's message of "Fri, 8 Feb 2019 17:02:22 +0700")

Duy Nguyen <pclouds@gmail.com> writes:

> On Wed, Feb 06, 2019 at 10:25:25AM +0000, Luke Diamand wrote:
>> I've recently started seeing a lot of this message when doing a rebase:
>> 
>>    warning: could not freshen shared index
>> '/home/ldiamand/git/dev_full/.git/worktrees/gcc8-take-2/sharedindex.0000000000000000000000000000000000000000'
>
> There are only two places in the code that could print this. The one
> in read_index_from() can't happen unless is_null_oid() is broken (very
> very unlikely).
>
> The other one is in write_locked_index() which could happen in theory
> but I don't understand how it got there. If you could build git, could
> you try this patch and see if it helps?

... meaning, if it hides the symptom, we'd know the codepath that
causes a NULL si->base_oid to appear here is the culprit?  Or do you
mean that it is expected si->base_oid sometimes is NULL and we should
have been pretending as if si were NULL (i.e. split_index is not being
used)?

I take it as the latter (i.e. "helps" to narrow down the bug hunting
field, not "helps" by fixing the bug).

Thanks.

>
> -- 8< --
> diff --git a/read-cache.c b/read-cache.c
> index f68b367613..5ad71478dc 100644
> --- a/read-cache.c
> +++ b/read-cache.c
> @@ -3165,6 +3165,7 @@ int write_locked_index(struct index_state *istate, struct lock_file *lock,
>  		fill_fsmonitor_bitmap(istate);
>  
>  	if (!si || alternate_index_output ||
> +	    (si && is_null_oid(&si->base_oid)) ||
>  	    (istate->cache_changed & ~EXTMASK)) {
>  		if (si)
>  			oidclr(&si->base_oid);
> -- 8< --
>
>
>> (There's a repo called dev_full, and I've got a worktree where I'm
>> working on my 3rd attempt to make it work with gcc8).
>> 
>> That file doesn't actually exist but there are a bunch of
>> sharedindex.XXX files in there with more convincing looking names.
>> 
>> 2.20.1.611.gfbb209baf1
> --
> Duy

  parent reply	other threads:[~2019-02-08 17:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-06 10:25 could not freshen shared index ..../sharedindex.0000000000000000000000000000000000000000' Luke Diamand
2019-02-06 13:17 ` Christian Couder
2019-02-08 10:02 ` Duy Nguyen
2019-02-08 16:38   ` Luke Diamand
2019-02-09  5:00     ` Duy Nguyen
2019-02-09  9:57       ` Luke Diamand
2019-02-09 10:36         ` Duy Nguyen
2019-02-09 11:23         ` [PATCH] unpack-trees.c: fix writing "link" index ext with null base oid Nguyễn Thái Ngọc Duy
2019-02-09 14:14           ` Luke Diamand
2019-02-12  5:43           ` Elijah Newren
2019-02-12 16:49             ` Junio C Hamano
2019-02-12  9:36           ` Ævar Arnfjörð Bjarmason
2019-02-13  9:51           ` [PATCH v2] read-cache.c: " Nguyễn Thái Ngọc Duy
2019-02-13 12:14             ` Ævar Arnfjörð Bjarmason
2019-02-08 17:23   ` Junio C Hamano [this message]
2019-02-09  4:56     ` could not freshen shared index ..../sharedindex.0000000000000000000000000000000000000000' Duy Nguyen

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=xmqqzhr6kxcj.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=luke@diamand.org \
    --cc=pclouds@gmail.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.
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).