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

Re: leaky cherry-pick

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Jan 10, 2012, 01:38 UTC
Message-ID
<CACsJy8DpOY6UUVBjPK4k5BbvbfAckc+N5hoDTwRq5c7koZ=OgQ@mail.gmail.com>
In-Reply-To
<20120109223737.GA1589@padd.com>
On Tue, Jan 10, 2012 at 5:37 AM, Pete Wyckoff <pw@padd.com> wrote:
Show 14 quoted lines
> I've got a big tree, and rebased 200 commits today using
> cherry-pick.  It ran out of memory.  Both 1.7.4 and recent
> master (eac2d83 (Git 1.7.9-rc0, 2012-01-06)) behave similarly.
>
> Here's a valgrind dump for rebasing just 9 commits, if someone is
> interested to track this down.  This was invoked as:
>
>    valgrind --log-file=/tmp/vg.out --leak-check=full \
>    /home/pw/src/git/git cherry-pick 8d535b6^..2cf53a0
>
> I can re-test if you like, or provide more detail if this seems
> unusual.
>
> Scroll to the end to see the biggest leaks.

Index entries are leaked since probably forever because we allocated entries in bulk and could not release them individually, until debed2a (read-cache.c: allocate index entries individually). Putting discard_index() to read_and_refresh_cache() might help, I think.

-- 
Duy
Previous: Junio C HamanoNext: Ramkumar Ramachandra
Message 3 of 11 in “leaky cherry-pick”
  1. Pete WyckoffJan 9, 2012
  2. Junio C HamanoJan 9, 2012
  3. Nguyen Thai Ngoc DuyJan 10, 2012
  4. Ramkumar RamachandraJan 10, 2012
  5. Jeff KingJan 10, 2012
  6. Ramkumar RamachandraJan 11, 2012
  7. Junio C HamanoJan 11, 2012
  8. Ramkumar RamachandraJan 11, 2012
  9. Jeff KingJan 11, 2012
  10. Junio C HamanoJan 12, 2012
  11. Jeff KingJan 12, 2012

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.