Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-10751

Modules should load after agent processes fork

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 3.0.2
    • Agent (G)

      Currently the Zabbix agent calls dlopen to load configured modules, before forking its worker processes. This works fine for single threaded modules but breaks any efforts to use multiple threads within a module as thread behavior after a fork is undefined.

      Instead, modules should be loaded after the fork of each working process that requires the module.

      Some work can be done in the module to overcome this (e.g. using IPC to talk to threads started in the parent PID by zbx_module_init) but sometimes there are third party libraries which are difficult to control (like Go) that spawn threads at dlopen which are required for normal operation in the child processes.

      This issue has been discussed by the Go team in the attached link.

            Unassigned Unassigned
            ryan.armstrong Ryan Armstrong
            Votes:
            4 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: