Skip to content

[Bug] CAPTURE_BUFFER percentage value causes silent startup hang on macOS #19340

@SamuelXingCheng

Description

@SamuelXingCheng

Describe the bug
When setting CAPTURE_BUFFER 10% in maltrail.conf on macOS, the server hangs silently during startup — no error message is shown.

How To Reproduce
Steps to reproduce the behavior:

  1. Clone the repository on macOS
  2. Set CAPTURE_BUFFER 10% in maltrail.conf
  3. Run the server: sudo python3 server.py --debug
  4. Server outputs nothing after config load

Expected behavior
The server should either:

  • successfully parse the percentage on macOS, or
  • fail gracefully with an error message when unable to determine total physical memory.

Screenshots
Not applicable, but terminal log looks like this:
[!] unable to determine total physical memory. Please use absolute value for 'CAPTURE_BUFFER'

Environment

  • Device: MacBook Pro (Intel)
  • OS: macOS 10.15.7
  • Type of Maltrail installation: git clone
  • Problematic component: server
  • Maltrail version: v0.84
  • python-pcapy-ng version: 1.0.9
  • Python version: 3.9.13 (inside virtualenv)

Workaround
Setting an absolute value in the config resolves the issue:
CAPTURE_BUFFER 134217728

Additional context
Interestingly, the error message only appears after interrupting the server (e.g. Ctrl+C).
Until then, the program appears to hang silently.

This may mislead users into thinking something else is wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions