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)

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.10
    • Fix Version/s: 3.0.0alpha5
    • Component/s: Agent (G)
    • Labels:
    • Environment:
      Windows Server 2008.

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: