You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
There might be a very slow memory leak in the native watcher.
Steps to Reproduce
Leave the native watcher running for over an hour.
Expected behavior:
No slow memory leak.
Actual behavior:
From the memory usage reported in the console log it appears that there is a slow memory leak in the native watcher, gaining 2.04 MiB over 18 hours.
main.log:
[ ..\src\log.cpp: 38] FileLogger opened.
[ ..\src\hub.cpp:114] Sending command [Message [CommandPayload id 1 log to file C:\Users\abneyl\watcher-logs\native\worker.log]] to Thread[worker thread].
[ ..\src\hub.cpp:114] Sending command [Message [CommandPayload id 2 log to file C:\Users\abneyl\watcher-logs\native\polling.log]] to Thread[polling thread].
[..\src\thread.cpp: 95] Processing offline command: [CommandPayload id 2 log to file C:\Users\abneyl\watcher-logs\native\polling.log].
[..\src\thread.cpp: 97] Result: OK.
[ ..\src\hub.cpp:143] Received ack message [Message [AckPayload ack 2]].
[ ..\src\hub.cpp:143] Received ack message [Message [AckPayload ack 1]].
[ ..\src\hub.cpp:114] Sending command [Message [CommandPayload id 3 add Z:\projects\foo\bar at channel 1]] to Thread[worker thread].
[ ..\src\hub.cpp:143] Received ack message [Message [AckPayload ack 3]].
worker.log:
[ ..\src\log.cpp: 38] FileLogger opened.
[..\src\worker\windows\windows_worker_platform.cpp:141] Added directory root Z:\projects\foo\bar at channel 1.
[..\src\worker\windows\subscription.cpp: 54] Scheduling the next change callback for channel 1.
[..\src\worker\windows\windows_worker_platform.cpp:206] Attempting to revert to a network-friendly buffer size.
[..\src\worker\windows\subscription.cpp: 54] Scheduling the next change callback for channel 1.
As a note, a second instance was showing the same behavior, but after 1.05 days it dropped from 25.62 MiB to 19.34 MiB, so something got cleaned up. It then resumed slowly gaining memory again.
Ah, I was assuming it was measuring the memory of the actual watcher in question. If it's the entire usage of watcher-stress then that being GC definitely sounds plausible.
So it might even be measuring the wrong things... ?
At the least, I was assuming wrong in what was being measured 😛.
Activity
Arcanemagus commentedon Oct 25, 2017
As a note, a second instance was showing the same behavior, but after 1.05 days it dropped from 25.62 MiB to 19.34 MiB, so something got cleaned up. It then resumed slowly gaining memory again.
smashwilson commentedon Nov 12, 2017
You know, I wonder if this is just GC running. I don't currently do anything to trigger GC in watcher-stress.
Arcanemagus commentedon Nov 12, 2017
It's certainly possible, is the memory reporting
watcher-stress, or the actual watcher's usage?smashwilson commentedon Nov 12, 2017
It's
watcher-stress, and it just usesprocessmethods to measure. So it might even be measuring the wrong things... ?Arcanemagus commentedon Nov 13, 2017
Ah, I was assuming it was measuring the memory of the actual
watcherin question. If it's the entire usage ofwatcher-stressthen that being GC definitely sounds plausible.At the least, I was assuming wrong in what was being measured 😛.