2

I've got a HostGator level 1 VPS - basically, a CentOS 5. I've got full root access to run whatever I want.

Anyhow, during a recent maintenance check, I run yum -y update, but after the usual kinds of Yum messages, it failed after "Running Transaction Test" with a message, "Killed".

According to the people here, the problem is specific to a package, so I started updating each package by itself (yum install packagename). This helped me out identify the main issue; it was package "filesystem" that is causing the problem.

Here's a whole CLI dump:

[root@cov ~]# yum -v update filesystem
Loading "fastestmirror" plugin
Config time: 0.109
Yum Version: 3.2.22
Setting up Package Sacks
Loading mirror speeds from cached hostfile
 * base: mirror.nexcess.net
 * epel: mirror.utexas.edu
 * extras: mirrors.adams.net
 * ius: pancks.sothatswhy.org.uk
 * rpmforge: fr2.rpmfind.net
 * updates: mirror.raystedman.net
pkgsack time: 0.077
rpmdb time: 0.000
Setting up Update Process
Building updates object
up:Obs Init time: 0.629
up:simple updates time: 0.170
up:obs time: 0.006
up:condense time: 0.000
updates time: 3.142
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
--> Running transaction check
Checking deps for filesystem.x86_64 0-2.4.0-3.el5 - None
---> Package filesystem.x86_64 0:2.4.0-3.el5.centos set to be updated
Checking deps for filesystem.x86_64 0-2.4.0-3.el5.centos - u
--> Finished Dependency Resolution
Dependency Process ending
Depsolve time: 0.650

Dependencies Resolved

==========================================================================
 Package          Arch          Version               Repository   Size
==========================================================================
Updating:
 filesystem      x86_64         2.4.0-3.el5.centos    updates      1.0 M

Transaction Summary
==========================================================================
Install       0 Package(s)
Upgrade       1 Package(s)

Total size: 1.0 M
Is this ok [y/N]: y
Downloading Packages:
using local copy of filesystem-2.4.0-3.el5.centos.x86_64
Running rpm_check_debug
Member: filesystem.x86_64 0-2.4.0-3.el5.centos - u
Adding Package filesystem-2.4.0-3.el5.centos.x86_64 in mode u
Member: filesystem.x86_64 0-2.4.0-3.el5 - None
rpm_check_debug time: 0.213
Running Transaction Test
Member: filesystem.x86_64 0-2.4.0-3.el5.centos - u
Adding Package filesystem-2.4.0-3.el5.centos.x86_64 in mode u
Member: filesystem.x86_64 0-2.4.0-3.el5 - None
Killed
[root@cov ~]#

NB: yum-complete-transaction didn't help at all.

Edit 1: As @BMDMan suggested:

[root@cov ~]# wget ftp://ftp.muug.mb.ca/mirror/centos/5.6/updates/x86_64/RPMS/filesystem-2.4.0-3.el5.centos.x86_64.rpm
--2011-05-16 18:00:40--  ftp://ftp.muug.mb.ca/mirror/centos/5.6/updates/x86_64/RPMS/filesystem-2.4.0-3.el5.centos.x86_64.rpm
           => `filesystem-2.4.0-3.el5.centos.x86_64.rpm'
Resolving ftp.muug.mb.ca... 130.179.31.46
Connecting to ftp.muug.mb.ca|130.179.31.46|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /mirror/centos/5.6/updates/x86_64/RPMS ... done.
==> SIZE filesystem-2.4.0-3.el5.centos.x86_64.rpm ... 1038514
==> PASV ... done.    ==> RETR filesystem-2.4.0-3.el5.centos.x86_64.rpm ... done.
Length: 1038514 (1014K)

100%[============================================================>] 1,038,514   58.2K/s   in 82s

2011-05-16 18:02:03 (12.4 KB/s) - `filesystem-2.4.0-3.el5.centos.x86_64.rpm' saved [1038514]

[root@cov ~]# rpm -Uvh filesystem-2.4.0-3.el5.centos.x86_64.rpm
Preparing...                Killed

Edit 2: I've been monitoring swap, cpu and memory with htop while trying to update and each meter flew up to max, max memory, max cpu and max swap. Is that normal? Also, my memory is currently at 384mb, could be that RPM doesn't like it this low?

Edit 3: I had an idea, I deactivated a lot of web service (mail, http, mysql and dropbox daemons) and tried RPM again. This time it didn't get killed (yet?) but it seems to be stuck as follows:

[root@cov ~]# rpm -Uvh filesystem-2.4.0-3.el5.centos.x86_64.rpm
Preparing...                ########################################### [100%]
   1:filesystem             ########################################### [100%]

Edit 4: Well, seems it is stuck, haven't budged a bit in 30 minutes.

Christian
  • 466
  • 5
  • 23
  • What do you get when installing the package from outside of yum–i.e. with something more like `rpm -Uvh filesystem-2.4.0-3.el5.centos.x86_64.rpm`? – BMDan May 16 '11 at 22:41
  • See my edited answer. – Christian May 16 '11 at 23:02
  • How about `rpm -vv`? That should tell you which script(s) are doing the killing, and potentially *why*. I should also mention `--noscripts`, if only to tell you **NOT TO USE IT UNDER ANY CIRCUMSTANCES**. You **WILL** break your machine. (Edit: Also take a look at the output of `ps xfawww | grep -A 5 rpm` before you CTRL-C that `rpm`.) – BMDan May 17 '11 at 01:32
  • @BMDan - I thought I should mention that when rpm gets stuck like above, CTRL+C simply doesn't work - I had to `kill -9` from a separate SSH session. Also, `rpm -vv` doesn't seem correct? – Christian May 17 '11 at 06:25
  • For the record, `rpm -vv` is quite useful; try it with something like `rpm -vvq rpm` to see what it does. Glad to see you figured out your problem, though. – BMDan May 17 '11 at 22:25
  • @BMDan - It doesn't run. -v is for verbose, but what's -vv? And why should I run verbose and then quite it (-vvq)? – Christian May 18 '11 at 10:00
  • @BMDan - Oh, just tried it now, again, and it worked. I could have sworn it wasn't working. – Christian May 18 '11 at 10:02
  • `-q` is "query", not "quiet". – BMDan May 20 '11 at 01:59

2 Answers2

3

The problem was indeed memory related.

I've talked HostGator into increasing memory temporally while they performed yum update themselves, and now it's fixed.

Christian
  • 466
  • 5
  • 23
  • If they use container based virtualization (like OpenVZ, Vserver and others), you can take a look at /proc/user_beancounters to spot when you hit the ceiling of various limitations. – 3molo May 17 '11 at 08:49
  • @3molo - I've been running HTOP (TOP-like utility). – Christian May 17 '11 at 08:51
  • Same here, was hitting `Killed` when doing certain yum transactions on a server with 128 MB of RAM (don't ask), and what worked in the end was running smaller transactions (e.g. only update a few packages in one go instead of everything). – geerlingguy Jun 27 '18 at 16:53
0

Create a Linux Swap File temporarily , 1GB is enough for "yum update -y" https://linuxize.com/post/create-a-linux-swap-file/