Bazarr: zombie processes

Created on 27 Apr 2020  路  9Comments  路  Source: morpheus65535/bazarr

Describe the bug
Recently started seeing zombie processes. Usually one or more in a 24 to 36 hour period

To Reproduce
Steps to reproduce the behavior:

  1. Update to HEAD of development branch
  2. Wait and check for zombie process

Expected behavior
No zombies

Screenshots

scottrus@storzilla:~$ ps aux | grep defunct
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
bazarr     377  0.0  0.0      0     0 ?        Z    Apr26   1:06 [python3.8] <defunct>
scottrus 13425  0.0  0.0  13132  1092 pts/0    S+   13:22   0:00 grep defunct

Software (please complete the following information):

  • Bazarr: HEAD development
  • Ubuntu 18.04 LTS

Additional context
It's showed up in about the last week? I haven't been tracking it too closely.

awaiting feedback

All 9 comments

If you force a full scan of hard disk, does it reproduce this issue?

I checked the Update all Episode Subtitles from disk setting and didn't see any zombie after running it. I also tried Update all Movie Subtitles from disk and didn't see any zombie processes either.

My guess would be released to the update from git but I cannot be sure. I guess that based on the intermittent nature of Timed Checks + Git Updates + my observations of this not being constant.

Thanks for testing. It's kind of hard to investigate without being able to reproduce it. Forcing an update after modifying a single file (like readme) could help reproduce on your side.

Sounds like a plan. I've created a PR :)

I meant for you to change a file locally so git would refresh it with head.

Okay, that caused it:

[development b5f119c9] update readme
 1 file changed, 2 insertions(+)

scottrus@storzilla:/opt/bazarr$ tail -f /var/log/syslog | grep bazarr
Apr 27 19:10:53 storzilla bazarr[18535]: 2020-04-27 19:10:53,453 - root                             (7f671a7fc700) :  INFO (check_update:56) - BAZARR Updated to latest version. Restart required.  1 file changed, 2 insertions(+)
Apr 27 19:10:58 storzilla bazarr[18535]: 2020-04-27 19:10:58,468 - root                             (7f673f53e700) :  INFO (main:243) - Bazarr is being restarted...
Apr 27 19:11:02 storzilla bazarr[18535]: 2020-04-27 19:11:02,661 - root                             (7fbb811d8740) :  INFO (main:2243) - BAZARR is started and waiting for request on http://0.0.0.0:6767/
^C
scottrus@storzilla:/opt/bazarr$ ps aux | grep bazarr
bazarr   18535  0.0  0.0  38960  9864 ?        Ss   14:15   0:00 /usr/bin/python3.8 /opt/bazarr/bazarr.py
bazarr   18540  0.7  0.0      0     0 ?        Z    14:15   2:12 [python3.8] <defunct>
bazarr   19829  5.3  0.5 1037748 80600 ?       Sl   19:11   0:00 /usr/bin/python3.8 -u /opt/bazarr/bazarr/main.py
scottrus 19859  0.0  0.0  13132  1092 pts/0    S+   19:11   0:00 grep bazarr

Recreate was straight forward:

  1. Check for defunct process
  2. Modify README.md
  3. git commit -a -m 'updated README.md'
  4. Tasks -> Update Bazarr from source on Github
  5. check for defunct process

Following that clue.. even easier, just hit the restart button in the UI

  1. Click on System
  2. Click on Restart
  3. Check for defunct process

Should be all good now in dev branch! Please confirm.

The fix works! Thank you for the quick reply!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vkojchevski picture vkojchevski  路  7Comments

JagandeepBrar picture JagandeepBrar  路  5Comments

zandadoum picture zandadoum  路  6Comments

claym picture claym  路  3Comments

hawkash picture hawkash  路  7Comments