=> There are 90 zombie processes.

On one of my Homelab servers running Ubuntu Jammy, I always seem to get zombie processes. A quick check with ps -eo pid,ppid,stat,cmd | grep -w Z shows them all <defunct>. It just bugs me. I shut down the server in the most nicest of ways I know how with sudo shutdown -h now but I always get zombie processes shown on start up.

Am I missing something? Do these show up on your servers? How do you deal with them besides just ignoring them if they are <defunct>?

  • non_burglar@lemmy.world
    link
    fedilink
    English
    arrow-up
    9
    ·
    9 hours ago

    Zombies that stick around for more than a few seconds indicate a signal problem in the parent process, where its init is stuck in the “wait” state, so the entry remains in the PID table.

    It could be harmless, but it could become a problem if you need the resources. Curl shouldn’t be doing this on its own.

    • irmadlad@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      8 hours ago

      It could be harmless, but it could become a problem if you need the resources.

      That’s the thing. None of them are consuming resources. I guess I should just ignore them, but it irritates me when I start my server, to see zombie processes. Makes me think something is askew.

      • jj4211@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        4 hours ago

        Zombie processes do not use resources, well, a little, it’s basically an entry describing how it exited.

        The parent process is the thing keeping the zombie entry open. Killing it’s parent should work if they bother you.

        • non_burglar@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          3 hours ago

          Zombie processes do not use resources, well, a little, it’s basically an entry describing how it exited.

          Agreed, but a very poorly-written program having a hanging memory or disk write, or a file lock could become a problem, especially if hundreds or thousands of zombies are waiting for something.

      • GreenKnight23@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        7 hours ago

        that sounds like poor garbage collection in an application.

        I’ve written software that had similar issues when writing to files and I failed to “close” the file after writing.

        processes stay open, files stay open. 500 byte processes times 10000 orphaned process can make for a bad time.

  • folekaule@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    8 hours ago

    No idea about your specific case, but in the past when I’ve had frequent zombies it’s been due to some blocking network process; typically NFS mounts.

    They don’t use any resources, but I agree they’re annoying and could indicate some underlying issue.

    I would check for issues with I/O and network access, especially anything that happens at kernel level. Look for anything suspicious in dmesg.

  • tychosmoose@piefed.social
    link
    fedilink
    English
    arrow-up
    4
    ·
    9 hours ago

    Zero zombies here. I have a couple of Debian servers and one repeatedly upgraded Ubuntu on noble numbat that I’m too lazy to migrate to Debian. None have zombies.

    Do you run a DE? Mine are headless.

  • BakedCatboy@lemmy.ml
    link
    fedilink
    English
    arrow-up
    4
    ·
    9 hours ago

    I got a few on my laptop but none on either of my long running homelab boxes (70-80 days uptime). On my laptop they all seem related to espeak, the tts program. Is there any pattern in what processes yours are from?

    • irmadlad@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      9 hours ago

      my long running homelab boxes (70-80 days uptime)

      Ahh see I shut down my servers at night. I just couldn’t justify having them run while I was sleeping, and since I am the only user.

      • BakedCatboy@lemmy.ml
        link
        fedilink
        English
        arrow-up
        2
        ·
        6 hours ago

        Makes sense. I share my media library with 10-15 friends so there’s usually a few streams late at night, and scrubs, container updates, and backups run early morning at like 2-4am.

  • frongt@lemmy.zip
    link
    fedilink
    English
    arrow-up
    4
    ·
    9 hours ago

    I’ve never run into a situation where it’s a problem. But I just checked one of my Ubuntu servers and don’t have any. What were the processes doing? What do they belong to?