11

I have an instance of Ubuntu 12.04 LTS (GNU/Linux 3.2.0-25-virtual i686) running as a KVM-VM on a host-machine that runs one more VM beside it.

I deploy a Ruby on Rails application using the Capistrano deployment-gem.

However, if I deploy twice in a row in a short time, the CPU usage jumps to 100% because of the /sbin/getty process.

How can this be?

I believe getty is a rather simple program that passes a login-name from a terminal to a login-process.

Also: In my Capfile (Capistrano configuration file) I am running certain commands after the Rails application is deployed including a call to sudo /sbin/restart <APPNAME> which is an upstart task.

Could this be related somehow?

I can always kill the getty process and the problem is gone until the next deployment, but I would rather understand and fix the problem.

Any help is appreciated. Attached is a screenshot of my problem.

/sbin/getty causes 100% CPU load

2
  • 2
    You can trace what the getty is doing with 'strace -f -p 18081' where 18081 is the pid of the misbehaving getty. If strace doesn't show anything, its likely a bug in getty.
    – SpamapS
    Aug 18, 2012 at 14:09
  • Were you able to solve this issue permanently? Feb 6, 2014 at 17:31

3 Answers 3

2

Finally I also encountered this issue on a Ubuntu 12.10 Server VPS.

But as I don't need any tty (because I'm connecting by ssh) I fixed it the hard way:

sudo rm /etc/init/tty*
sudo reboot

And it works pretty well! no more getty process stuck.

0

Are you logging to syslog?

Is your syslog going to tty1?

If so, there's a good chance you have more than 38400bps worth of syslog and getty is blocking while it waits to dump data into its tty.

I'd check your rsyslog configuration - by default, Ubuntu logs some syslog output to /dev/xconsole via /etc/rsyslogd.d/50-default.conf.

1
  • If this is the case, how to prevent it? Sep 22, 2015 at 14:20
0

On one of my core I was getting 100% CPU utilization for agetty process on my Ubuntu 16.04 machine. In my particular case I only used ssh connection for accessing server, therefore after investigating for a while I decided to remove it.

sudo rm /etc/systemd/system/getty.target.wants/[email protected]
sudo rm /lib/systemd/system/[email protected]

Reboot is required. Solution was found at https://peteris.rocks/blog/can-you-kill-it/ . Before taking such option, be careful to check if you really do not need tty.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .