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

Re: Errors GITtifying GCC and Binutils

From
EWEric Wong <normalperson@yhbt.net>
Date
Mar 25, 2006, 08:25 UTC
Message-ID
<20060325082521.GA17473@hand.yhbt.net>
In-Reply-To
<20060324182504.GI31387@lug-owl.de>
Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
> On Wed, 2006-03-22 14:33:37 +0100, Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
> 
> Since it seems nobody looked at the GCC import run (which means to use
> the svnimport), I ran it again, under strace control:

If you don't care for automated branch handling, how about trying git-svn? under the contrib/ directory in git.git

	git-svn init svn://gcc.gnu.org/svn/gcc
	git-svn fetch
Show 16 quoted lines
> > GCC
> > ~~~
> > $ /home/jbglaw/bin/git svnimport -C gcc -v svn://gcc.gnu.org/svn/gcc
> 
> > Committed change 3936:/ 1993-03-31 05:44:03)
> > Commit ID ceff85145f8671fb2a9d826a761cedc2a507bd1e
> > Writing to refs/heads/origin
> > DONE: 3936 origin ceff85145f8671fb2a9d826a761cedc2a507bd1e
> > ... 3937 trunk/gcc/final.c ...
> > Can't fork at /home/jbglaw/bin/git-svnimport line 379.
> 
> ... 4279 trunk/gcc/config/i386/xm-sco.h ...
> 
> This time it broke at a different revision, so I guess it's not a SVN
> or git / git-svnimport problem, but rather a problem of my Perl
> installation or the kernel itself?

I've known of SVN library bindings leaking memory in the past, but I thought it's been solved. Afaik, any memory allocated by the Perl interpreter is never released back to the kernel, either. (At least that seems to be the case with my setup (Debian unstable, Perl 5.8.8, 2.6 kernel, x86 machine).

Show 10 quoted lines
> What are possible reasons for clone() to fail with -ENOMEN? I have to
> admit that the box _is_ loaded a bit all the time:
> 
> jbglaw@bixie:~/vax/git-conversion$ uptime
>  19:23:58 up 136 days,  7:46, 20 users,  load average: 4.45, 4.25, 3.05
> jbglaw@bixie:~/vax/git-conversion$ free
>              total       used       free     shared    buffers     cached
> Mem:        507308     501760       5548          0       2184      16900
> -/+ buffers/cache:     482676      24632
> Swap:      2441872    1295512    1146360

Some importers (my own git-svn included) aren't amazingly efficient when handling lots of history which gcc has. It looks like (from what I understand of the SVN api used in git-svnimport) is that the entire log for the 100k+ revisions in the tree is slurped down into memory before any processing is done.

git-svn does this too, but by parsing the output of the svn binary instead of using the library, so at least it won't have issues with the svn bindings and libraries to worry about.

My git-svn process running on the SVN tree just finished parsing the svn log output, and it's maxed out at 74M RSS (on a 32-bit x86). It'll probably take a while to import it all (which I won't do), but I could have just as easily done the following to reduce memory usage by ~half:

	git-svn fetch -r0:50000		# import the first 50000k
	git-svn fetch			# now import the remaining

Afaik, there's no way to do something like the above with git-svnimport for memory-starved setups.

-- 
Eric Wong
Previous: Santi BéjarNext: Eric Wong
Message 41 of 43 in “Errors GITtifying GCC and Binutils”
  1. Jan-Benedict GlawMar 22, 2006
  2. Linus TorvaldsMar 22, 2006
  3. Linus TorvaldsMar 23, 2006
  4. Linus TorvaldsMar 23, 2006
  5. Jan-Benedict GlawMar 23, 2006
  6. Linus TorvaldsMar 23, 2006
  7. Chris ShoemakerMar 24, 2006
  8. Keith PackardMar 24, 2006
  9. Jan-Benedict GlawMar 24, 2006
  10. Chris ShoemakerMar 25, 2006
  11. H. Peter AnvinMar 23, 2006
  12. Keith PackardMar 23, 2006
  13. Linus TorvaldsMar 23, 2006
  14. seanMar 23, 2006
  15. Linus TorvaldsMar 23, 2006
  16. Shawn PearceMar 23, 2006
  17. Ryan AndersonMar 23, 2006
  18. Junio C HamanoMar 24, 2006
  19. Junio C HamanoMar 23, 2006
  20. Johannes SchindelinMar 24, 2006
  21. Mark WoodingMar 24, 2006
  22. Andreas EricssonMar 24, 2006
  23. David S. MillerMar 23, 2006
  24. Linus TorvaldsMar 23, 2006
  25. Timo HirvonenMar 23, 2006
  26. seanMar 23, 2006
  27. Ralf BaechleMar 24, 2006
  28. Andreas EricssonMar 24, 2006
  29. Carl WorthMar 24, 2006
  30. Andreas EricssonMar 24, 2006
  31. Ryan AndersonMar 23, 2006
  32. Linus TorvaldsMar 23, 2006
  33. Junio C HamanoMar 23, 2006
  34. Ryan AndersonMar 24, 2006
  35. Junio C HamanoMar 24, 2006
  36. Ralf BaechleMar 24, 2006
  37. Jan-Benedict GlawMar 24, 2006
  38. Andreas EricssonMar 24, 2006
  39. Jan-Benedict GlawMar 25, 2006
  40. Santi BéjarMar 24, 2006
  41. Eric WongMar 25, 2006
  42. contrib/git-svn: stabilize memory usage for big fetchesEric Wong, Mar 26, 2006
  43. James CloosMar 25, 2006

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.