git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git rebase crash: merge-ort.c:2622: apply_directory_rename_modifications: Assertion `ci->dirmask == 0' failed.
@ 2022-09-16 12:42 Stefano Rivera
  2022-09-20  7:15 ` Elijah Newren
  0 siblings, 1 reply; 3+ messages in thread
From: Stefano Rivera @ 2022-09-16 12:42 UTC (permalink / raw)
  To: git

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

Hi, I got a crash in git-rebase, a failed assertion in merge-ort.c

$ git rebase renamed-parent
git: merge-ort.c:2622: apply_directory_rename_modifications: Assertion `ci->dirmask == 0' failed.

I was rebasing a branch that replaced a directory with a symlink, onto a
branch that renamed a parent directory of the modification.

Reproducer script attached.

Using --strategy=recursive avoids the crash, so it's a bug in ort.

Not subscribed, please CC me in replies.

Thanks,

SR

[System Info]
git version:
git version 2.38.0.rc0.373.g21cbab7515
cpu: x86_64
built from commit: 21cbab75150d71ca294e09180c59ee529ca53957
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 5.18.0-3-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.18.14-1 (2022-07-23) x86_64
compiler info: gnuc: 12.2
libc info: glibc: 2.34
$SHELL (typically, interactive shell): /bin/bash

[Enabled Hooks]

[-- Attachment #2: reproduce.sh --]
[-- Type: application/x-sh, Size: 484 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git rebase crash: merge-ort.c:2622: apply_directory_rename_modifications: Assertion `ci->dirmask == 0' failed.
  2022-09-16 12:42 git rebase crash: merge-ort.c:2622: apply_directory_rename_modifications: Assertion `ci->dirmask == 0' failed Stefano Rivera
@ 2022-09-20  7:15 ` Elijah Newren
  2022-10-22 19:06   ` Elijah Newren
  0 siblings, 1 reply; 3+ messages in thread
From: Elijah Newren @ 2022-09-20  7:15 UTC (permalink / raw)
  To: Stefano Rivera; +Cc: Git Mailing List

Hi,

On Fri, Sep 16, 2022 at 6:24 AM Stefano Rivera <stefano@rivera.za.net> wrote:
>
> Hi, I got a crash in git-rebase, a failed assertion in merge-ort.c
>
> $ git rebase renamed-parent
> git: merge-ort.c:2622: apply_directory_rename_modifications: Assertion `ci->dirmask == 0' failed.
>
> I was rebasing a branch that replaced a directory with a symlink, onto a
> branch that renamed a parent directory of the modification.
>
> Reproducer script attached.
>
> Using --strategy=recursive avoids the crash, so it's a bug in ort.
>
> Not subscribed, please CC me in replies.
>
> Thanks,
>
> SR
>
> [System Info]
> git version:
> git version 2.38.0.rc0.373.g21cbab7515
> cpu: x86_64
> built from commit: 21cbab75150d71ca294e09180c59ee529ca53957
> sizeof-long: 8
> sizeof-size_t: 8
> shell-path: /bin/sh
> uname: Linux 5.18.0-3-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.18.14-1 (2022-07-23) x86_64
> compiler info: gnuc: 12.2
> libc info: glibc: 2.34
> $SHELL (typically, interactive shell): /bin/bash
>
> [Enabled Hooks]

Thanks for testing out a release candidate, typing up the detailed
report, and even finding a simple testcase!  Very cool.

I don't have a fix, but just wanted to send a note out that I've seen
your report and will take a look at it this week.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git rebase crash: merge-ort.c:2622: apply_directory_rename_modifications: Assertion `ci->dirmask == 0' failed.
  2022-09-20  7:15 ` Elijah Newren
@ 2022-10-22 19:06   ` Elijah Newren
  0 siblings, 0 replies; 3+ messages in thread
From: Elijah Newren @ 2022-10-22 19:06 UTC (permalink / raw)
  To: Stefano Rivera; +Cc: Git Mailing List

Hi,

On Tue, Sep 20, 2022 at 12:15 AM Elijah Newren <newren@gmail.com> wrote:
>
> Hi,
>
> On Fri, Sep 16, 2022 at 6:24 AM Stefano Rivera <stefano@rivera.za.net> wrote:
> >
> > Hi, I got a crash in git-rebase, a failed assertion in merge-ort.c
> >
> > $ git rebase renamed-parent
> > git: merge-ort.c:2622: apply_directory_rename_modifications: Assertion `ci->dirmask == 0' failed.
> >
> > I was rebasing a branch that replaced a directory with a symlink, onto a
> > branch that renamed a parent directory of the modification.
> >
> > Reproducer script attached.
> >
> > Using --strategy=recursive avoids the crash, so it's a bug in ort.
> >
> > Not subscribed, please CC me in replies.
> >
> > Thanks,
> >
> > SR
> >
>
> Thanks for testing out a release candidate, typing up the detailed
> report, and even finding a simple testcase!  Very cool.
>
> I don't have a fix, but just wanted to send a note out that I've seen
> your report and will take a look at it this week.

I had a hacky fix for about a month now, and haven't had time to clean
it up and look around for nearby issues.

I believe the cause here is related to the code added to fix the bug
in 902c521a35 ("t6423: more involved directory rename test",
2020-10-15).  Since that issue was never fixed in merge-recursive, it
didn't get the side effect of this new bug.  Had that other bug been
fixed in merge-recursive, it may well have exhibited a similar issue
with the testcase you reported here.

Anyway, I posted a patch to fix this issue in ort:
https://lore.kernel.org/git/pull.1391.git.1666465450590.gitgitgadget@gmail.com

Thanks again for reporting it, and for providing the simple steps to reproduce!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-22 19:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-16 12:42 git rebase crash: merge-ort.c:2622: apply_directory_rename_modifications: Assertion `ci->dirmask == 0' failed Stefano Rivera
2022-09-20  7:15 ` Elijah Newren
2022-10-22 19:06   ` Elijah Newren

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).