Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Potential memory leak in native watcher #71

Open
@Arcanemagus

Description

@Arcanemagus

Description

There might be a very slow memory leak in the native watcher.

Steps to Reproduce

  1. 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.

Native watcher console log.
Polling watcher console log (for comparison).

Reproduces how often:

Unknown, will update this issue if I see it again (and remember).

Versions

smashwilson/watcher-stress@5b969c2
@atom/[email protected]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions