Announcement

Collapse
No announcement yet.

dist-upgrade.py uses up all memory, then crashes

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    dist-upgrade.py uses up all memory, then crashes

    I'm having problems with a crashed upgrade process. When I was running dist upgrade it suddenly started taking up all of the memory on my computer, finally ending when dist-upgrade.py literally ran out of memory and died. It was near the end of or shortly after the Install the Upgrades step. I haven't restarted the upgrade program because I don't want to further mess anything up.

    I looked in /var/log/dist-upgrade/main.log and found this traceback near the end.
    Code:
    Traceback (most recent call last):
    
     File "/tmp/kde-root/adept_managerz3wXkb.tmp-extract/dist-upgrade.py", line 59,
     in <module>
      app.run()
    
     File "/tmp/kde-root/adept_managerz3wXkb.tmp-extract/DistUpgradeControler.py", 
    line 1346, in run
      self.fullUpgrade()
    
     File "/tmp/kde-root/adept_managerz3wXkb.tmp-extract/DistUpgradeControler.py", 
    line 1335, in fullUpgrade
      self.doPostUpgrade()
    
     File "/tmp/kde-root/adept_managerz3wXkb.tmp-extract/DistUpgradeControler.py", 
    line 945, in doPostUpgrade
      res = self.cache.commit(fprogress,iprogress)
    
     File "/tmp/kde-root/adept_managerz3wXkb.tmp-extract/DistUpgradeCache.py", line 69, in commit
      apt.Cache.commit(self, fprogress, iprogress)
    
     File "/usr/lib/python2.5/site-packages/apt/cache.py", line 203, in commit
      if fetchProgress == None:
    
     File "/usr/lib/python2.5/site-packages/apt/cache.py", line 178, in installArchives
      # this can throw a exception
    
     File "/usr/lib/python2.5/site-packages/apt/progress.py", line 213, in run
      pid = self.fork()
    
     File "/tmp/kde-root/adept_managerz3wXkb.tmp-extract/DistUpgradeViewKDE.py", line 244, in fork
      self.child_pid = os.fork()
    
    OSError: [Errno 12] Cannot allocate memory
    
    2007-10-21 17:16:11,106 ERROR failed to import apport python module, can't report bug: No module named python_hook
    As always, any help is greatly appreciated.

    -Pingveno

    #2
    Re: dist-upgrade.py uses up all memory, then crashes

    I have a similar problem, with the same traceback.

    I am running the last 7.10 RC, upgraded two days before the official release. Now Adept crashes while, or right after, downloading the new packages. I have tried the upgrade many times, and it always fails.

    Any help?

    Comment


      #3
      Re: dist-upgrade.py uses up all memory, then crashes

      First, thanks for finding the initial problem for me.

      If you're like me, you simply don't have enough memory. My computer has 768M of main ram but it turned out my swap partition (part of the hard drive that pretends it's ram in case you run out) was a tiny 256M, making 'only' 1G total. This wasn't enough.

      You can find out how much swap space you have with the command:
      cat /proc/swaps
      Size will be in kilobytes.

      You'll have to get more swap space at some time, but how do you get a few Mb for the moment? You can simply use a file temporarily. First, make a big file somewhere where you have some space:
      sudo dd of=swapspace if=/dev/zero bs=1024 count=768000
      This makes an empty 768MB file named 'swapspace'. Now 'format' the file:
      sudo mkswap swapspace
      And set the permissions to something reasonable:
      sudo chmod 600 swapspace
      Finally, enable it:
      sudo swapon -v swapspace
      Now when you check /proc/swaps, you should see two files listed. Run the updater again and proceed with the update. When you're done, you can remove the temporary swap file with the commands:
      sudo swapoff swapspace
      sudo rm swapspace


      I hope that cures your update problems too!

      Comment


        #4
        Re: dist-upgrade.py uses up all memory, then crashes

        I don't need it but that is a very elegant and typically linux like solution. I am learning more every day. Thankx
        HP Pavilion dv6 core i7 (Main)
        4 GB Ram
        Kubuntu 18.10

        Comment


          #5
          Re: dist-upgrade.py uses up all memory, then crashes

          A very elegant solution indeed, but I can't test it:

          Since this morning's update (including adept_manager and kde-core), Adept doesn't give me the option to "upgrade" anymore, and it makes sense, for I am already using Gutsy. On the other hand, it hasn't installed some Gutsy packages that were not by default in Feisty, like dolphin, strigi, gdebi, etc... now I'm stuck between those distributions.

          Maybe installing kubuntu-desktop would help?

          Thank you

          P.S.: I have 1GH RAM and something like 670 MB in swap. Does the upgrade tool really need more than that?

          Comment


            #6
            Re: dist-upgrade.py uses up all memory, then crashes

            Well normally swap should be at least equal to ram, but your should be enough.

            To check your version you can do this:
            Code:
            lsb_release -a
            ina terminal.
            You should see something like this:
            No LSB modules are available.
            Distributor ID: Ubuntu
            Description: Ubuntu 7.10
            Release: 7.10
            Codename: gutsy
            fintan@fintanws2:~$

            Now as far as I am concerned, and this a very personal opinion, but adept is not very adept as in:
            http://www.m-w.com/dictionary/adept

            so the first thing I do when installing / upgrading is install the trusty synaptic package manager. It is stable and very "adept". You can do this with adept but the best way is to do:
            Code:
            sudo apt-get install synaptic
            in a terminal.

            It will show in your k->system->synaptic
            Start it and do a package reload (top left) and go to status see if there any updates outstanding. If there are load those. Now check if your kde-desktop is installed. If not install it. Maybe that will solve the missing gutsy apps. issue. If not you can install them with synaptic. A word of caution. strigi hogged a lot (up tp 95% of the cpu) in the betas of gutsy and there was no way to shut it off (up). I don't know if this has been resolved as I uninstalled it. So try it but don't be surprised. You can always get rid of it or maybe deactivate it.

            In the future when your update notifier shows up use synaptic to do the updates. it is much more reliable, at least until they finally get adept to behave.

            I hope this helps.
            HP Pavilion dv6 core i7 (Main)
            4 GB Ram
            Kubuntu 18.10

            Comment


              #7
              Re: dist-upgrade.py uses up all memory, then crashes

              Originally posted by rakku
              Maybe installing kubuntu-desktop would help?
              Definitely. If you have installed kde with 'kde-core' metapackages, the kubuntu specific changes and additions are not included, they can be installed with the 'kubuntu-desktop' metapackage.

              If you don't wish to install the whole 'kubuntu-desktop' package, you can preview what would be installed with it and choose only the packages you want/need. Like Fintan said, strigi is a bit immature, for example.

              Comment


                #8
                Re: dist-upgrade.py uses up all memory, then crashes

                Originally posted by Fintan
                Well normally swap should be at least equal to ram, but your should be enough.
                I've read so many different opinions on how big it should be, that I decided to go the middle way.



                Thank you both for the answers, I feel much more confident now

                But, in fact, instead of installing Synaptic, I'd like to learn how to use the terminal... apt-get, apt-cache, etc.

                Is there a way to select packages inside a metapackage from konsole?

                I'll drop dolphin as well, I really don't see the need for it. I've tried it once, but it's not for me.


                Well, thank you again

                Comment


                  #9
                  Re: dist-upgrade.py uses up all memory, then crashes

                  had a similar problem, so I ended up booting into recovery mode and ran apt-get dist-upgrade. It prompted me to fix dpkg, and the update was a breeze beyond that from the command line. I've only got a couple of annoying bugs to deal with, but those are more to deal with how I like things.
                  <br />

                  Comment

                  Working...
                  X