Skip to content

[Bug]: Netdata Docker container leaves zombie processes #20565

@Pocok5

Description

@Pocok5

Bug description

The netdata docker container (running on Ubuntu Server 24.04 LTS, in docker swarm mode) leaves behind a number of zombie processes:

$ ps axo stat,ppid,pid,comm,start | grep 6025
Ssl     6001    6025 netdata           Jun 23
S       6025    9266 spawn-plugins     Jun 23
Z       6025   11522 health.sh         Jun 23
Z       6025   18365 sh                Jun 23
Z       6025  342548 sh              16:16:03
Z       6025  473491 spawn-unnamed   18:44:47
Z       6025  673739 sh              22:16:04
Z       6025 1004842 sh              04:16:05
Z       6025 1157417 spawn-unnamed   07:01:38
Z       6025 1166476 spawn-unnamed   07:09:12
Z       6025 1170218 spawn-unnamed   07:12:14
Z       6025 1207440 spawn-unnamed   07:43:43
Z       6025 1221447 spawn-unnamed   07:56:29
Z       6025 1234198 spawn-unnamed   08:07:44
Z       6025 1262605 spawn-unnamed   08:33:24
Z       6025 1270860 spawn-unnamed   08:40:41
Z       6025 1284778 spawn-unnamed   08:52:21
Z       6025 1319551 spawn-unnamed   09:22:26
Z       6025 1325545 spawn-unnamed   09:27:28
Z       6025 1328158 spawn-unnamed   09:29:51
Z       6025 1333910 spawn-unnamed   09:35:01
Z       6025 1346474 spawn-unnamed   09:46:29
Z       6025 1365176 spawn-unnamed   10:03:05
Z       6025 1370745 spawn-unnamed   10:08:16
Z       6025 1374758 spawn-unnamed   10:11:38
Z       6025 1379676 sh              10:16:06
Z       6025 1405872 spawn-unnamed   10:39:25
Z       6025 1425941 spawn-unnamed   10:57:15
Z       6025 1430334 spawn-unnamed   11:01:07
Z       6025 1461168 spawn-unnamed   11:29:23
Z       6025 1462779 spawn-unnamed   11:30:43
Z       6025 1467598 spawn-unnamed   11:35:02
Z       6025 1476938 spawn-unnamed   11:43:31

Expected behavior

The container should properly handle its child processes.

Steps to reproduce

  1. Run the netdata container in docker swarm

Installation method

docker

System info

Linux ubuntuserver 6.8.0-62-generic #65-Ubuntu SMP PREEMPT_DYNAMIC Mon May 19 17:15:03 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
/etc/lsb-release:DISTRIB_ID=Ubuntu
/etc/lsb-release:DISTRIB_RELEASE=24.04
/etc/lsb-release:DISTRIB_CODENAME=noble
/etc/lsb-release:DISTRIB_DESCRIPTION="Ubuntu 24.04.2 LTS"
/etc/os-release:PRETTY_NAME="Ubuntu 24.04.2 LTS"
/etc/os-release:NAME="Ubuntu"
/etc/os-release:VERSION_ID="24.04"
/etc/os-release:VERSION="24.04.2 LTS (Noble Numbat)"
/etc/os-release:VERSION_CODENAME=noble
/etc/os-release:ID=ubuntu
/etc/os-release:ID_LIKE=debian
/etc/os-release:UBUNTU_CODENAME=noble
/etc/os-release:LOGO=ubuntu-logo

Netdata build info

time=2025-06-24T12:26:34.032Z comm=netdata source=daemon level=notice errno="2, No such file or directory" tid=28488  msg="CONFIG: cannot load user config '/etc/netdata/stream.conf'. Will try stock config."
Packaging:
    Netdata Version ____________________________________________ : v2.5.3
    Installation Type __________________________________________ : oci
    Package Architecture _______________________________________ : x86_64
    Package Distro _____________________________________________ : unknown
    Configure Options __________________________________________ : cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_STANDARD=11 -DCMAKE_CXX_STANDARD=14 -DBUILD_SHARED_LIBS= -DCMAKE_C_FLAGS='-ffunction-sections -fdata-sections -O2 -funroll-loops -pipe -fexceptions -fstack-protector-strong -D_FORTIFY_SOURCE=3 -fstack-clash-protection -fcf-protection=full -Wno-builtin-macro-redefined -fexceptions -fno-omit-frame-pointer -funwind-tables -fasynchronous-unwind-tables' -DCMAKE_CXX_FLAGS=' -ffunction-sections -fdata-sections -O2 -funroll-loops -pipe -fexceptions -fstack-protector-strong -D_FORTIFY_SOURCE=3 -fstack-clash-protection -fcf-protection=full -Wno-builtin-macro-redefined -fexceptions -fno-omit-frame-pointer -funwind-tables -fasynchronous-unwind-tables' -DCMAKE_COMPILE_DEFINITIONS='_GNU_SOURCE' -DCMAKE_EXE_LINKER_FLAGS='-Wl,--gc-sections -fexceptions -fstack-protector-strong -D_FORTIFY_SOURCE=3 -fstack-clash-protection -fcf-protection=full -Wno-builtin-macro-redefined -fexceptions -rdynamic' -DCMAKE_SHARED_LINKER_FLAGS='-Wl,--gc-sections'
Default Directories:
    User Configurations ________________________________________ : /etc/netdata
    Stock Configurations _______________________________________ : /usr/lib/netdata/conf.d
    Ephemeral Databases (metrics data, metadata) _______________ : /var/cache/netdata
    Permanent Databases ________________________________________ : /var/lib/netdata
    Plugins ____________________________________________________ : /usr/libexec/netdata/plugins.d
    Static Web Files ___________________________________________ : /usr/share/netdata/web
    Log Files __________________________________________________ : /var/log/netdata
    Lock Files _________________________________________________ : /var/lib/netdata/lock
    Home _______________________________________________________ : /var/lib/netdata
Operating System:
    Kernel _____________________________________________________ : Linux
    Kernel Version _____________________________________________ : 6.8.0-62-generic
    Operating System ___________________________________________ : Ubuntu
    Operating System ID ________________________________________ : ubuntu
    Operating System ID Like ___________________________________ : debian
    Operating System Version ___________________________________ : 24.04.2 LTS (Noble Numbat)
    Operating System Version ID ________________________________ : 12
    Detection __________________________________________________ : /host/etc/os-release
Hardware:
    CPU Cores __________________________________________________ : 12
    CPU Frequency ______________________________________________ : 3600000000
    RAM Bytes __________________________________________________ : 16682082304
    Disk Capacity ______________________________________________ : 4500905730048
    CPU Architecture ___________________________________________ : x86_64
    Virtualization Technology __________________________________ : none
    Virtualization Detection ___________________________________ : none
Container:
    Container __________________________________________________ : docker
    Container Detection ________________________________________ : dockerenv
    Container Orchestrator _____________________________________ : none
    Container Operating System _________________________________ : Debian GNU/Linux
    Container Operating System ID ______________________________ : debian
    Container Operating System ID Like _________________________ : unknown
    Container Operating System Version _________________________ : 12 (bookworm)
    Container Operating System Version ID ______________________ : 12
    Container Operating System Detection _______________________ : /etc/os-release
Features:
    Built For __________________________________________________ : Linux
    Netdata Cloud ______________________________________________ : YES
    Health (trigger alerts and send notifications) _____________ : YES
    Streaming (stream metrics to parent Netdata servers) _______ : YES
    Back-filling (of higher database tiers) ____________________ : YES
    Replication (fill the gaps of parent Netdata servers) ______ : YES
    Streaming and Replication Compression ______________________ : YES (zstd lz4 gzip)
    Contexts (index all active and archived metrics) ___________ : YES
    Tiering (multiple dbs with different metrics resolution) ___ : YES (5)
    Machine Learning ___________________________________________ : YES
    Memory Allocator ___________________________________________ : system
Database Engines:
    dbengine (compression) _____________________________________ : YES (zstd lz4)
    alloc ______________________________________________________ : YES
    ram ________________________________________________________ : YES
    none _______________________________________________________ : YES
Connectivity Capabilities:
    ACLK (Agent-Cloud Link: MQTT over WebSockets over TLS) _____ : YES
    static (Netdata internal web server) _______________________ : YES
    h2o (web server) ___________________________________________ : NO
    WebRTC (experimental) ______________________________________ : NO
    Native HTTPS (TLS Support) _________________________________ : YES
    TLS Host Verification ______________________________________ : YES
Libraries:
    LZ4 (extremely fast lossless compression algorithm) ________ : YES
    ZSTD (fast, lossless compression algorithm) ________________ : YES
    zlib (lossless data-compression library) ___________________ : YES
    Brotli (generic-purpose lossless compression algorithm) ____ : NO
    protobuf (platform-neutral data serialization protocol) ____ : YES (system)
    OpenSSL (cryptography) _____________________________________ : YES
    libdatachannel (stand-alone WebRTC data channels) __________ : NO
    JSON-C (lightweight JSON manipulation) _____________________ : YES
    libcap (Linux capabilities system operations) ______________ : NO
    libcrypto (cryptographic functions) ________________________ : YES
    libyaml (library for parsing and emitting YAML) ____________ : YES
    libmnl (library for working with netfilter) ________________ : YES
    stacktraces (library for getting stack traces) _____________ : libbacktrace (mmap, threads, data)
Plugins:
    apps (monitor processes) ___________________________________ : YES
    cgroups (monitor containers and VMs) _______________________ : YES
    cgroup-network (associate interfaces to CGROUPS) ___________ : YES
    proc (monitor Linux systems) _______________________________ : YES
    tc (monitor Linux network QoS) _____________________________ : YES
    diskspace (monitor Linux mount points) _____________________ : YES
    freebsd (monitor FreeBSD systems) __________________________ : NO
    macos (monitor MacOS systems) ______________________________ : NO
    windows (monitor Windows systems) __________________________ : NO
    statsd (collect custom application metrics) ________________ : YES
    timex (check system clock synchronization) _________________ : YES
    idlejitter (check system latency and jitter) _______________ : YES
    bash (support shell data collection jobs - charts.d) _______ : YES
    debugfs (kernel debugging metrics) _________________________ : YES
    cups (monitor printers and print jobs) _____________________ : NO
    ebpf (monitor system calls) ________________________________ : NO
    freeipmi (monitor enterprise server H/W) ___________________ : YES
    network-viewer (monitor TCP/UDP IPv4/6 sockets) ____________ : YES
    systemd-journal (monitor journal logs) _____________________ : YES
    windows-events (monitor Windows events) ____________________ : NO
    nfacct (gather netfilter accounting) _______________________ : NO
    perf (collect kernel performance events) ___________________ : YES
    slabinfo (monitor kernel object caching) ___________________ : YES
    Xen ________________________________________________________ : NO
    Xen VBD Error Tracking _____________________________________ : NO
Exporters:
    AWS Kinesis ________________________________________________ : NO
    GCP PubSub _________________________________________________ : NO
    MongoDB ____________________________________________________ : YES
    Prometheus (OpenMetrics) Exporter __________________________ : YES
    Prometheus Remote Write ____________________________________ : YES
    Graphite ___________________________________________________ : YES
    Graphite HTTP / HTTPS ______________________________________ : YES
    JSON _______________________________________________________ : YES
    JSON HTTP / HTTPS __________________________________________ : YES
    OpenTSDB ___________________________________________________ : YES
    OpenTSDB HTTP / HTTPS ______________________________________ : YES
    All Metrics API ____________________________________________ : YES
    Shell (use metrics in shell scripts) _______________________ : YES
Debug/Developer Features:
    Trace All Netdata Allocations (with charts) ________________ : NO
    Developer Mode (more runtime checks, slower) _______________ : NO
Runtime Information:
    Profile ____________________________________________________ : standalone
    Stream Parent (accept data from Children) __________________ : NO
    Stream Child (send data to a Parent) _______________________ : NO
    Total System Memory ________________________________________ : 16682082304
    Available System Memory ____________________________________ : 8681177088

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdockerdocker related issues

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions