[Bug 828730] Re: apt-get source memory leak

David Kalnischkies 828730 at bugs.launchpad.net
Wed Aug 24 00:31:10 UTC 2011


Lets assume for a moment that we really have a memory leak in 'apt-get source' - which is not unlikely, but are properly not big enough to be noticed… - this memory leak only exists while 'apt-get source' is running, the kernel will free all memory requested by any application at the end of its execution. So if you run apt-get one time or a thousand times in a row doesn't make a difference in memory wasted in a leak: It will be always zero at the end. So are you sure it's not something else easting your memory? Are you downloading the packages e.g. to a tmpfs? And do you consider that all the output you see in a console is stored in memory, too?
(marking as invalid for now)

Beside that you are downloading the sources again and again for all
binary packages - for libreoffice this could mean that you are
downloading 655 MB 165 times (~ 108 GB). You could avoid that and a
bunch of other problems by using only one APT call as you can provide
more than one packagename…

But after all, 'apt-get source' doesn't sound like the right tool for
this task to begin with… debmirror sounds a lot better.

** Changed in: apt (Ubuntu)
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/828730

Title:
   apt-get source memory leak

Status in “apt” package in Ubuntu:
  Invalid

Bug description:
  I used apt-get source to download a bunch of source and noticed I
  would run out of memory.  I tried this on several machines, including
  LTS 10.04.03, with apt 0.7.25.3ubuntu9.6 for amd64 compiled on Jul 13
  2011 11:09:35.

  I used apt-get source in a script where several thousand downloads are
  done, the system will be unrecoverably out of memory, requiring
  reboot.  You can not download the whole source tree this way, without
  a lot of reboots.

  example:
  for package in `dpkg -l | grep 'ii' | tr -s '[:blank:]' '\t' | cut --fields=2`
  do
  mkdir $package
  cd $package
  apt-get --download-only source $package
  cd ..
  done

  Monitor the memory use using top or in /proc, eventually the system
  will start thrashing.

  Work around: unknown , how does one download the ubuntu or debian
  source tree ?

  Mark Menkhus, HP

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/828730/+subscriptions




More information about the foundations-bugs mailing list