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

On Windows agent fails to acquire lock in case lock was not released properly (possibly by other agent)

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Major Major
    • 3.0.0alpha5
    • 2.2.10
    • Agent (G)
    • Windows Server 2008.

      See sub-issue (133) of ZBXNEXT-1263, ZBX-10034.

      Description

      Agents will not start In case of ...

      • ... multiple agents running on the same Windows host...
      • ... in the same session (e.g. the same user or as a service) ...
      • ... if one of them fails or is closed while it has acquired some lock (for example logging lock).

      Workarounds

      • full system reboot;
      • closing all Zabbix agents running in the affected session, waiting for Windows to remove the unused lock, then starting agents again.

      Analysis

      __zbx_mutex_lock() doesn't handle explicitly the WAIT_ABANDONED result from WaitForSingleObject() but instead exits.

      More info on mutexes in Windows.

      Important:

      • lock namespaces are per-session (session 0 for services, other sessions - for users);
      • contrary to SysV locks - Windows keeps track of users and removes the lock if it's unreferenced by any thread in the session.

        1. abandoned.patch
          0.8 kB
          Sandis Neilands

            Unassigned Unassigned
            sandis.neilands Sandis Neilands (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: