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>

3 Answers 3

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.

6
  • 0 1000 3236 1 20 0 0 0 exit Zl ? 0:01 [vlc] <defunct>
    – sampie
    Jul 27, 2013 at 9:39
  • 1
    I am seeing PPID of zombie vlcs being 1 (4th value). Is that indication that the bug is in init process?
    – sampie
    Jul 27, 2013 at 9:40
  • @sampie I dont't think; you can check that there are a lot of processes with PPID=1 that are not zombies: ps axo ppid,comm. Jul 27, 2013 at 9:49
  • 1
    How a process can be a zombie if parent is init (1)?
    – sampie
    Jul 27, 2013 at 9:58
  • 1
    I think it is still the same question. I seem to have zombie processes (with init as parent). I think those zombies processes have existed a couple of days, so init does not seem to reap them or it takes very long for init to to reap zombies.
    – sampie
    Jul 27, 2013 at 10:22
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.

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.

You must log in to answer this question.

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