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

Possible file handle leak if vfs.dir.count times out

    Details

    • Type: Problem report
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 4.0.2, 4.2.0alpha1, 4.2 (plan)
    • Fix Version/s: 4.0.4rc1, 4.2.0alpha2, 4.2 (plan)
    • Component/s: Agent (G)
    • Labels:
      None
    • Team:
      Team A
    • Sprint:
      Sprint 46, Nov 2018, Sprint 47, Dec 2018
    • Story Points:
      2

      Description

      This ticket is created due to comment

      Current suspicion is that handle leak happen when thread is killed by timeout while handle is still open. It should be considered to terminate thread differently as per windows documented better solution:

      The TerminateThread and TerminateProcess functions should be used only in extreme circumstances, since they do not allow threads to clean up, do not notify attached DLLs, and do not free the initial stack. In addition, handles to objects owned by the thread are not closed until the process terminates. The following steps provide a better solution:

      Create an event object using the CreateEvent function.
      Create the threads.
      Each thread monitors the event state by calling the WaitForSingleObject function. Use a wait time-out interval of zero.
      Each thread terminates its own execution when the event is set to the signaled state (WaitForSingleObject returns WAIT_OBJECT_0).

        Attachments

          Activity

            People

            • Assignee:
              asitals Andrejs Sitals
              Reporter:
              vso Vladislavs Sokurenko
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: