Re: regression in multi-threaded git-pack-index

2013-03-19 Thread Thomas Rast
Jeff King p...@peff.net writes: On Fri, Mar 15, 2013 at 03:42:40PM -0700, Stefan Zager wrote: We have uncovered a regression in this commit: b8a2486f1524947f232f657e9f2ebf44e3e7a243 The symptom is that 'git fetch' dies with: error: index-pack died of signal 10 fatal: index-pack

Re: regression in multi-threaded git-pack-index

2013-03-19 Thread Jeff King
On Tue, Mar 19, 2013 at 09:17:32AM +0100, Thomas Rast wrote: but the line in question is: if (deepest_delta delta_obj-delta_depth) And in the debugger, both of those variables appear to have sane values (nor should either impacted by the patch you bisected to). On top of that,

Re: regression in multi-threaded git-pack-index

2013-03-19 Thread Jeff King
On Tue, Mar 19, 2013 at 05:30:34AM -0400, Jeff King wrote: On Tue, Mar 19, 2013 at 09:17:32AM +0100, Thomas Rast wrote: but the line in question is: if (deepest_delta delta_obj-delta_depth) And in the debugger, both of those variables appear to have sane values (nor should

Re: regression in multi-threaded git-pack-index

2013-03-19 Thread Jeff King
On Tue, Mar 19, 2013 at 05:59:43AM -0400, Jeff King wrote: Yes, that has been my experience with valgrind false positives, too. But if this is a real problem, it may be different from the OP's issue. It seems to trigger for me in v1.7.10, before Duy's threading patches. It does not seem

Re: regression in multi-threaded git-pack-index

2013-03-19 Thread Jeff King
On Tue, Mar 19, 2013 at 06:08:00AM -0400, Jeff King wrote: @@ -538,6 +539,8 @@ static void resolve_delta(struct object_entry *delta_obj, delta_obj-real_type = base-obj-real_type; delta_obj-delta_depth = base-obj-delta_depth + 1; + if (deepest_delta delta_obj-delta_depth)

Re: regression in multi-threaded git-pack-index

2013-03-19 Thread Thomas Rast
Jeff King p...@peff.net writes: On Tue, Mar 19, 2013 at 06:08:00AM -0400, Jeff King wrote: @@ -538,6 +539,8 @@ static void resolve_delta(struct object_entry *delta_obj, delta_obj-real_type = base-obj-real_type; delta_obj-delta_depth = base-obj-delta_depth + 1; +if

Re: regression in multi-threaded git-pack-index

2013-03-19 Thread Jeff King
On Tue, Mar 19, 2013 at 11:29:36AM +0100, Thomas Rast wrote: Ah, indeed. Putting: fprintf(stderr, %lu\n, base-obj-delta_depth); before the conditional reveals that base-obj-delta_depth is uninitialized, which is the real problem. I'm sure there is some perfectly logical

Re: regression in multi-threaded git-pack-index

2013-03-19 Thread Thomas Rast
Jeff King p...@peff.net writes: On Tue, Mar 19, 2013 at 11:29:36AM +0100, Thomas Rast wrote: Ah, indeed. Putting: fprintf(stderr, %lu\n, base-obj-delta_depth); before the conditional reveals that base-obj-delta_depth is uninitialized, which is the real problem. I'm sure there is

Re: regression in multi-threaded git-pack-index

2013-03-19 Thread Jeff King
On Tue, Mar 19, 2013 at 11:45:56AM +0100, Thomas Rast wrote: Now consider // somewhere on the stack struct foo { char c; int i; } a, b; a.c = a.i = 0; memcpy(b, a, sizeof(struct foo)); The compiler could legitimately leave the padding between c and i

Re: regression in multi-threaded git-pack-index

2013-03-19 Thread Duy Nguyen
On Tue, Mar 19, 2013 at 3:17 PM, Thomas Rast tr...@student.ethz.ch wrote: but the line in question is: if (deepest_delta delta_obj-delta_depth) ... Duy, what was the reasoning why resolve_delta() does not need to hold locks when it looks when it looks at deepest_delta? My coffee levels

Re: regression in multi-threaded git-pack-index

2013-03-19 Thread Thomas Rast
sza...@google.com (Stefan Zager) writes: We have uncovered a regression in this commit: b8a2486f1524947f232f657e9f2ebf44e3e7a243 The symptom is that 'git fetch' dies with: error: index-pack died of signal 10 fatal: index-pack failed So after that fun detour into threading issues, I have

Re: regression in multi-threaded git-pack-index

2013-03-19 Thread Thomas Rast
Thomas Rast tr...@student.ethz.ch writes: (gdb) r index-pack --keep --stdin -v --pack_header=2,50757 borked Starting program: /Users/trast/.local/bin/git index-pack --keep --stdin -v --pack_header=2,50757 borked Reading symbols for shared libraries +++ done

Re: regression in multi-threaded git-pack-index

2013-03-19 Thread Thomas Rast
Thomas Rast tr...@student.ethz.ch writes: Thomas Rast tr...@student.ethz.ch writes: (gdb) r index-pack --keep --stdin -v --pack_header=2,50757 borked Starting program: /Users/trast/.local/bin/git index-pack --keep --stdin -v --pack_header=2,50757 borked Reading symbols for shared

Re: regression in multi-threaded git-pack-index

2013-03-19 Thread Junio C Hamano
Thomas Rast tr...@student.ethz.ch writes: Actually scratch that again. It *is* a stack overflow, except that this is a thread stack, for which the OS X defaults are 512kB apparently, as opposed to 2MB on linux. ... And indeed the following patch fixes it. Sounds like the delta unpacking

Re: regression in multi-threaded git-pack-index

2013-03-19 Thread Duy Nguyen
On Tue, Mar 19, 2013 at 11:11 PM, Thomas Rast tr...@student.ethz.ch wrote: Actually scratch that again. It *is* a stack overflow, except that this is a thread stack, for which the OS X defaults are 512kB apparently, as opposed to 2MB on linux. Thanks. I was scratching my head last night

Re: regression in multi-threaded git-pack-index

2013-03-16 Thread Jeff King
On Fri, Mar 15, 2013 at 03:42:40PM -0700, Stefan Zager wrote: We have uncovered a regression in this commit: b8a2486f1524947f232f657e9f2ebf44e3e7a243 The symptom is that 'git fetch' dies with: error: index-pack died of signal 10 fatal: index-pack failed I have only been able to

Re: regression in multi-threaded git-pack-index

2013-03-16 Thread Duy Nguyen
On Sat, Mar 16, 2013 at 6:41 PM, Jeff King p...@peff.net wrote: On Fri, Mar 15, 2013 at 03:42:40PM -0700, Stefan Zager wrote: We have uncovered a regression in this commit: b8a2486f1524947f232f657e9f2ebf44e3e7a243 What version did you test? We used to have problems with multithreaded

regression in multi-threaded git-pack-index

2013-03-15 Thread Stefan Zager
We have uncovered a regression in this commit: b8a2486f1524947f232f657e9f2ebf44e3e7a243 The symptom is that 'git fetch' dies with: error: index-pack died of signal 10 fatal: index-pack failed I have only been able to reproduce it on a Mac thus far; will try ubuntu next. We can make it go