-1

Last week I upgraded Ubuntu from version 14.04 to 18.04 and almost everything is fine.

After some time, day or two, system freezes and I'm unable to login and I have to reboot.

ps -ax | grep sh | wc -l

shows that there are 654 zombie process and the number gets higher and higher each time.

ps -elf | grep Z

And it gives a lot of [sshd] 'defunct' processes. I checked the parent and it is sh(1).

I've checked many articles and many materials and nothing helped me.

Thank you for any help.

Mozartos
  • 113
  • 1
  • 10

1 Answers1

1

systemd is responsible for reaping defunct "zombie" processes. There's a class of failures that cause it to simply hang. Eventually, you notice when either you can't start a service, or you see a bunch of zombie processes kicking around. Search your syslog for a message like:

systemd: Freezing execution

If you see that message, you know that systemd has stopped doing anything. Zombie processes will start piling up, and systemd isn't going to start anything, or even respond to requests to get status on services (e.g. systemctl status <service>).

If you search around the web for that "Freezing execution" message, you'll find a few different causes. One recent bug had this behavior as a response to running out of memory. Here's the redhat bug report on it:

https://bugzilla.redhat.com/show_bug.cgi?id=1437114

Mike Andrews
  • 3,045
  • 18
  • 28