Skip to content

[Bug]: jean-server --headless accumulates zombie node-MainThread processes on Ubuntu #696

Description

@rchrdkvcs

Describe the issue

Summary

When running jean-server directly on an Ubuntu host in headless mode through systemd, zombie processes progressively accumulate under the main jean-server process.

The zombies appear as (node-MainThread) processes in pstree, and their number continues to grow while the server is running.

Environment

  • Jean version: 0.1.72
  • OS: Ubuntu 24.04.4 LTS (Noble Numbat)
  • Kernel: 6.8.0-138-generic
  • Architecture: x86_64
  • Runtime: Native Linux host, not Docker
  • Launch method: systemd
  • Command: /usr/local/bin/jean-server --headless

Systemd unit

[Unit]
Description=Jean headless server
Documentation=https://github.com/coollabsio/jean
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=rchrdkvcs
Group=rchrdkvcs
EnvironmentFile=-/etc/jean-server.env
ExecStart=/usr/local/bin/jean-server --headless
Restart=on-failure
RestartSec=5
TimeoutStopSec=20

[Install]
WantedBy=multi-user.target

Actual behavior

jean-server remains the parent of a growing list of zombie node-MainThread processes:

root@home:~# pstree -aps 1338
systemd,1
  └─jean-server,1338 --headless
      ├─bash,210284
      ├─(node-MainThread,6183)
      ├─(node-MainThread,22303)
      ├─(node-MainThread,22624)
      ├─(node-MainThread,24656)
      ├─(node-MainThread,43025)
      ├─(node-MainThread,43193)
      ├─(node-MainThread,61709)
      ├─(node-MainThread,62464)
      ├─(node-MainThread,80221)
      ├─(node-MainThread,80947)
      ├─(node-MainThread,98609)
      ├─(node-MainThread,99430)
      ├─...
      ├─(node-MainThread,4181055)
      ├─{jean-server},1363
      ├─{jean-server},1364
      └─{jean-server},210285

The complete output contains a very large number of (node-MainThread) entries. In pstree, the parentheses indicate zombie processes.

Expected behavior

Child processes spawned by jean-server should be properly reaped after they exit. The number of zombie processes should not grow indefinitely during normal operation.

Investigation requested

Please investigate the child-process lifecycle and process reaping in headless mode, especially whether exited node-MainThread child processes are correctly handled and waited for by the server process.

Replication

  1. Install and run jean-server directly on an Ubuntu host.
  2. Start it in headless mode as a systemd service.
  3. Leave the service running.
  4. Inspect the process tree periodically:
pstree -aps "$(pgrep -xo jean-server)"
ps -eo pid,ppid,user,stat,comm,args | awk '$4 ~ /^Z/'

How are you running Jean?

Headless

Operating system

Ubuntu 24.04 - Server

Jean version

0.1.72

How are you interacting with Jean?

Via the web

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions