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 in 4.0.0 version #139

Closed
alexander-akait opened this issue Apr 25, 2018 · 6 comments
Closed

Memory leak in 4.0.0 version #139

alexander-akait opened this issue Apr 25, 2018 · 6 comments

Comments

@alexander-akait
Copy link
Collaborator

alexander-akait commented Apr 25, 2018

<--- Last few GCs --->

[13594:0x37d5d70]    80266 ms: Mark-sweep 1388.3 (1424.6) -> 1388.3 (1424.6) MB, 1167.7 / 0.0 ms  allocation failure GC in old space requested
[13594:0x37d5d70]    81659 ms: Mark-sweep 1388.3 (1424.6) -> 1388.3 (1423.6) MB, 1174.6 / 0.0 ms  last resort GC in old space requested
[13594:0x37d5d70]    83213 ms: Mark-sweep 1388.3 (1423.6) -> 1388.3 (1423.6) MB, 1553.3 / 0.0 ms  last resort GC in old space requested


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x2f412d2257c1 <JSObject>
    1: tokenize(aka tokenize) [/home/evilebottnawi/IdeaProjects/prettier/node_modules/postcss-selector-parser/dist/tokenize.js:~86] [pc=0x62fc7ee5102](this=0x3f1606b822d1 <undefined>,input=0x3afe12282371 <Object map = 0x91d7a346fb9>)
    2: new Parser [/home/evilebottnawi/IdeaProjects/prettier/node_modules/postcss-selector-parser/dist/parser.js:159] [bytecode=0x3d42b176c5f9 offset=253](this=0x3a...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

Also have performance problems, in 2 veersion (maybe related to this leak).

Example:

-Option/root {}
@chriseppstein
Copy link
Contributor

chriseppstein commented Apr 26, 2018

This is likely due some specific sequence of characters in input. What are the steps to reproduce this issue?

@alexander-akait
Copy link
Collaborator Author

@chriseppstein Just try to parse Example above

@chriseppstein
Copy link
Contributor

Thanks, I have reproduced the issue and I'm investigating it.

@chriseppstein
Copy link
Contributor

@evilebottnawi Was your expectation for an error or that this would be parsed into a non-standard selector. there is no test case that covers this illegal syntax in our code.

@alexander-akait
Copy link
Collaborator Author

@chriseppstein I think better to throw error, not memory problem

@chriseppstein
Copy link
Contributor

Fixed in 5.0.0-rc.0 which was released today.

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

No branches or pull requests

2 participants