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 Mar 3, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Massive memory leak when opening projects with symlink loops #15966
Hi!
First of I know this sounds silly, but I experience this problem only when opening one of my projects, so bear with me.
When opening a checkout of my project (https://github.com/thetechnick/nginx-ingress) project folder in the size range of >150MB atoms memory consumption is rising constantly at about ~30 MiB per second until it reaches around 14GB and freezes my system.
First I suspected the golang plugin go-plus and ide-go, but now I have disabled all community packages and the atom-fuzzyfinder and the issue still occurs. (same for --safe and --clear-window-state
I have done a short CPU Profile in Chrome, but it shows nothing I can identify as a Problem: CPU-20171022T113255.zip
Steps to Reproduce
Open the project
Look at the top/the gnome taks thingy or whatever shows the amount of memory atom uses
Actual behavior: Atom allocates ~30 MiB of memory per second until it crashes the system
Reproduces how often: 15~20 times before opening this issue
Versions
OS: Fedora 26
atom --version
Atom : 1.21.1
Electron: 1.6.15
Chrome : 56.0.2924.87
Node : 7.4.0
Does anything happen if you disable the github package? It's interesting that clear-window-state didn't fix it, which means Atom is reacting badly to something in the repo itself rather than having some incorrect state stored.
Strange, I just cloned a fresh copy of the repo to /tmp/repo and now memory is back to normal...
@50Wliu Can I upload something to make debugging this easier?
I did some more testing, the issue only occurs after installing the project dependencies into the /vendor folder. When deleting the folder atom stays at normal memory usage.
When opening this folder in atom 1.21.1, it will not stop allocating memory until the system limit is reached.
I still run atom with the plugins listed above. --safe and --clear-window-state make no difference.
I am also experiencing this issue in 64-bit Arch Linux. In my case the leak is even faster, about 100MiB/second, and again it is causing a total system crash when it reaches the limit.
Downgrading from 1.21.1 to 1.20.1 fixes the issue.
@thetechnick I can't reproduce this (just cloned your project, opened it in Atom and opened a couple of files). Are there some other steps you can provide? Do I need to install dependencies or something?
Sorry, just saw your later comment about the vendor folder. Testing with your .zip file now....
EDIT - I still can't reproduce it on macOS, even with the vendor folder from your test.zip file copied into the repository. Maybe it's linux-specific somehow?
Hi!
I have attached a zip in my previous comment. The memory bug only occures
afer installing the dependencies or on other very large projects I can not
share.
I will update the issue title and description when i am back at work.
When I opened this issue I could only reproduce this on my project.
Max Brunsfeld <[email protected]> schrieb am Mo., 23. Okt. 2017,
21:41:
I'm having the same issue with Atom 1.21.1, but not 1.21.0. It consumes ~200% cpu and memory until the system locks up and the OOM killer kicks in. It still happens when running atom --safe. All my loaded projects are proprietary, so I doubt it's a specific project.
Versions
OS: Ubuntu 17.04/17.10 (occurred before and after upgrade)
atom --version
Atom : 1.21.1
Electron: 1.6.15
Chrome : 56.0.2924.87
Node : 7.4.0
@stefanb2 That is disconcerting. Can you distill a simple example of the symlink structure that is causing your problem. @ungb@Ben3eeE Could you help trying to reproduce this issue on Linux?
@Ben3eeE Thanks for that information. So @stefanb2 is the problem only happening when recursive links are created while Atom is already running? Perhaps my fix missed the case where new links are introduced, though I'm not sure how yet.
When I add that directory as project folder to atom, the CPU usage jumps to 100%. Actually Atom UI freezes and doesn't even show the project folder in the pane. After restarting Atom the folder shows up in the project pane.
@stefanb2 I'm having a hard time reproducing the issue. I recorded a screen capture of me following what I think are your described reproduction steps. Is there something I'm missing? Sorry this is such a hassle.
@stefanb2 Ugh. I made a stupid mistake that caused us not to require the fixed version of our path watching library. Extremely sorry for the noise everyone. I tested the library itself on the VM but not the final packaged version of Atom. This will have to go out as another fix. I'll be sure to test the full bundle this time and also ask @Ben3eeE verify it as well.
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!
Activity
winstliu commentedon Oct 22, 2017
Does anything happen if you disable the
githubpackage? It's interesting that clear-window-state didn't fix it, which means Atom is reacting badly to something in the repo itself rather than having some incorrect state stored.thetechnick commentedon Oct 22, 2017
@50Wliu Hi, great response time!
I disabled the
githubpackage, but its still the same (killed atom at 1GB)Edit:
apm lsthetechnick commentedon Oct 22, 2017
Strange, I just cloned a fresh copy of the repo to
/tmp/repoand now memory is back to normal...@50Wliu Can I upload something to make debugging this easier?
winstliu commentedon Oct 22, 2017
I don't know much about debugging, but it seems like "Record Allocation Timeline/Profile" are listed as helpful in solving memory leaks?
thetechnick commentedon Oct 22, 2017
I did some more testing, the issue only occurs after installing the project dependencies into the
/vendorfolder. When deleting the folder atom stays at normal memory usage.An example is uploaded here, so it is simpler to reproduce:
https://drive.google.com/file/d/0ByW_Oz6LLJGWVVAwbUdoS3pwS00/view?usp=sharing
When opening this folder in atom 1.21.1, it will not stop allocating memory until the system limit is reached.
I still run atom with the plugins listed above.
--safeand--clear-window-statemake no difference.daveshah1 commentedon Oct 22, 2017
I am also experiencing this issue in 64-bit Arch Linux. In my case the leak is even faster, about 100MiB/second, and again it is causing a total system crash when it reaches the limit.
Downgrading from 1.21.1 to 1.20.1 fixes the issue.
joerg-krause commentedon Oct 23, 2017
Same here on 64-bit Arch Linux with version 1.21.1.
winstliu commentedon Oct 23, 2017
@daveshah1 @joerg-krause are you two using the same project that @thetechnick is? If not, are there any similarities?
joerg-krause commentedon Oct 23, 2017
@50Wliu No, I am not using the same project. I am using a quite large project with several of thousands files. Furthermore, it is a git project.
maxbrunsfeld commentedon Oct 23, 2017
@thetechnick I can't reproduce this (just cloned your project, opened it in Atom and opened a couple of files). Are there some other steps you can provide? Do I need to install dependencies or something?Sorry, just saw your later comment about the
vendorfolder. Testing with your.zipfile now....EDIT - I still can't reproduce it on macOS, even with the
vendorfolder from yourtest.zipfile copied into the repository. Maybe it's linux-specific somehow?thetechnick commentedon Oct 24, 2017
[-]Massive memory leak when opening my project[/-][+]Massive memory leak when opening large projects[/+]dbstraffin commentedon Oct 24, 2017
I'm having the same issue with Atom 1.21.1, but not 1.21.0. It consumes ~200% cpu and memory until the system locks up and the OOM killer kicks in. It still happens when running
atom --safe. All my loaded projects are proprietary, so I doubt it's a specific project.Versions
OS: Ubuntu 17.04/17.10 (occurred before and after upgrade)
atom --version
Atom : 1.21.1
Electron: 1.6.15
Chrome : 56.0.2924.87
Node : 7.4.0
apm --version
apm 1.18.5
npm 3.10.10
node 6.9.5 x64
python 2.7.14
git 2.14.1
dbstraffin commentedon Oct 24, 2017
The issue stops when i change the filesystem watcher from native to emulated. It starts back up when i switch back to native.
25 remaining items
nathansobo commentedon Nov 1, 2017
@stefanb2 That is disconcerting. Can you distill a simple example of the symlink structure that is causing your problem. @ungb @Ben3eeE Could you help trying to reproduce this issue on Linux?
Ben3eeE commentedon Nov 1, 2017
@nathansobo We have some information from @stefanb2 through the duplicate issue already /cc: #16011 (comment)
nathansobo commentedon Nov 1, 2017
@Ben3eeE Thanks for that information. So @stefanb2 is the problem only happening when recursive links are created while Atom is already running? Perhaps my fix missed the case where new links are introduced, though I'm not sure how yet.
stefanb2 commentedon Nov 1, 2017
No, the file system structure already exists when I start atom.
Maybe this will help you to reproduce the issue:
atom --safe --clear-window-state: everything is fineatom --safe --clear-window-state: everything is finecreate-file-system-loops.shin an empty directoryIt may be that it is possible to recreate the issue with only one link loop, as all of them look the same i.e.
xyz -> .stefanb2 commentedon Nov 1, 2017
I simplified the reproducer to two symbolic links:
When I add that directory as project folder to atom, the CPU usage jumps to 100%. Actually Atom UI freezes and doesn't even show the project folder in the pane. After restarting Atom the folder shows up in the project pane.
nathansobo commentedon Nov 1, 2017
@stefanb2 I'm having a hard time reproducing the issue. I recorded a screen capture of me following what I think are your described reproduction steps. Is there something I'm missing? Sorry this is such a hassle.
nathansobo commentedon Nov 1, 2017
Apparently @Ben3eeE can reproduce the issue so I'll work with him to straighten myself out.
nathansobo commentedon Nov 1, 2017
Okay, I'm reproducing it now. Not sure hat was going on before.
stefanb2 commentedon Nov 1, 2017
@nathansobo you need to create the symbolic links before starting atom. But I guess you already figured that out by yourself :-)
nathansobo commentedon Nov 1, 2017
@stefanb2 Ugh. I made a stupid mistake that caused us not to require the fixed version of our path watching library. Extremely sorry for the noise everyone. I tested the library itself on the VM but not the final packaged version of Atom. This will have to go out as another fix. I'll be sure to test the full bundle this time and also ask @Ben3eeE verify it as well.
Ben3eeE commentedon Nov 1, 2017
✨
stefanb2 commentedon Nov 8, 2017
I can no longer reproduce the issue with 1.22.0. Thanks.
lock commentedon May 7, 2018
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!