7

I can see several zombie processes in my computer. How can I get rid of them?

In fact, why does there exist vlc and pidgin zombies? It this a bug in Ubuntu or something I have done?

Thanks!

ps aux |grep Z

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND

sammy     3236  0.0  0.0      0     0 ?        Zl   heinä26   0:01 [vlc] <defunct>

sammy     4028  0.0  0.0      0     0 ?        Zl   heinä26   0:00 [vlc] <defunct>

sammy     4046  0.0  0.0      0     0 ?        Zl   heinä26   0:00 [vlc] <defunct>

sammy     4060  0.0  0.0      0     0 ?        Zl   heinä26   0:00 [vlc] <defunct>

sammy     4841  0.0  0.0      0     0 ?        Z    heinä26   0:00 [pidgin] <defunct>

sammy     4844  0.0  0.0      0     0 ?        Z    heinä26   0:00 [pidgin] <defunct>

sammy     6525  0.0  0.0      0     0 ?        Z    heinä26   0:00 [pidgin] <defunct>

sammy     6529  0.0  0.0      0     0 ?        Z    heinä26   0:00 [pidgin] <defunct>

sammy     8401  0.0  0.0      0     0 ?        Zl   heinä26   0:00 [vlc] <defunct>

sammy    13526  0.0  0.0      0     0 ?        Z    09:54   0:00 [pidgin] <defunct>
Radu Rădeanu
  • 169,590
sampie
  • 71
  • 2

3 Answers3

3

I think your answer is integrated in Luis Alvarado's answer:

If you have zombie processes it means those zombies have not been waited for by their parent (look at PPID displayed by ps -l). You have three choices: Fix the parent process (make it wait); kill the parent; or live with it. Remember that living with it is not so hard because zombies take up little more than one extra line in the output of ps.

[...]Zombies that exist for more than a short period of time typically indicate a bug in the parent program. As with other leaks, the presence of a few zombies isn't worrisome in itself, but may indicate a problem that would grow serious under heavier loads.

To remove zombies from a system, the SIGCHLD signal can be sent to the parent manually, using the kill command. If the parent process still refuses to reap the zombie, the next step would be to remove the parent process. When a process loses its parent, init becomes its new parent. Init periodically executes the wait system call to reap any zombies with init as parent.

See also this post about how can you get rid of zombie processes.

Radu Rădeanu
  • 169,590
0

For me each time I open a new video (from file explorer) a new (or som) process is created and keeps 'alive' in some way (at least an icon appearing on the 'task bar'.

I saw a recommendation (sorry to don't remember the author) to change the video output for OpenGl, this disn't work. Anyway when I changed the video output for XBC it worked. The problem occurs with VLC from snap AND apt.

My solution:

  1. Close/kill all 'alive' process (kill -9 vlc)
  2. rm -r ~/.config/vlc
  3. run vlc alone ($vlc)
  4. Tools > Preferences > Video > Output XCB > Save

I changed both outputs ( output and full screen output) to XCB.

Kevin Bowen
  • 19,615
  • 55
  • 79
  • 83
0

At least for pidgin, this seems to be a bug due to problems with going in and out of hibernation:

https://bugs.launchpad.net/ubuntu/+source/pidgin/+bug/1245666

The vlc zombies are probably just a coincidence caused by errors in that program.

Andrew Mao
  • 1,721
  • 1
  • 18
  • 19