From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 64DA51F45E for ; Wed, 19 Feb 2020 16:01:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726784AbgBSQA6 (ORCPT ); Wed, 19 Feb 2020 11:00:58 -0500 Received: from mail-oi1-f193.google.com ([209.85.167.193]:45804 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726768AbgBSQA6 (ORCPT ); Wed, 19 Feb 2020 11:00:58 -0500 Received: by mail-oi1-f193.google.com with SMTP id v19so24256310oic.12 for ; Wed, 19 Feb 2020 08:00:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qpWQrhz73Om6tG0V3sa1AzfgyNpqSXzuCwPu2i56LAE=; b=HX1mknvsweL9cVjuLk29AO55XsUzvGdWViZwika4bWbKjMcJzw5lAX/ANnciWpky+k ilGfKg1t5lIhDxJ2JhGKQovlHTvhz3BDyzRh6j18nUCLJoaQkbgWaLvVo2z+HvaU/JNb cwsXByQPCSg/lUqRhEnh62mTek3tE/seKiwqSVgx3yXJ5A/WJ8+oGnBGdGqwUHYFDkeq QyJiyBWZsknqUJn7I2ZT4aCFjXBxt8YKb3ygPZCstv5BdXyrDcjCYPeLXd9QsZ2bGC2C 6TUdua/RVWghyrXwg4WHIdWtmxNgFB9S7CyLAX+DtbSRS1LWZ1XF9hIQA+jUEXjL1MYa uQ8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qpWQrhz73Om6tG0V3sa1AzfgyNpqSXzuCwPu2i56LAE=; b=YDz9pVC4vwW3LCc/7uguCuHj1mTQyy9upFtju61UVtLOmkBAKrJqYnP6cIhpS/UNMv BMFrfdQCrD3B4xe0ExkWDhHxnTtSM9IvItN+E6eOEdCln52qeHt+SUt3jM+fPE0MzWqU sSVqT8ZaMV+F0fOGG6E78kraoL2BHWQVYqbR27PXB0vQEjWyDWpy6S2Cl31QKEsfL5qA IZjI8iUzhe2GqonlZ/hI5dTnmKMEEanCzWwyVt8aoQkvzQDgbC+LCR/vpkkgdy8mao4b SGuUS1s7FLlTzi8fTsjLyWSWFFGdxfx8YTRGRd0PU+O60hmJSIB3MBn2jRzYNkDVlk0C FdAA== X-Gm-Message-State: APjAAAUTJhchYr2eAXzJUMKgbgV7tm3aqqoUJm+b1Efw4iewjGmk+bxT 5RASCfahTeXiOFO2qKJhWEniiCwtqasNaMVUqsQ= X-Google-Smtp-Source: APXvYqxRcopNL4vIHv08Cw4u98aofYd3M3sSnn64b4epwZfHhB8XB3/ItLTJXKPPFg7uwuVCf8juZs0aTIQOgCLMtoc= X-Received: by 2002:aca:b483:: with SMTP id d125mr5177246oif.167.1582128056119; Wed, 19 Feb 2020 08:00:56 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Elijah Newren Date: Wed, 19 Feb 2020 08:00:45 -0800 Message-ID: Subject: Re: [PATCH] t3424: new rebase testcase documenting a stat-dirty-like failure To: Phillip Wood Cc: Elijah Newren via GitGitGadget , Git Mailing List , Johannes Schindelin Content-Type: text/plain; charset="UTF-8" Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Phillip, On Wed, Feb 19, 2020 at 3:01 AM Phillip Wood wrote: > > Hi Elijah > > On 18/02/2020 15:59, Elijah Newren wrote: > > On Tue, Feb 18, 2020 at 7:05 AM Phillip Wood wrote: > >> > >> Hi Elijah > >> > >> On 17/02/2020 19:12, Elijah Newren wrote: > >>> I forgot to add some cc's in GitGitGadget before submitting; adding now... > >>> > >>> On Mon, Feb 17, 2020 at 9:15 AM Elijah Newren via GitGitGadget > >>> wrote: > >>>> > >>>> From: Elijah Newren > >>>> > >>>> A user discovered a case where they had a stack of 20 simple commits to > >>>> rebase, and the rebase would succeed in picking the first commit and > >>>> then error out with a pair of "Could not execute the todo command" and > >>>> "Your local changes to the following files would be overwritten by > >>>> merge" messages. > >>>> > >>>> Their steps actually made use of the -i flag, but I switched it over to > >>>> -m to make it simpler to trigger the bug. With that flag, it bisects > >>>> back to commit 68aa495b590d (rebase: implement --merge via the > >>>> interactive machinery, 2018-12-11), but that's misleading. If you > >>>> change the -m flag to --keep-empty, then the problem persists and will > >>>> bisect back to 356ee4659bb5 (sequencer: try to commit without forking > >>>> 'git commit', 2017-11-24) > >>>> > >>>> After playing with the testcase for a bit, I discovered that added > >>>> --exec "sleep 1" to the command line makes the rebase succeed, making me > >>>> suspect there is some kind of discard and reloading of caches that lead > >>>> us to believe that something is stat dirty, but I didn't succeed in > >>>> digging any further than that. > > I think `--exec true` would be better as it makes it clear that it's not > a timing issue. I've changed do_recursive_merge() to print the mtime and > mode of "DS" before and after the merge which gives > > HEAD is now at abd8fe3 side1 > Rebasing (1/2) # picking commit1 > DS mtime, mode before merge 1582109854, 120000 > DS mtime, mode after merge 0, 120000 > Rebasing (2/2) # picking commit2 > DS mtime, mode before merge 0, 120000 > error: Your local changes to the following files would be overwritten by > merge: > DS > > So it looks like the problem is that when we pick commit1 we don't > update the index entry for DS properly in merge_trees() > > Best Wishes > > Phillip Oh, indeed, so this was my bug. Thanks for jumping in and investigating; I probably should have found that lead but I just didn't. Anyway, with your extra information I dug around for a bit and I think I found the fix. I'll post it soon.