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

Re: [PATCH 3/3] odb: properly close sources before freeing them

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Dec 6, 2025, 11:43 UTC
Message-ID
<CAPig+cQNKQt=kMaNYNWAPAfGej-mhLUR_BXS4J58JjVUtG7VKw@mail.gmail.com>
In-Reply-To
<aTQVt4zgMbsX_6tD@pks.im>
On Sat, Dec 6, 2025 at 6:38 AM Patrick Steinhardt <ps@pks.im> wrote:
Show 27 quoted lines
> On Fri, Dec 05, 2025 at 06:14:22PM -0500, Eric Sunshine wrote:
> > On Fri, Dec 5, 2025 at 6:36 AM Patrick Steinhardt <ps@pks.im> wrote:
> > > In the next commit we are about to move the packfile store into the ODB
> > > source so that we have one store per source. This will lead to a memory
> > > leak in the following commit when reading data from a submodule via
> > > git-grep(1):
> > > [...]
> > > Signed-off-by: Patrick Steinhardt <ps@pks.im>
> >
> > Considering that this is patch [3/3], to what does "In the next
> > commit..." refer?
>
> Good catch! I split this out of another, bigger, patch series. But as
> I've started to hit the leak in a different patch series, as well, I
> decided to split it out into a smaller patch series.
>
> I've queued the following change locally, but will refrain from sending
> out a new version for now.
>
> 3:  a06d0716c3 ! 3:  c9ca233c29 odb: properly close sources before freeing them
>     @@ Commit message
>          In the next commit we are about to move the packfile store into the ODB
>     -    source so that we have one store per source. This will lead to a memory
>     -    leak in the following commit when reading data from a submodule via
>     -    git-grep(1):
>     +    source so that we have one store per source. This can lead to a memory
>     +    leak when reading data from a submodule via git-grep(1):

I would think that you would also want to drop the "In the next commit we are about to..." bit (considering, again, that this is patch [3/3]).

Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 11 of 26 in “Some random object database related fixes”
  1. 0/3 Some random object database related fixesPatrick Steinhardt, Dec 5, 2025
  2. 1/3 builtin/repack: fix geometric repacks with promisor remotesPatrick Steinhardt, Dec 5, 2025
  3. Justin ToblerDec 10, 2025
  4. Patrick SteinhardtDec 11, 2025
  5. 2/3 builtin/gc: fix condition for whether to write commit graphsPatrick Steinhardt, Dec 5, 2025
  6. Justin ToblerDec 10, 2025
  7. Patrick SteinhardtDec 11, 2025
  8. 3/3 odb: properly close sources before freeing themPatrick Steinhardt, Dec 5, 2025
  9. Eric SunshineDec 5, 2025
  10. Patrick SteinhardtDec 6, 2025
  11. Eric SunshineDec 6, 2025
  12. Patrick SteinhardtDec 6, 2025
  13. 0/2 Some random object database related fixesPatrick Steinhardt, Dec 11, 2025
  14. 1/2 builtin/gc: fix condition for whether to write commit graphsPatrick Steinhardt, Dec 11, 2025
  15. Toon ClaesDec 11, 2025
  16. Karthik NayakJan 6, 2026
  17. Patrick SteinhardtJan 6, 2026
  18. Karthik NayakJan 6, 2026
  19. 2/2 odb: properly close sources before freeing themPatrick Steinhardt, Dec 11, 2025
  20. Justin ToblerDec 12, 2025
  21. Karthik NayakJan 6, 2026
  22. 0/2 Some random object database related fixesPatrick Steinhardt, Jan 6, 2026
  23. 1/2 builtin/gc: fix condition for whether to write commit graphsPatrick Steinhardt, Jan 6, 2026
  24. 2/2 odb: properly close sources before freeing themPatrick Steinhardt, Jan 6, 2026
  25. Karthik NayakJan 6, 2026
  26. Junio C HamanoJan 7, 2026

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.