question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

status: leaves behind zombie (i.e. <defunct>) processes

See original GitHub issue

Description

I happened to run ps -e and noticed hundreds of process with command dvc <defunct>. I was able to reproduce in a clean shell with dvc status, with each call to dvc status leaving behind two zombies.

Reproduce

(HdEqokMk-py3.8) root@32381816d00a# ps -e
    PID TTY          TIME CMD
      1 ?        00:00:04 jupyter-lab
     54 pts/0    00:00:01 bash
     59 pts/0    00:00:00 poetry
     62 pts/1    00:00:01 bash
     69 pts/1    00:00:00 ps
(HdEqokMk-py3.8) root@32381816d00a# dvc status
WARNING: stage: 'data.dvc' is frozen. Its dependencies are not going to be shown in the status output.
discover@0:                                                                                                      
        changed deps:
                modified:           abcd
transform:
        changed deps:
                modified:           pyproject.toml
                modified:           abcd
                modified:           vendor
                modified:           data/schema.xlsx
        changed outs:
                modified:           build/datapackage.json
                modified:           build/abcd.csv
(HdEqokMk-py3.8) root@32381816d00a# ps -e
    PID TTY          TIME CMD
      1 ?        00:00:04 jupyter-lab
     54 pts/0    00:00:01 bash
     59 pts/0    00:00:00 poetry
     62 pts/1    00:00:01 bash
     78 ?        00:00:00 dvc <defunct>
     79 ?        00:00:00 dvc <defunct>
     82 pts/1    00:00:00 ps

Expected

No dvc <defunct> processes.

Environment information

I cannot reproduce this on macOS. I encountered this working out of a rootless docker container.

Output of dvc doctor:

DVC version: 2.7.4 (pip)
---------------------------------
Platform: Python 3.8.10 on Linux-5.11.0-27-generic-x86_64-with-glibc2.29
Supports:
        gdrive (pydrive2 = 1.10.0),
        http (aiohttp = 3.7.4.post0, aiohttp-retry = 2.4.5),
        https (aiohttp = 3.7.4.post0, aiohttp-retry = 2.4.5)
Cache types: symlink
Cache directory: fuse.glusterfs on glusteruser.domain.pub:/glusteruser
Caches: local
Remotes: gdrive, local, local
Workspace directory: ext4 on /dev/sda5
Repo: dvc, git

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
itcarrollcommented, Oct 22, 2021

Recommend closing as not a DVC issue. I have non DVC processes going undead on me now too. I suspect it’s rootlesskit…

1reaction
itcarrollcommented, Oct 19, 2021

Definitely, hours. But none since disabling core.analytics. I could try to isolate to docker container, or dvc remote, or something if it would help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

<defunct> processes remain behind - Unix Stack Exchange
Defnct (or zombie - that's where the Z comes from) processes can't be killed, the just linger in the process table until their...
Read more >
Zombie Processes and their Prevention - GeeksforGeeks
Zombie state: When a process is created in UNIX using fork() system call, the parent process is cloned. If the parent process calls...
Read more >
"run script" hook leaves behind defunct/zombie processes
So whenever the child process has exited, kea collects the status so that the process does not remain in defunct (zombie) state. This...
Read more >
How to identify and kill zombie/defunct processes in Linux ...
The process status becomes EXIT_ZOMBIE and the process parent is notified that its child process has died with the SIGCHLD signal.
Read more >
how to kill (or avoid) zombie processes with subprocess module
A zombie process is not a real process; it's just a remaining entry in the process table until the parent process requests the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found