-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory Leak with procstat #6807
Comments
It looks like there are as many frees 16MB as allocs 16.1MB. What is the query behind |
I've been running this configuration for about 4 hours and I'm not seeing this pattern, however I don't have any real load on the system. Could you add the |
@danielnelson can do. Can I send it directly to you? |
Yes, email address is on my profile page. |
Can you show a couple hours of |
The RSS is rising but Go doesn't seem to know about it, I didn't see any interesting objects in the memory profiles either. Just thinking aloud but could it be lost to Go or maybe it is leaked in a dll call, I'm not sure. I'm unable to replicate as well even when spawning new processes on the system. Do you know if this is a new issue with Telegraf 1.13? Could you compare against 1.12.6 and 1.11.5? |
So far, looking across our different instances of windows, I've only seen this occur on windows server 2016. |
Related? go-ole/go-ole#135 |
What should I be looking at here? |
Just trying to find a way to capture the difference in DLL's in use between 2016 and not-2016. |
I'm going to try installing WMF 5.1 to see if it causes the error as suggested in go-ole/go-ole#135 (comment). |
Quick update, I installed WMF 5.1 on a Windows 2012 (non-R2) box, and it didn't cause the memory leak. |
Same on my Windows 7 system, WMF 5.1 had no effect. |
I have been able to reproduce this on a Windows 2016 VM running in Azure. Will update if I can find a way to reduce or eliminate the leaked memory. |
@danielnelson how does win_proc access WMI metrics? We have fixed the issue by calling CoInitializeEx once per thread to avoid the leak from happening when using WMI metrics in our code, instead of calling it once per WMI query. |
@danielnelson Looks like datadog had the same issue with their WMI sampler DataDog/integrations-core#3987 which tells clearly that this issue is with Windows 2016 memory leak when calling CoInitalize for each WMI query. After reviewing the code for telegraf it seems like you rely on win_pdh library that does the actual Win32 calls, and I couldn't find the call to the CoInitalize so I'm not sure how to help. |
any update? @danielnelson |
Can you retest with this build telegraf-1.15.0~d78dfac1_windows_amd64.zip? |
Will do! |
Looks like this has been resolved, the WMI leak is gone on Windows Server 2016! 48 hours running with 1.12.6: 24 hours running with 1.15.0: thank you @danielnelson what's the eta on 1.15.0? |
Great news, thanks for testing. I expect 1.15.0 to be released sometime in the first half of July. |
Relevant telegraf.conf:
System info:
Steps to reproduce:
No special steps, memory leak appears to be related to procstat input plugin:
The text was updated successfully, but these errors were encountered: