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

Re: git-fast-import crashes

From
Shawn O. Pearce <spearce@spearce.org>
Date
Oct 13, 2007, 03:29 UTC
Message-ID
<20071013032916.GL27899@spearce.org>
In-Reply-To
<e66701d40710120242p6fc05148hd40d19d295373ac4@mail.gmail.com>
Shun Kei Leung <kevinlsk@gmail.com> wrote:
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: 0x64617469
> in_window (win=0x5004d0, offset=3501) at sha1_file.c:701
> 701             off_t win_off = win->offset;
...
Show 11 quoted lines
> (gdb) print win
> $1 = (struct pack_window *) 0x5004d0
> (gdb) print *win
> $2 = {
>   next = 0x64617461,
>   base = 0x20333936 <Address 0x20333936 out of bounds>,
>   offset = 22523564414626158,
>   len = 1685026675,
>   last_used = 795894075,
>   inuse_cnt = 0
> }

Wow. There's no way that struct pack_window is valid anymore. The base isn't a valid address. The offset cannot possibly be correct (you don't have that big of a packfile, do you?!

What does `git count-objects -v` give you? I'm specifically interested in how many packfiles you have. The other thing that may be interesting to see is the value of pack_open_windows and peak_pack_open_windows (file scope in sha1_file.c).

Then again, maybe that isn't interesting. This looks like it is memory corruption (e.g. someone overwriting a free'd segment), but that sort of memory corruption is very hard to track down.

-- 
Shawn.
Previous: Shun Kei LeungNext: Shawn O. Pearce
Message 2 of 13 in “git-fast-import crashes”
  1. Shun Kei LeungOct 12, 2007
  2. Shawn O. PearceOct 13, 2007
  3. Shawn O. PearceOct 13, 2007
  4. Pierre HabouzitOct 13, 2007
  5. Pierre HabouzitOct 13, 2007
  6. Shun Kei LeungOct 15, 2007
  7. Pierre HabouzitOct 15, 2007
  8. Shun Kei LeungOct 15, 2007
  9. Shun Kei LeungOct 16, 2007
  10. Pierre HabouzitOct 16, 2007
  11. Shun Kei LeungOct 16, 2007
  12. Pierre HabouzitOct 16, 2007
  13. Johannes SchindelinOct 13, 2007

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.