Debian Bug report logs - #600785
git: Bug in merge-recursive.c breaks merges in repositories with large histories

version graph

Package: git; Maintainer for git is Jonathan Nieder <jrnieder@gmail.com>; Source for git is src:git (PTS, buildd, popcon).

Reported by: Liraz Siri <liraz@turnkeylinux.org>

Date: Wed, 20 Oct 2010 05:00:01 UTC

Severity: important

Tags: fixed-upstream, patch, upstream

Found in version git/1:1.7.2.3-2

Fixed in version git/1:1.7.4.1-1

Done: Jonathan Nieder <jrnieder@gmail.com>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#600785; Package git. (Wed, 20 Oct 2010 05:00:04 GMT) (full text, mbox, link).


Acknowledgement sent to Liraz Siri <liraz@turnkeylinux.org>:
New Bug report received and forwarded. Copy sent to Gerrit Pape <pape@smarden.org>. (Wed, 20 Oct 2010 05:00:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Liraz Siri <liraz@turnkeylinux.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: git: Bug in merge-recursive.c breaks merges in repositories with large histories
Date: Wed, 20 Oct 2010 06:51:33 +0200
Package: git
Version: 1:1.7.2.3-2
Severity: important


I've been investigating a merge bug in an unusually large Git repository
with over ten thousand commits.

In older versions of the git-core package (the one in stable),
attempting to merge would raise a segmentation fault. In the latest
version from sid a slightly more useful error message is produced:

    BUG: There are unmerged index entries:
    BUG: 2 [ ... snip file paths ...] Bug in merge-recursive.c

The bug seems so have been fixed in the latest version of Git from
upstream (1.7.3.1) so I'm guessing once you update to that or a higher
version everything will be fine.

-- System Information:

Kernel: Linux 2.6.24-22-generic (SMP w/4 CPU cores)
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#600785; Package git. (Wed, 20 Oct 2010 05:57:02 GMT) (full text, mbox, link).


Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Wed, 20 Oct 2010 05:57:02 GMT) (full text, mbox, link).


Message #10 received at 600785@bugs.debian.org (full text, mbox, reply):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Liraz Siri <liraz@turnkeylinux.org>
Cc: 600785@bugs.debian.org, Elijah Newren <newren@gmail.com>
Subject: Re: git: Bug in merge-recursive.c breaks merges in repositories with large histories
Date: Wed, 20 Oct 2010 00:48:13 -0500
Hi,

Liraz Siri wrote:

> I've been investigating a merge bug in an unusually large Git repository
> with over ten thousand commits.
> 
> In older versions of the git-core package (the one in stable),
> attempting to merge would raise a segmentation fault. In the latest
> version from sid a slightly more useful error message is produced:
> 
>     BUG: There are unmerged index entries:
>     BUG: 2 [ ... snip file paths ...] Bug in merge-recursive.c
> 
> The bug seems so have been fixed in the latest version of Git from
> upstream (1.7.3.1) so I'm guessing once you update to that or a higher
> version everything will be fine.

Thanks!  I'm cc-ing Elijah Newren, who's been doing work recently in
this area (unhandled index entries that appear during directory/file
conflicts).

Elijah, is it safe to pull in the en/d-f-conflict-fix branch on top of
v1.7.2.3, or are more fixes (e.g. from en/merge-recursive) needed in
addition?  (For the record, the relevant changes are:

  8 files changed, 284 insertions(+), 24 deletions(-)

).

I fear that it is unlikely this work can be included in Debian
squeeze, but it might be worth proposing it anyway.




Added tag(s) upstream, fixed-upstream, and patch. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Wed, 20 Oct 2010 05:57:04 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#600785; Package git. (Wed, 20 Oct 2010 19:30:02 GMT) (full text, mbox, link).


Acknowledgement sent to Elijah Newren <newren@gmail.com>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Wed, 20 Oct 2010 19:30:03 GMT) (full text, mbox, link).


Message #17 received at 600785@bugs.debian.org (full text, mbox, reply):

From: Elijah Newren <newren@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Liraz Siri <liraz@turnkeylinux.org>, 600785@bugs.debian.org
Subject: Re: git: Bug in merge-recursive.c breaks merges in repositories with large histories
Date: Wed, 20 Oct 2010 13:27:38 -0600
Hi,

On Tue, Oct 19, 2010 at 11:48 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Liraz Siri wrote:
>
>> I've been investigating a merge bug in an unusually large Git repository
>> with over ten thousand commits.
>>
>> In older versions of the git-core package (the one in stable),
>> attempting to merge would raise a segmentation fault. In the latest
>> version from sid a slightly more useful error message is produced:
>>
>>     BUG: There are unmerged index entries:
>>     BUG: 2 [ ... snip file paths ...] Bug in merge-recursive.c
>>
>> The bug seems so have been fixed in the latest version of Git from
>> upstream (1.7.3.1) so I'm guessing once you update to that or a higher
>> version everything will be fine.
>
> Thanks!  I'm cc-ing Elijah Newren, who's been doing work recently in
> this area (unhandled index entries that appear during directory/file
> conflicts).
>
> Elijah, is it safe to pull in the en/d-f-conflict-fix branch on top of
> v1.7.2.3, or are more fixes (e.g. from en/merge-recursive) needed in
> addition?  (For the record, the relevant changes are:
>
>  8 files changed, 284 insertions(+), 24 deletions(-)
>
> ).
>
> I fear that it is unlikely this work can be included in Debian
> squeeze, but it might be worth proposing it anyway.

If git-1.7.3.1 fixes it, then nothing from en/merge-recursive is
needed and en/d-f-conflict-fix on top of 1.7.2.3 should be sufficient
(and, in fact, only the changes to merge-recursive.c from that series
is needed).

I'm relatively sure that series should apply cleanly to 1.7.2.3
(though I haven't tried it locally and run the relevant tests included
with it to verify), but it will introduce a small bug in fast-export
on platforms with a non-stable qsort.  I doubt that affects Debian,
but you may want to also merge 4ce6fb80580 from Johannes Sixt if you
merge all of en/d-f-conflict-fix.


Oh, and a side note: The merge recursive work is actually far beyond
D/F conflicts now (though I haven't yet sent an updated series to the
git list).  I've found errors that do not involve D/F conflicts that
hit a wide range of areas now: deleting untracked files, criss-cross
merges that have undetected or spurious conflicts, rename/rename (2 to
1) conflict detection code is never triggered and turns out to be very
buggy, working tree contents after merge conflicts aren't as expected
in some cases, not breaking complete rewrites into pairs of deletes
and creates can cause spurious or undetected conflicts,
rename/rename/add conflicts (not currently checked for in the code
base and not correctly handled), and various cross-interactions
between all these different issues.




Added tag(s) pending. Request was from Anibal Monsalve Salazar <anibal@debian.org> to control@bugs.debian.org. (Wed, 16 Feb 2011 19:09:13 GMT) (full text, mbox, link).


Reply sent to Jonathan Nieder <jrnieder@gmail.com>:
You have taken responsibility. (Thu, 17 Feb 2011 12:18:58 GMT) (full text, mbox, link).


Notification sent to Liraz Siri <liraz@turnkeylinux.org>:
Bug acknowledged by developer. (Thu, 17 Feb 2011 12:18:58 GMT) (full text, mbox, link).


Message #24 received at 600785-close@bugs.debian.org (full text, mbox, reply):

From: Jonathan Nieder <jrnieder@gmail.com>
To: 600785-close@bugs.debian.org
Subject: Bug#600785: fixed in git 1:1.7.4.1-1
Date: Thu, 17 Feb 2011 12:17:31 +0000
Source: git
Source-Version: 1:1.7.4.1-1

We believe that the bug you reported is fixed in the latest version of
git, which is due to be installed in the Debian FTP archive:

git-all_1.7.4.1-1_all.deb
  to main/g/git/git-all_1.7.4.1-1_all.deb
git-arch_1.7.4.1-1_all.deb
  to main/g/git/git-arch_1.7.4.1-1_all.deb
git-core_1.7.4.1-1_all.deb
  to main/g/git/git-core_1.7.4.1-1_all.deb
git-cvs_1.7.4.1-1_all.deb
  to main/g/git/git-cvs_1.7.4.1-1_all.deb
git-daemon-run_1.7.4.1-1_all.deb
  to main/g/git/git-daemon-run_1.7.4.1-1_all.deb
git-doc_1.7.4.1-1_all.deb
  to main/g/git/git-doc_1.7.4.1-1_all.deb
git-email_1.7.4.1-1_all.deb
  to main/g/git/git-email_1.7.4.1-1_all.deb
git-gui_1.7.4.1-1_all.deb
  to main/g/git/git-gui_1.7.4.1-1_all.deb
git-man_1.7.4.1-1_all.deb
  to main/g/git/git-man_1.7.4.1-1_all.deb
git-svn_1.7.4.1-1_all.deb
  to main/g/git/git-svn_1.7.4.1-1_all.deb
git_1.7.4.1-1.diff.gz
  to main/g/git/git_1.7.4.1-1.diff.gz
git_1.7.4.1-1.dsc
  to main/g/git/git_1.7.4.1-1.dsc
git_1.7.4.1.orig.tar.gz
  to main/g/git/git_1.7.4.1.orig.tar.gz
gitk_1.7.4.1-1_all.deb
  to main/g/git/gitk_1.7.4.1-1_all.deb
gitweb_1.7.4.1-1_all.deb
  to main/g/git/gitweb_1.7.4.1-1_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 600785@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jonathan Nieder <jrnieder@gmail.com> (supplier of updated git package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 15 Feb 2011 19:27:38 -0600
Source: git
Binary: git git-man git-core git-doc git-arch git-cvs git-svn git-email git-daemon-run git-gui gitk gitweb git-all
Architecture: all source
Version: 1:1.7.4.1-1
Distribution: unstable
Urgency: low
Maintainer: Gerrit Pape <pape@smarden.org>
Changed-By: Jonathan Nieder <jrnieder@gmail.com>
Description: 
 git        - fast, scalable, distributed revision control system
 git-all    - fast, scalable, distributed revision control system (all subpacka
 git-arch   - fast, scalable, distributed revision control system (arch interop
 git-core   - fast, scalable, distributed revision control system (obsolete)
 git-cvs    - fast, scalable, distributed revision control system (cvs interope
 git-daemon-run - fast, scalable, distributed revision control system (git-daemon s
 git-doc    - fast, scalable, distributed revision control system (documentatio
 git-email  - fast, scalable, distributed revision control system (email add-on
 git-gui    - fast, scalable, distributed revision control system (GUI)
 git-man    - fast, scalable, distributed revision control system (manual pages
 git-svn    - fast, scalable, distributed revision control system (svn interope
 gitk       - fast, scalable, distributed revision control system (revision tre
 gitweb     - fast, scalable, distributed revision control system (web interfac
Closes: 465776 466471 499002 507476 524309 540001 575917 576887 577471 578752 581691 583693 583699 585725 588103 598245 600566 600785 606975 607044 610423 610481 611608
Changes: 
 git (1:1.7.4.1-1) unstable; urgency=low
 .
   * new upstream release (closes: #600566, #575917, #578752, #583693,
     #583699, #588103, #507476, #540001, #524309, #581691, #600785,
     #577471, #607044, #606975, #610423, #610481).
 .
   [ Anders Kaseorg ]
   * debian/git.docs, debian/rules: deal with RelNotes subdirectory.
   * debian/diff/0007-gitk-Take-only-numeric-...diff: new; gitk: do
     not error out when git version number contains "-rc".
 .
   [ Jonathan Nieder ]
   * add myself as uploader.
   * debian/diff/0003, 0007, 0010-0034: remove, applied upstream.
   * debian/rules: accept patches with .patch suffix, too (thx Anders
     Kaseorg).
   * debian/rules: use patch -N -r- so patch application is idempotent.
   * update debian/copyright.
   * debian/diff/0001-ident-check-etc-mailname...diff: avoid calls to
     gethostbyname when mailname is not an fqdn (closes: #611608).
   * debian/diff/0005-gitk-use-...diff: new; gitk: use standard desktop
     fonts by default.  The appearance for users that already have a
     generated ~/.gitk file is not affected (closes: #466471).
   * debian/diff/0006-gitk-...diff: new; gitk: avoid spurious matches
     in "All fields" search (thx Frédéric Brière, closes: #465776).
   * debian/control: git-cvs: recommend cvs2git for one-time conversions
     (closes: #585725).
   * debian/control: git-core: explain that it still may be needed (thx
     Denis Laxalde).
   * debian/control: gitweb: allow lynx-cur to satisfy dependency on a
     CGI implementation (thx Ivan Shmakov).
   * debian/control, debian/rules: new architecture-independent package
     git-man: manual pages that were previously in the main git package.
   * debian/rules: do not build documentation on autobuilders (closes:
     #499002).
   * debian/control: Build-Depends-Indep: asciidoc, xmlto, docbook-xsl.
   * debian/rules: git-gui: install git-gui--askpass helper to
     /usr/lib/git-core (closes: #598245).
   * debian/rules: git-doc: install symlink to html documentation in
     /usr/share/doc/git (thx Ian Jackson).
   * debian/watch: new; point to upstream sources.
   * debian/implicit: create DEBIAN/md5sums with correct permissions.
   * debian/diff/0003-remove-shebang...diff: new; do not start shell
     libraries with #!/bin/sh.
   * debian/rules: do not try to strip scripts even if they begin
     with "# " in place of "#!".
   * debian/diff/0004-pre-rebase-hook-capture...diff: new;
     hooks/pre-rebase: use a <<HERE document to prevent syntax checkers
     from treating documentation as code.
   * debian/implicit: check for debian/$pkg.doc-base.$docid.
   * debian/git-doc.doc-base.*: new; catalog provided documentation.
   * debian/implicit: check for debian/$pkg.lintian-overrides.
   * debian/git.lintian-overrides: new; document some deviations from
     lintian guidelines.
   * debian/control: Standards-Version: 3.9.1.0.
 .
   * debian/git.README.Debian: server logs go in /var/log/apache2.
   * debian/diff/0002-Revert-Merge-branch-jn-gitweb...diff: remove.
   * debian/diff/0006, 0008, 0009-instaweb...diff: remove, no longer
     needed.
   * debian/rules, debian/control: move gitweb script to the main git
     package for use by instaweb; make gitweb into a configuration
     package.
   * debian/gitweb.NEWS.Debian, debian/git.README.Debian,
     debian/gitweb.conf: static files moved to /usr/share/gitweb/static.
   * debian/gitweb.conf: disable rename patches (@diff_opts = ()).
   * debian/diff/0001-Revert-gitweb-...diff: remove; no longer needed.
   * debian/rules: gitweb: move gitweb.cgi script to /usr/share;
     add a symlink at /usr/lib/cgi-bin/gitweb.cgi for compatibility.
 .
   * debian/git.emacsen-install, debian/rules, debian/git.postinst,
     debian/git.prerm: put emacs support files in /usr/share/git-core
     instead of /usr/share/doc/git/contrib.
   * debian/implicit: check for arbitrary debian/$pkg.README.*, not just
     README.source and README.Debian.
   * debian/git.README.emacs: new; introduction to the emacs support
     (text taken from contrib/emacs/README).
 .
   [ Kevin Ryde ]
   * debian/rules, debian/git.emacsen-*, debian/git.postinst,
     debian/git.prerm: Make M-x git-status and git-blame modes available
     with emacs23 (closes: #576887).
Checksums-Sha1: 
 454abccda82b0e5ae7d82c60df95f5fe30d51e69 1436 git_1.7.4.1-1.dsc
 2c9c9ac6dd6ae284df2282bb0c4145c0ae0e7e35 3266745 git_1.7.4.1.orig.tar.gz
 a2cdc8ed70b6c7b7c81050db851eed4ae7c46d98 402484 git_1.7.4.1-1.diff.gz
 96abd1b428884ff1658e25460c78990f249dd566 1639718 git-doc_1.7.4.1-1_all.deb
 6c4e9a61f6e7e50e626ad6666863eb14aa3115f3 386026 git-arch_1.7.4.1-1_all.deb
 452028cba6abaa84d5f3cdf94402d5a6b47455d8 457992 git-cvs_1.7.4.1-1_all.deb
 1aa1567131b1f52c30b43b9e9954afb1dd56a9d7 437754 git-svn_1.7.4.1-1_all.deb
 c1810309d276d79e3899ac85c9ff8dc022ee89b0 373080 git-daemon-run_1.7.4.1-1_all.deb
 e0500154020a1339bbab0d7db6af8d356676540b 390972 git-email_1.7.4.1-1_all.deb
 49b76d65cc7c06a16a9c80931b2eccd7d4f7a241 633922 git-gui_1.7.4.1-1_all.deb
 c5da6c0326defee5a2772b32f9c2b529757ea555 498734 gitk_1.7.4.1-1_all.deb
 4aa64839c62ac780e1e0c3720ac678e7733f3286 383134 gitweb_1.7.4.1-1_all.deb
 397d1bb3abf61e4f43951f5b8ad4574e31ddc16e 371460 git-all_1.7.4.1-1_all.deb
 ffd6bd7b39b91dd66c5d2b98239492a826cbee9e 1336 git-core_1.7.4.1-1_all.deb
 5c133d9d1654d094463e0fddba797de60b1d2e0e 938934 git-man_1.7.4.1-1_all.deb
Checksums-Sha256: 
 ac242c36ec673683dc6a165ea15ab4659924c90a97ccaa0d53000966a691a2b0 1436 git_1.7.4.1-1.dsc
 1855df9f23f8296c24482416cf10bbbaef40f837d30ff02ecf31f2694c325277 3266745 git_1.7.4.1.orig.tar.gz
 bfd435ff77f364ac4e6054b8506e2b110703aa53675091b72557dcf943e962b2 402484 git_1.7.4.1-1.diff.gz
 46cd7b1ed2338f34ea44ad0b336941d5713be0277300681f3140fecc853483c6 1639718 git-doc_1.7.4.1-1_all.deb
 65318f6f273c516cbb885dcd8674c66be1487209d283ea73816988acf4ac5c9c 386026 git-arch_1.7.4.1-1_all.deb
 296f41e0b8deeec79f53ce8a11524b6714a6711bcbe08c02c01843e666d5faed 457992 git-cvs_1.7.4.1-1_all.deb
 0633ba3b3a9e390ce0b7f2a443f3f717772ae2e62fe0f9497078f080a8dc02f2 437754 git-svn_1.7.4.1-1_all.deb
 85a7a8a4e9cfe1ec18dfceb5207b39794a62e35fe91af7d7bb4dd848eaa98f52 373080 git-daemon-run_1.7.4.1-1_all.deb
 f470ce38eba3671ba46103289e2a15274610cb8d6698357ee402637f8bde25f8 390972 git-email_1.7.4.1-1_all.deb
 662393f15a90faf0749982afcddd9bc393b38acca1fe8fe1f57b6fab11fa8bd4 633922 git-gui_1.7.4.1-1_all.deb
 9d40ff6646ae2f1898a9bdef0e3fdebecea3ae2ed8925ac9a458f3e5e3649843 498734 gitk_1.7.4.1-1_all.deb
 dec1a6dd4db7e572bb7c54b5774b3d3b67ddbdbc2472dbd609e82e72bbc88013 383134 gitweb_1.7.4.1-1_all.deb
 65609c1132f1a11330c50ecfc4b3ab7dc9a0c87ad96991bdfd9f7c4852f41c98 371460 git-all_1.7.4.1-1_all.deb
 ac6b3f5d86005b49957b6a6f3ffe4c403bdc41f47ccf811f6f9b735bff17bf99 1336 git-core_1.7.4.1-1_all.deb
 2a4ec7d8c40ef8cfc1c107de1df99ababddfa77634e98ca1b2ef8bd54ed961b3 938934 git-man_1.7.4.1-1_all.deb
Files: 
 19aec48a88c642f378a9933a504fcab5 1436 vcs optional git_1.7.4.1-1.dsc
 1276aa1366bd3c670e9c51f1bff12f36 3266745 vcs optional git_1.7.4.1.orig.tar.gz
 36e04488680d57b513ac3b840844b94a 402484 vcs optional git_1.7.4.1-1.diff.gz
 e7f79fd736d1c476383c52d1cd19496d 1639718 doc optional git-doc_1.7.4.1-1_all.deb
 760acf52d5a99ed3fd19178f23372f41 386026 vcs optional git-arch_1.7.4.1-1_all.deb
 0dd4d96de84ab8ee6e7fc275430ab49e 457992 vcs optional git-cvs_1.7.4.1-1_all.deb
 bbe84f5bb1724082834313cdff3a9cff 437754 vcs optional git-svn_1.7.4.1-1_all.deb
 499ea96dbd14deccac0a089c03921779 373080 vcs optional git-daemon-run_1.7.4.1-1_all.deb
 0cfb71b4f253fe88269d76b710ce2462 390972 vcs optional git-email_1.7.4.1-1_all.deb
 04535918668f71bea565ae7496590254 633922 vcs optional git-gui_1.7.4.1-1_all.deb
 a2156ce5c0a15aacdb9df7ae63999703 498734 vcs optional gitk_1.7.4.1-1_all.deb
 d3aaef1ded07729024375a9bf1f8e2a1 383134 vcs optional gitweb_1.7.4.1-1_all.deb
 e84c9ac9452c37e6011ffc48ca053711 371460 vcs optional git-all_1.7.4.1-1_all.deb
 5ccaeef1abbb1debf65c09766c2ff86c 1336 vcs optional git-core_1.7.4.1-1_all.deb
 28d0be6d985e3f9bf8071601a6c1c6bf 938934 vcs optional git-man_1.7.4.1-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk1bqScACgkQGJoyQbxwpv/CiACgidlYAgvKP9U626u4US+/jj1p
4qQAni2trKCqN6+c4N2F/gOvbJU5hgIb
=aIcU
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 20 Mar 2011 07:49:12 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jul 2 03:51:59 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.