* git-merge-recursive segmentation error
@ 2006-12-20 1:00 Luben Tuikov
2006-12-20 1:10 ` Linus Torvalds
2006-12-20 1:18 ` Johannes Schindelin
0 siblings, 2 replies; 14+ messages in thread
From: Luben Tuikov @ 2006-12-20 1:00 UTC (permalink / raw)
To: git
So, I'm merging Linux master into my own dev tree and
here is what I get in syslog:
Dec 19 16:56:38 lion kernel: [ 1704.395478] git-merge-recur[12030] general protection rip:4285ef
rsp:7ffff727bf40 error:0
and on the command line:
...
Auto-merging init/Kconfig
Auto-merging init/version.c
/home/luben/bin/git-merge: line 394: 12030 Segmentation fault git-merge-$strategy $common --
"$head_arg" "$@"
Merge with strategy recursive failed.
I'm running "next".
Are the people aware of this issue?
It is 100% reproducible on my trees.
Anyone has a patch?
Luben
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: git-merge-recursive segmentation error
2006-12-20 1:00 git-merge-recursive segmentation error Luben Tuikov
@ 2006-12-20 1:10 ` Linus Torvalds
2006-12-20 2:15 ` Luben Tuikov
2006-12-20 1:18 ` Johannes Schindelin
1 sibling, 1 reply; 14+ messages in thread
From: Linus Torvalds @ 2006-12-20 1:10 UTC (permalink / raw)
To: Luben Tuikov; +Cc: git
On Tue, 19 Dec 2006, Luben Tuikov wrote:
>
> /home/luben/bin/git-merge: line 394: 12030 Segmentation fault git-merge-$strategy $common -- "$head_arg" "$@"
> Merge with strategy recursive failed.
Can you run that by hand under gdb and get a backtrace?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: git-merge-recursive segmentation error
2006-12-20 1:00 git-merge-recursive segmentation error Luben Tuikov
2006-12-20 1:10 ` Linus Torvalds
@ 2006-12-20 1:18 ` Johannes Schindelin
2006-12-20 2:18 ` Luben Tuikov
1 sibling, 1 reply; 14+ messages in thread
From: Johannes Schindelin @ 2006-12-20 1:18 UTC (permalink / raw)
To: Luben Tuikov; +Cc: git
Hi,
On Tue, 19 Dec 2006, Luben Tuikov wrote:
> Auto-merging init/version.c
> /home/luben/bin/git-merge: line 394: 12030
> Segmentation fault git-merge-$strategy $common -- "$head_arg" "$@"
Do you have any pointers how to get the two branches you try to merge? I'd
be most grateful to have the sha1's of both heads, too...
Ciao,
Dscho
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: git-merge-recursive segmentation error
2006-12-20 1:10 ` Linus Torvalds
@ 2006-12-20 2:15 ` Luben Tuikov
2006-12-20 2:25 ` Junio C Hamano
2006-12-20 2:32 ` Shawn Pearce
0 siblings, 2 replies; 14+ messages in thread
From: Luben Tuikov @ 2006-12-20 2:15 UTC (permalink / raw)
To: Linus Torvalds; +Cc: git
--- Linus Torvalds <torvalds@osdl.org> wrote:
> Can you run that by hand under gdb and get a backtrace?
Linus,
Auto-merging init/Kconfig
Auto-merging init/version.c
Program received signal SIGSEGV, Segmentation fault.
xdl_merge (orig=Variable "orig" is not available.
) at xdiff/xmerge.c:200
200 t2.ptr = (char *)xe2->xdf2.recs[m->i2]->ptr;
(gdb) bt
#0 xdl_merge (orig=Variable "orig" is not available.
) at xdiff/xmerge.c:200
#1 0x000000000040322c in merge_file (o=0x7fffd4f762f0, a=0x7fffd4f76270, b=0x7fffd4f762b0,
branch1=0x7fffd4f77976 "HEAD",
branch2=0x7fffd4f7797b "cc016448b0bf0764928275d034e367753bde8162") at merge-recursive.c:667
#2 0x0000000000404e87 in merge_trees (head=0x12e4a00, merge=0x555328, common=0x555350,
branch1=Variable "branch1" is not available.
) at merge-recursive.c:1074
#3 0x0000000000405376 in merge (h1=0x5452f0, h2=0x545370, branch1=0x7fffd4f77976 "HEAD",
branch2=0x7fffd4f7797b "cc016448b0bf0764928275d034e367753bde8162", call_depth=0,
ancestor=0x5453f0, result=0x7fffd4f764e0) at merge-recursive.c:1245
#4 0x00000000004056a5 in main (argc=Variable "argc" is not available.
) at merge-recursive.c:1312
I also ran git-bisect twice over two well known but overlapping
good-bad regions and I get the same commit as being the culprit.
It seems to be commit 1510fea781cb0517eeba8c378964f7bc4f9577ab.
Luben
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: git-merge-recursive segmentation error
2006-12-20 1:18 ` Johannes Schindelin
@ 2006-12-20 2:18 ` Luben Tuikov
2006-12-20 2:31 ` Johannes Schindelin
0 siblings, 1 reply; 14+ messages in thread
From: Luben Tuikov @ 2006-12-20 2:18 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git
--- Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> On Tue, 19 Dec 2006, Luben Tuikov wrote:
>
> > Auto-merging init/version.c
> > /home/luben/bin/git-merge: line 394: 12030
> > Segmentation fault git-merge-$strategy $common -- "$head_arg" "$@"
>
> Do you have any pointers how to get the two branches you try to merge? I'd
> be most grateful to have the sha1's of both heads, too...
The source tree is Linus' "master" tree. The destination tree
is my own "dev" tree, which I use as an intermediate tree, before
merging into my own kernel trees.
Hopefully with the backtrace I posted and with the big-bisect
results pointing to the culprit commit, someone can get a patch out
to fix this.
Luben
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: git-merge-recursive segmentation error
2006-12-20 2:15 ` Luben Tuikov
@ 2006-12-20 2:25 ` Junio C Hamano
2006-12-20 2:30 ` Junio C Hamano
2006-12-20 2:32 ` Shawn Pearce
1 sibling, 1 reply; 14+ messages in thread
From: Junio C Hamano @ 2006-12-20 2:25 UTC (permalink / raw)
To: ltuikov; +Cc: git, Linus Torvalds
Luben Tuikov <ltuikov@yahoo.com> writes:
> I also ran git-bisect twice over two well known but overlapping
> good-bad regions and I get the same commit as being the culprit.
> It seems to be commit 1510fea781cb0517eeba8c378964f7bc4f9577ab.
>
> Luben
Ooooooops.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: git-merge-recursive segmentation error
2006-12-20 2:25 ` Junio C Hamano
@ 2006-12-20 2:30 ` Junio C Hamano
2006-12-20 2:33 ` Johannes Schindelin
2006-12-20 2:38 ` Luben Tuikov
0 siblings, 2 replies; 14+ messages in thread
From: Junio C Hamano @ 2006-12-20 2:30 UTC (permalink / raw)
To: ltuikov; +Cc: git, Linus Torvalds
Junio C Hamano <junkio@cox.net> writes:
> Luben Tuikov <ltuikov@yahoo.com> writes:
>
>> I also ran git-bisect twice over two well known but overlapping
>> good-bad regions and I get the same commit as being the culprit.
>> It seems to be commit 1510fea781cb0517eeba8c378964f7bc4f9577ab.
>>
>> Luben
>
> Ooooooops.
1510fe is buggy and it is my fault.
For now, this _should_ get you keep going.
However, if this fixes it for you, that means we would still
have the problem on Cygwin X-<.
-- >8 --
[PATCH] fix populate-filespec
I hand munged the original patch when committing 1510fea78.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
diff.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/diff.c b/diff.c
index 9974435..6e6f2a7 100644
--- a/diff.c
+++ b/diff.c
@@ -1223,7 +1223,7 @@ static int reuse_worktree_file(const char *name, const unsigned char *sha1, int
* objects however would tend to be slower as they need
* to be individually opened and inflated.
*/
- if (FAST_WORKING_DIRECTORY && !want_file && has_sha1_pack(sha1, NULL))
+ if (!FAST_WORKING_DIRECTORY && !want_file && has_sha1_pack(sha1, NULL))
return 0;
len = strlen(name);
--
1.4.4.2.g205bf
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: git-merge-recursive segmentation error
2006-12-20 2:18 ` Luben Tuikov
@ 2006-12-20 2:31 ` Johannes Schindelin
0 siblings, 0 replies; 14+ messages in thread
From: Johannes Schindelin @ 2006-12-20 2:31 UTC (permalink / raw)
To: Luben Tuikov; +Cc: git
Hi,
On Tue, 19 Dec 2006, Luben Tuikov wrote:
> --- Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > Hi,
> >
> > On Tue, 19 Dec 2006, Luben Tuikov wrote:
> >
> > > Auto-merging init/version.c
> > > /home/luben/bin/git-merge: line 394: 12030
> > > Segmentation fault git-merge-$strategy $common -- "$head_arg" "$@"
> >
> > Do you have any pointers how to get the two branches you try to merge? I'd
> > be most grateful to have the sha1's of both heads, too...
>
> The source tree is Linus' "master" tree. The destination tree
> is my own "dev" tree, which I use as an intermediate tree, before
> merging into my own kernel trees.
>
> Hopefully with the backtrace I posted and with the big-bisect
> results pointing to the culprit commit, someone can get a patch out
> to fix this.
Given that you have an optimized git (it even optimized orig out!), and
that the commit you bisected says "Avoid accessing a slow working copy
during diffcore operations." which has nothing to do at all with
merge-recursive, I give up. I don't have enough information. Really.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: git-merge-recursive segmentation error
2006-12-20 2:15 ` Luben Tuikov
2006-12-20 2:25 ` Junio C Hamano
@ 2006-12-20 2:32 ` Shawn Pearce
2006-12-20 2:39 ` Luben Tuikov
1 sibling, 1 reply; 14+ messages in thread
From: Shawn Pearce @ 2006-12-20 2:32 UTC (permalink / raw)
To: Luben Tuikov; +Cc: Linus Torvalds, git
Luben Tuikov <ltuikov@yahoo.com> wrote:
> --- Linus Torvalds <torvalds@osdl.org> wrote:
> > Can you run that by hand under gdb and get a backtrace?
>
> Linus,
>
> Auto-merging init/Kconfig
> Auto-merging init/version.c
>
> Program received signal SIGSEGV, Segmentation fault.
> xdl_merge (orig=Variable "orig" is not available.
> ) at xdiff/xmerge.c:200
> 200 t2.ptr = (char *)xe2->xdf2.recs[m->i2]->ptr;
> (gdb) bt
> #0 xdl_merge (orig=Variable "orig" is not available.
> ) at xdiff/xmerge.c:200
> #1 0x000000000040322c in merge_file (o=0x7fffd4f762f0, a=0x7fffd4f76270, b=0x7fffd4f762b0,
> branch1=0x7fffd4f77976 "HEAD",
> branch2=0x7fffd4f7797b "cc016448b0bf0764928275d034e367753bde8162") at merge-recursive.c:667
> #2 0x0000000000404e87 in merge_trees (head=0x12e4a00, merge=0x555328, common=0x555350,
> branch1=Variable "branch1" is not available.
> ) at merge-recursive.c:1074
> #3 0x0000000000405376 in merge (h1=0x5452f0, h2=0x545370, branch1=0x7fffd4f77976 "HEAD",
> branch2=0x7fffd4f7797b "cc016448b0bf0764928275d034e367753bde8162", call_depth=0,
> ancestor=0x5453f0, result=0x7fffd4f764e0) at merge-recursive.c:1245
> #4 0x00000000004056a5 in main (argc=Variable "argc" is not available.
> ) at merge-recursive.c:1312
>
> I also ran git-bisect twice over two well known but overlapping
> good-bad regions and I get the same commit as being the culprit.
> It seems to be commit 1510fea781cb0517eeba8c378964f7bc4f9577ab.
Oww, the finger points at me! :-)
Hmm. 1510fe does not look right to me. That return 0 should only
be activating when FAST_WORKING_DIRECTORY == 0, so you really want
this patch below. Normally NO_FAST_WORKING_DIRECTORY is _not_
defined, which means FAST_WORKING_DIRECTORY == 1, and in that case
the if should always be false and the compiler should be stripping
the code out entirely.
What's odd is that the xdl_merge routine is crashing out because
this code activated. It really should not have, so more work is
still required...
diff --git a/diff.c b/diff.c
index 77ba641..1c1de11 100644
--- a/diff.c
+++ b/diff.c
@@ -1194,7 +1194,7 @@ static int reuse_worktree_file(const char *name, const unsigned char *sha1, int
* objects however would tend to be slower as they need
* to be individually opened and inflated.
*/
- if (FAST_WORKING_DIRECTORY && !want_file && has_sha1_pack(sha1, NULL))
+ if (!FAST_WORKING_DIRECTORY && !want_file && has_sha1_pack(sha1, NULL))
return 0;
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: git-merge-recursive segmentation error
2006-12-20 2:30 ` Junio C Hamano
@ 2006-12-20 2:33 ` Johannes Schindelin
2006-12-20 2:38 ` Luben Tuikov
1 sibling, 0 replies; 14+ messages in thread
From: Johannes Schindelin @ 2006-12-20 2:33 UTC (permalink / raw)
To: Junio C Hamano; +Cc: ltuikov, git, Linus Torvalds
Hi,
On Tue, 19 Dec 2006, Junio C Hamano wrote:
> Junio C Hamano <junkio@cox.net> writes:
>
> > Luben Tuikov <ltuikov@yahoo.com> writes:
> >
> >> I also ran git-bisect twice over two well known but overlapping
> >> good-bad regions and I get the same commit as being the culprit.
> >> It seems to be commit 1510fea781cb0517eeba8c378964f7bc4f9577ab.
> >>
> >> Luben
> >
> > Ooooooops.
>
> 1510fe is buggy and it is my fault.
You hand munging should not have led to any segmentation fault. It would
be sooo nice to have the test case.
Ciao,
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: git-merge-recursive segmentation error
2006-12-20 2:30 ` Junio C Hamano
2006-12-20 2:33 ` Johannes Schindelin
@ 2006-12-20 2:38 ` Luben Tuikov
2006-12-20 2:43 ` Shawn Pearce
1 sibling, 1 reply; 14+ messages in thread
From: Luben Tuikov @ 2006-12-20 2:38 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Linus Torvalds
--- Junio C Hamano <junkio@cox.net> wrote:
> Junio C Hamano <junkio@cox.net> writes:
>
> > Luben Tuikov <ltuikov@yahoo.com> writes:
> >
> >> I also ran git-bisect twice over two well known but overlapping
> >> good-bad regions and I get the same commit as being the culprit.
> >> It seems to be commit 1510fea781cb0517eeba8c378964f7bc4f9577ab.
> >>
> >> Luben
> >
> > Ooooooops.
>
> 1510fe is buggy and it is my fault.
>
> For now, this _should_ get you keep going.
>
> However, if this fixes it for you, that means we would still
> have the problem on Cygwin X-<.
Yep -- that fixed it.
Thanks,
Luben
>
> -- >8 --
> [PATCH] fix populate-filespec
>
> I hand munged the original patch when committing 1510fea78.
>
> Signed-off-by: Junio C Hamano <junkio@cox.net>
> ---
> diff.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/diff.c b/diff.c
> index 9974435..6e6f2a7 100644
> --- a/diff.c
> +++ b/diff.c
> @@ -1223,7 +1223,7 @@ static int reuse_worktree_file(const char *name, const unsigned char
> *sha1, int
> * objects however would tend to be slower as they need
> * to be individually opened and inflated.
> */
> - if (FAST_WORKING_DIRECTORY && !want_file && has_sha1_pack(sha1, NULL))
> + if (!FAST_WORKING_DIRECTORY && !want_file && has_sha1_pack(sha1, NULL))
> return 0;
>
> len = strlen(name);
> --
> 1.4.4.2.g205bf
>
>
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: git-merge-recursive segmentation error
2006-12-20 2:32 ` Shawn Pearce
@ 2006-12-20 2:39 ` Luben Tuikov
0 siblings, 0 replies; 14+ messages in thread
From: Luben Tuikov @ 2006-12-20 2:39 UTC (permalink / raw)
To: Shawn Pearce; +Cc: Linus Torvalds, git
--- Shawn Pearce <spearce@spearce.org> wrote:
> Luben Tuikov <ltuikov@yahoo.com> wrote:
> > --- Linus Torvalds <torvalds@osdl.org> wrote:
> > > Can you run that by hand under gdb and get a backtrace?
> >
> > Linus,
> >
> > Auto-merging init/Kconfig
> > Auto-merging init/version.c
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > xdl_merge (orig=Variable "orig" is not available.
> > ) at xdiff/xmerge.c:200
> > 200 t2.ptr = (char *)xe2->xdf2.recs[m->i2]->ptr;
> > (gdb) bt
> > #0 xdl_merge (orig=Variable "orig" is not available.
> > ) at xdiff/xmerge.c:200
> > #1 0x000000000040322c in merge_file (o=0x7fffd4f762f0, a=0x7fffd4f76270, b=0x7fffd4f762b0,
> > branch1=0x7fffd4f77976 "HEAD",
> > branch2=0x7fffd4f7797b "cc016448b0bf0764928275d034e367753bde8162") at
> merge-recursive.c:667
> > #2 0x0000000000404e87 in merge_trees (head=0x12e4a00, merge=0x555328, common=0x555350,
> > branch1=Variable "branch1" is not available.
> > ) at merge-recursive.c:1074
> > #3 0x0000000000405376 in merge (h1=0x5452f0, h2=0x545370, branch1=0x7fffd4f77976 "HEAD",
> > branch2=0x7fffd4f7797b "cc016448b0bf0764928275d034e367753bde8162", call_depth=0,
> > ancestor=0x5453f0, result=0x7fffd4f764e0) at merge-recursive.c:1245
> > #4 0x00000000004056a5 in main (argc=Variable "argc" is not available.
> > ) at merge-recursive.c:1312
> >
> > I also ran git-bisect twice over two well known but overlapping
> > good-bad regions and I get the same commit as being the culprit.
> > It seems to be commit 1510fea781cb0517eeba8c378964f7bc4f9577ab.
>
> Oww, the finger points at me! :-)
>
> Hmm. 1510fe does not look right to me. That return 0 should only
> be activating when FAST_WORKING_DIRECTORY == 0, so you really want
> this patch below. Normally NO_FAST_WORKING_DIRECTORY is _not_
> defined, which means FAST_WORKING_DIRECTORY == 1, and in that case
> the if should always be false and the compiler should be stripping
> the code out entirely.
>
> What's odd is that the xdl_merge routine is crashing out because
> this code activated. It really should not have, so more work is
> still required...
Thanks. It is good to see that the solution patches are identical.
That fixes the problem.
Luben
>
> diff --git a/diff.c b/diff.c
> index 77ba641..1c1de11 100644
> --- a/diff.c
> +++ b/diff.c
> @@ -1194,7 +1194,7 @@ static int reuse_worktree_file(const char *name, const unsigned char
> *sha1, int
> * objects however would tend to be slower as they need
> * to be individually opened and inflated.
> */
> - if (FAST_WORKING_DIRECTORY && !want_file && has_sha1_pack(sha1, NULL))
> + if (!FAST_WORKING_DIRECTORY && !want_file && has_sha1_pack(sha1, NULL))
> return 0;
>
> len = strlen(name);
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: git-merge-recursive segmentation error
2006-12-20 2:38 ` Luben Tuikov
@ 2006-12-20 2:43 ` Shawn Pearce
2006-12-20 3:45 ` Junio C Hamano
0 siblings, 1 reply; 14+ messages in thread
From: Shawn Pearce @ 2006-12-20 2:43 UTC (permalink / raw)
To: Luben Tuikov; +Cc: Junio C Hamano, git, Linus Torvalds, Johannes Schindelin
Luben Tuikov <ltuikov@yahoo.com> wrote:
> > Junio C Hamano <junkio@cox.net> writes:
> > 1510fe is buggy and it is my fault.
> >
> > For now, this _should_ get you keep going.
> >
> > However, if this fixes it for you, that means we would still
> > have the problem on Cygwin X-<.
>
> Yep -- that fixed it.
It might be a problem on Cygwin. :-)
I completely fail to see how this patch would cause a segfault
downstream in xdl_merge. All this controls is do we mmap data from
the working directory or decompress it from the ODB. Either way we
should have loaded the file size or content into the diff_filespec.
My other related change (7da41f48c) in this area has a better chance
of causing a problem as it may be bypassing loading the file content
into the diff_filespec where before we were always loading it.
However none of my testing ever showed that would cause a problem.
--
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: git-merge-recursive segmentation error
2006-12-20 2:43 ` Shawn Pearce
@ 2006-12-20 3:45 ` Junio C Hamano
0 siblings, 0 replies; 14+ messages in thread
From: Junio C Hamano @ 2006-12-20 3:45 UTC (permalink / raw)
To: Shawn Pearce; +Cc: git, Luben Tuikov
Shawn Pearce <spearce@spearce.org> writes:
> I completely fail to see how this patch would cause a segfault
> downstream in xdl_merge. All this controls is do we mmap data from
> the working directory or decompress it from the ODB. Either way we
> should have loaded the file size or content into the diff_filespec.
Me neither. Quite puzzled...
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2006-12-20 3:45 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-20 1:00 git-merge-recursive segmentation error Luben Tuikov
2006-12-20 1:10 ` Linus Torvalds
2006-12-20 2:15 ` Luben Tuikov
2006-12-20 2:25 ` Junio C Hamano
2006-12-20 2:30 ` Junio C Hamano
2006-12-20 2:33 ` Johannes Schindelin
2006-12-20 2:38 ` Luben Tuikov
2006-12-20 2:43 ` Shawn Pearce
2006-12-20 3:45 ` Junio C Hamano
2006-12-20 2:32 ` Shawn Pearce
2006-12-20 2:39 ` Luben Tuikov
2006-12-20 1:18 ` Johannes Schindelin
2006-12-20 2:18 ` Luben Tuikov
2006-12-20 2:31 ` Johannes Schindelin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox