-
Notifications
You must be signed in to change notification settings - Fork 113
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
Virtual memory leak on Linux? #48
Comments
If I do the same test on macOS, it seems to leak about 1MB a minute, which is much less noticeable. |
Do you have circular symlinks? My machine does this with nsfw when using it over a repo with circular symlinks on Linux. |
@jwulf good thought, but that does not seem to be the case. |
Is there any info on this? This is quite the issue, rendering this plugin not only entirely useless for production use but also a very high risk hazard.
|
Thanks for bringing this to my attention again. I will take a look at this to see if we can fix the leak. |
I believe I've sourced the memory leak in linux / os x, and it's because uv_thread_create does not create detached threads. |
It seems like it's very specific to pthread not being detached. I will patch this asap. |
@implausible many thanks for the fix! |
Hi,
OS: Ubuntu 16.04
node: v8.1.1
We use NSFW for our project . We have noticed an apparent virtual memory leak, at least on Linux. Digging some more, it seems that it's related to receiving NSFW events. Note that the resident memory does not seem to increase much.
I was able to reproduce the issue, using a slightly modified version of your readme example. I have changed the watched directory to
/tmp/
and removedwatcher1.stop()
, so that the program doesn't exit after receiving the first event.Then I added an "event generator" script, that appends to a file 100 times a second, under the watched directory. (lower append speed also triggers leak, but not as fast):
When we start the watcher program, node reports that ~1 GB of virtual memory is used. When we then start generating events using the script above, the reported virtual memory increases at a rate of about 1GB a minute (up-to 256GB if we leave it run long enough)
Am I doing something wrong in the code above or does this look like a bug?
The text was updated successfully, but these errors were encountered: