From: Paul Smith Date: Thu, 09 Aug 2018 02:45:49 GMT Subject: Re: Help with "fatal: unable to read ...." error during GC? Message-ID: <249be5d3dada9a4b1b5282896a9a11e12c1ffd2a.camel@mad-scientist.net> In-Reply-To: <20180808182436.GA19096@sigill.intra.peff.net> On Wed, 2018-08-08 at 14:24 -0400, Jeff King wrote: > If so, can you try running it under gdb and getting a stack trace? > Something like: > > gdb git > [and then inside gdb...] > set args pack-objects --all --reflog --indexed-objects foo break die > run > bt > > That might give us a clue where the broken object reference is coming Here we go. I can rebuild with -Og or -O0 if more detailed debugging is needed; most everything appears to be optimized out: ... Compressing objects: 100% (107777/107777), done. Writing objects: 54% (274416/508176) Thread 1 "git" hit Breakpoint 1, die (err=err@entry=0x5a373a "unable to read %s") at usage.c:119 119 { (gdb) bt #0 die (err=err@entry=0x5a373a "unable to read %s") at usage.c:119 #1 0x00000000004563f3 in get_delta (entry=) at builtin/pack-objects.c:143 #2 write_no_reuse_object () at builtin/pack-objects.c:308 #3 0x0000000000456592 in write_reuse_object (usable_delta=, limit=, entry=, f=) at builtin/pack-objects.c:516 #4 write_object (write_offset=, entry=0x7fffc9a8d940, f=0x198fb70) at builtin/pack-objects.c:518 #5 write_one () at builtin/pack-objects.c:576 #6 0x00000000004592f0 in write_pack_file () at builtin/pack-objects.c:849 #7 cmd_pack_objects (argc=, argv=, prefix=) at builtin/pack-objects.c:3354 #8 0x0000000000404f06 in run_builtin (argv=, argc=, p=) at git.c:417 #9 handle_builtin (argc=, argv=) at git.c:632 #10 0x0000000000405f21 in run_argv (argv=0x7fffffffe210, argcp=0x7fffffffe21c) at git.c:761 #11 cmd_main (argc=, argc@entry=6, argv=, argv@entry=0x7fffffffe448) at git.c:761 #12 0x0000000000404b15 in main (argc=6, argv=0x7fffffffe448) at common-main.c:45