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

Re: Funny error with git gc...

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
May 15, 2009, 19:18 UTC
Message-ID
<alpine.DEB.1.00.0905152115220.26154@pacific.mpi-cbg.de>
In-Reply-To
<alpine.DEB.1.00.0905152111140.26154@pacific.mpi-cbg.de>
Hi,
On Fri, 15 May 2009, Johannes Schindelin wrote:
Show 15 quoted lines
> On Fri, 15 May 2009, Johannes Schindelin wrote:
> 
> 
> > > 	[core]
> > > 		packedGitWindowSize = 16k
> > > 		packedGitLimit = 1M
> > > 
> > > you should hopefully be able to repack (slowly) even with a low file 
> > > descriptor limit, because of the total limit on the size.
> > 
> > I don't think so, because the window size has nothing to do with the 
> > amount of open windows, right?
> 
> Obviously I overlooked the "packedGitLimit" setting.  Still, just a 
> work-around, not a solution that tackles the problem heads-on.

But it worked with the work-around, and not with my heads-on approach. The problem is in xmkstemp(), but when I apply this patch on top of my MAKESHIFT PATCH:

-- snip --
diff --git a/wrapper.c b/wrapper.c
index d8efb13..47806ba 100644
--- a/wrapper.c
+++ b/wrapper.c
@@ -192,8 +192,13 @@ int xmkstemp(char *template)
 	int fd;
 
 	fd = mkstemp(template);
+	if (fd < 0) {
+		release_pack_memory((size_t)-1ll, -1);
+		fd = mkstemp(template);
+	}
 	if (fd < 0)
-		die("Unable to create temporary file: %s", strerror(errno));
+		die("Unable to create temporary file '%s': %s",
+				template, strerror(errno));
 	return fd;
 }
 
-- snap --

I get an even funnier error:

fatal: Unable to create temporary file '.git/objects/pack/tmp_pack_rvhvZb': Invalid argument
error: failed to run repack

Oh well, I'll let it sit over the weekend...

Ciao,
Dscho
Previous: Johannes SchindelinNext: Linus Torvalds
Message 7 of 18 in “Funny error with git gc...”
  1. Johannes SchindelinMay 15, 2009
  2. Junio C HamanoMay 15, 2009
  3. Avery PennarunMay 15, 2009
  4. Linus TorvaldsMay 15, 2009
  5. Johannes SchindelinMay 15, 2009
  6. Johannes SchindelinMay 15, 2009
  7. Johannes SchindelinMay 15, 2009
  8. Linus TorvaldsMay 15, 2009
  9. Johannes SchindelinMay 23, 2009
  10. Linus TorvaldsMay 23, 2009
  11. Johannes SchindelinMay 24, 2009
  12. Linus TorvaldsMay 15, 2009
  13. Johannes SchindelinMay 15, 2009
  14. Daniel BarkalowMay 15, 2009
  15. Matthias AndreeMay 18, 2009
  16. Cope better with a _lot_ of packsJohannes Schindelin, May 15, 2009
  17. Shawn O. PearceMay 15, 2009
  18. Junio C HamanoMay 21, 2009

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.