Navigation Menu

Skip to content
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? #863

Closed
benmosher opened this issue Jun 2, 2017 · 13 comments
Closed

memory leak? #863

benmosher opened this issue Jun 2, 2017 · 13 comments

Comments

@benmosher
Copy link
Member

when upgrading from v1.14.0 to v2.4.0, I can no longer lint my work project without out-of-memory crashing.

needs investigation.

@benmosher
Copy link
Member Author

mmm, appears to be introduced by #839 pr. some relative path must be part of the cache key for module cache now

@sompylasar
Copy link
Contributor

I've linted a large enough project with my fork just fine. What relative paths are you talking about? Please give an example.

@sompylasar
Copy link
Contributor

@benmosher, upgrading from v1.14.0 to v2.4.0 is quite a big upgrade, are you sure it's not caused by anything else? Have you tried v2.3.0 with success? I don't see how the parserOptions could be a part of the utils/resolve cache key we were talking about here. Please help to investigate by printing out this cacheKey and settings in the project you're seeing issues with.

@benmosher
Copy link
Member Author

I tried 2.3.0 with the previous utils version and did not see the issue. thus my suspicion that the utils bump is what killed it.

I need to look more closely and understand what the issue was, for sure, but until I have time to do that I'm not comfortable releasing it.

@benmosher
Copy link
Member Author

Please help to investigate by printing out this cacheKey and settings in the project you're seeing issues with.

fair, looks like it probably isn't that. was my first guess given the change was small and the memory ran out + ran super slow (smells like a cache issue).

@sompylasar
Copy link
Contributor

I tried 2.3.0 with the previous utils version and did not see the issue. thus my suspicion that the utils bump is what killed it.

Could you please try 2.3.0 with the parserOptions.filePath line added to parse function manually? That's the only change.

I need to look more closely and understand what the issue was, for sure, but until I have time to do that I'm not comfortable releasing it.

Fair, though I won't be able to help without a repro.

@benmosher
Copy link
Member Author

Makes sense, will try ASAP. not sure when though

@benmosher
Copy link
Member Author

it's possible that the codebase from #615 will also bear out the issue since it is also large. might not OOM but you might be able to repro the slowdown.

@piecyk
Copy link

piecyk commented Jun 20, 2017

Hi how can i help ? also waiting for parserOptions.filePath line to be added

@benmosher
Copy link
Member Author

seems like it is some interaction between v2.4.0 and utils/v2.1.0 after all, so I just published utils 2.1.0 after confirming it seems to work okay with plugin v2.3.0

@benmosher
Copy link
Member Author

ahhh, I think I finally found it: https://github.com/benmosher/eslint-plugin-import/blob/master/memo-parser/index.js#L25

the leak is in the memo-parser. I suspect I'm the only person using it. nonetheless, will fix 😅

@benmosher
Copy link
Member Author

fixed. turns out filePath wasn't added until ESLint v3.5.0 so cache would miss between ESLint proper and dependency parsing

@sompylasar
Copy link
Contributor

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants