ArchiveTeam / warrior-dockerfile

A Dockerfile for the ArchiveTeam Warrior
306 stars 57 forks source link

Zombie wget-at and curl processes #87

Open cdzombak opened 4 months ago

cdzombak commented 4 months ago

After running Warrior in Docker for a couple weeks, I noticed a large number (>1800) of zombie processes on my server.

These are curl and wget-at instances that I traced back to ArchiveTeam Warrior. A sample:

…
cdzombak  670782  0.0  0.0      0     0 ?        Z    Jul30   0:00      \_ [wget-at] <defunct>
cdzombak  671093  0.0  0.0      0     0 ?        Z    Jul30   0:00      \_ [wget-at] <defunct>
cdzombak  671957  0.0  0.0      0     0 ?        Z    Jul30   0:00      \_ [wget-at] <defunct>
cdzombak  672247  0.0  0.0      0     0 ?        Z    Jul30   0:00      \_ [wget-at] <defunct>
cdzombak  672484  0.0  0.0      0     0 ?        Z    Jul30   0:00      \_ [wget-at] <defunct>
cdzombak  672878  0.0  0.0      0     0 ?        Z    Jul30   0:00      \_ [wget-at] <defunct>
cdzombak  673095  0.0  0.0      0     0 ?        Z    Jul30   0:00      \_ [wget-at] <defunct>
…
cdzombak  670960  0.0  0.0      0     0 ?        Z    Jul30   0:00      \_ [curl] <defunct>
cdzombak  674664  0.0  0.0      0     0 ?        Z    Jul30   0:00      \_ [curl] <defunct>
cdzombak  676110  0.0  0.0      0     0 ?        Z    Jul30   0:00      \_ [curl] <defunct>
cdzombak  677882  0.0  0.0      0     0 ?        Z    Jul30   0:00      \_ [curl] <defunct>
cdzombak  680172  0.0  0.0      0     0 ?        Z    Jul30   0:00      \_ [curl] <defunct>
cdzombak  683753  0.0  0.0      0     0 ?        Z    Jul30   0:00      \_ [curl] <defunct>
cdzombak  685059  0.0  0.0      0     0 ?        Z    Jul30   0:00      \_ [curl] <defunct>
cdzombak  686465  0.0  0.0      0     0 ?        Z    Jul30   0:00      \_ [curl] <defunct>
cdzombak  688020  0.0  0.0      0     0 ?        Z    Jul30   0:00      \_ [curl] <defunct>
cdzombak  689696  0.0  0.0      0     0 ?        Z    Jul30   0:00      \_ [curl] <defunct>
…

My docker-compose file:

---
services:
  archiveTeamWarrior:
    image: atdr.meo.ws/archiveteam/warrior-dockerfile
    container_name: archiveTeamWarrior
    hostname: archiveTeamWarrior
    ports:
      - "9050:8001"
    labels:
      com.centurylinklabs.watchtower.enable: "true"
    restart: unless-stopped
    environment:
      - DOWNLOADER=<omitted>
      - SELECTED_PROJECT=auto

OS: Ubuntu 22.04.4 LTS Docker: version 27.0.3, build 7d4bcd8

kostirez1 commented 2 months ago

Seems to me like these could belong to the healthcheck defined in the Dockerfile:

HEALTHCHECK --interval=5s --timeout=3s CMD /home/warrior/data/wget-at -nv -t1 'http://localhost:8001/index.html' -O /dev/null || exit 1

Two healthchecks failed for me:

screenshot

And the two processes can be seen under the running container, under the python start.py

screenshot

Afaik python start.py (PID 1 in the container) is supposed to reap them, but never does.