git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git dies with sigseg due to enless recursion on broken repo

From
JSJörg Sommer <joerg@alea.gnuu.de>
Date
May 26, 2011, 01:33 UTC
Message-ID
<20110526013316.GA22589@alea.gnuu.de>
Hi,

I've a broken repository which causes git goes into an endless recursion until it gets a segmentation fault. I can reproduce this problem with version 1.7.5.2.353.g5df3e.

% gdb -batch -ex "run --git-dir=$HOME/broken-git fsck" -ex bt\ full git
[Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault.
use_pack (p=Cannot access memory at address 0xbf7ffff8
) at sha1_file.c:837
837     {
#0  use_pack (p=Cannot access memory at address 0xbf7ffff8
) at sha1_file.c:837
        win = <error reading variable win (Cannot access memory at address 0xbf7fffd8)>
#1  0x10140290 in get_delta_base (p=0x10222470, w_curs=0xbf800140, curpos=0xbf800100, type=OBJ_REF_DELTA, delta_o
        base_info = 0x0
        base_offset = 0
#2  0x1014131c in unpack_delta_entry (p=0x10222470, w_curs=0xbf800140, curpos=13082, delta_size=7, obj_offset=130
        delta_data = 0xbf800120
        result = 0x10140720
        base = 0x48054319
        base_size = 1208304409
        base_offset = -4647713764261494296
#3  0x1014173c in unpack_entry (p=0x10222470, obj_offset=13081, type=0xbfffe1a8, sizep=0xbf8001e8) at sha1_file.c
        w_curs = 0x1021a570
        curpos = 13082
        data = 0x48021018
#4  0x10140e48 in cache_or_unpack_entry (p=0x10222470, base_offset=13081, base_size=0xbf8001e8, type=0xbfffe1a8, 
        ret = 0x0
        hash = 2
        ent = 0x10201388
#5  0x10141394 in unpack_delta_entry (p=0x10222470, w_curs=0xbf800240, curpos=13102, delta_size=7, obj_offset=130
        delta_data = 0xbf800220
        result = 0x10140720
        base = 0x48054319
        base_size = 7
        base_offset = 13081
#6  0x1014173c in unpack_entry (p=0x10222470, obj_offset=13081, type=0xbfffe1a8, sizep=0xbf8002e8) at sha1_file.c
        w_curs = 0x0
        curpos = 13082
        data = 0x48021018
#7  0x10140e48 in cache_or_unpack_entry (p=0x10222470, base_offset=13081, base_size=0xbf8002e8, type=0xbfffe1a8, 
        ret = 0x0
        hash = 2
        ent = 0x10201388
#8  0x10141394 in unpack_delta_entry (p=0x10222470, w_curs=0xbf800340, curpos=13102, delta_size=7, obj_offset=130
        delta_data = 0xbf800320
        result = 0x10140720
        base = 0x48054319
        base_size = 7
        base_offset = 13081
#9  0x1014173c in unpack_entry (p=0x10222470, obj_offset=13081, type=0xbfffe1a8, sizep=0xbf8003e8) at sha1_file.c
        w_curs = 0x0
        curpos = 13082
        data = 0x48021018
#10 0x10140e48 in cache_or_unpack_entry (p=0x10222470, base_offset=13081, base_size=0xbf8003e8, type=0xbfffe1a8, 
        ret = 0x0
        hash = 2
        ent = 0x10201388
#11 0x10141394 in unpack_delta_entry (p=0x10222470, w_curs=0xbf800440, curpos=13102, delta_size=7, obj_offset=130
        delta_data = 0xbf800420
        result = 0x10140720
        base = 0x48054319
        base_size = 7
        base_offset = 13081
#12 0x1014173c in unpack_entry (p=0x10222470, obj_offset=13081, type=0xbfffe1a8, sizep=0xbf8004e8) at sha1_file.c
        w_curs = 0x0
        curpos = 13082
        data = 0x48021018
#13 0x10140e48 in cache_or_unpack_entry (p=0x10222470, base_offset=13081, base_size=0xbf8004e8, type=0xbfffe1a8, 
        ret = 0x0
        hash = 2
        ent = 0x10201388
#14 0x10141394 in unpack_delta_entry (p=0x10222470, w_curs=0xbf800540, curpos=13102, delta_size=7, obj_offset=130
        delta_data = 0xbf800520
        result = 0x10140720
        base = 0x48054319
        base_size = 7
        base_offset = 13081
#15 0x1014173c in unpack_entry (p=0x10222470, obj_offset=13081, type=0xbfffe1a8, sizep=0xbf8005e8) at sha1_file.c
        w_curs = 0x0
        curpos = 13082
        data = 0x48021018
#16 0x10140e48 in cache_or_unpack_entry (p=0x10222470, base_offset=13081, base_size=0xbf8005e8, type=0xbfffe1a8, 
        ret = 0x0
        hash = 2
        ent = 0x10201388
There are more than 133205 stack frames.

The problem is, this repository contains private data. I don't want to put it in public, but I would send it to someone in the hope he doesn't expose its contents. Or you tell me, what you are interested in and I dig for it.

Bye, Jörg.
-- 
Nichts ist so langweilig, wie die Wiederholung seinerselbst.
                                        (Marcel Reich‐Ranicki)
Message 1 of 1 in “git dies with sigseg due to enless recursion on broken repo”
  1. Jörg SommerMay 26, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.