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

TextDecoder iso-8859-1: Fatal javascript OOM in Ineffective mark-compacts near heap limit #7081

Closed
kemicofa opened this issue Aug 17, 2020 · 5 comments
Labels
bug Something isn't working needs info needs further information to be properly triaged web related to Web APIs

Comments

@kemicofa
Copy link

kemicofa commented Aug 17, 2020

I'm workiing with very large CSV files (85Mo). After opening the file with Deno.readFile, I decode it with new TextDecoder("iso-8859-1").decode(rawData); and get the following error:

note: I do not get this error with utf-8

<--- Last few GCs --->

[17822:0x5400000000] 27318 ms: Mark-sweep (reduce) 1399.4 (1401.5) -> 1399.3 (1403.2) MB, 3173.1 / 0.0 ms (+ 0.1 ms in 431 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 3424 ms) (average mu = 0.191, current mu = 0.[17822:0x5400000000] 30483 ms: Mark-sweep (reduce) 1399.8 (1401.7) -> 1399.5 (1402.5) MB, 3164.5 / 0.0 ms (average mu = 0.100, current mu = 0.000) allocation failure scavenge might not succeed

<--- JS stacktrace --->

#
# Fatal javascript OOM in Ineffective mark-compacts near heap limit
#
[1] 17822 illegal hardware instruction

Deno Version: 1.2.2
Mac OS: 10.14.6
RAM: 16 Gb

@bartlomieju bartlomieju added bug Something isn't working web related to Web APIs labels Aug 17, 2020
@bartlomieju
Copy link
Member

Seems like a bug in TextDecoder implementation in https://github.com/denoland/deno/blob/master/op_crates/web/08_text_encoding.js

@kemicofa
Copy link
Author

Running with --v8-flags=--max-old-space-size=8192 temporarily fixes the issue.

@stonetwig
Copy link

This is not really an issue but the docs for it can be improved, that's why I created #7084

@ry
Copy link
Member

ry commented Aug 17, 2020

It would help us debug if we had a small example script.

@bartlomieju bartlomieju added the needs info needs further information to be properly triaged label Nov 18, 2020
@lucacasonato
Copy link
Member

This should be resolved now. Also consider using streaming decoders for large files (either TextDecoderStream, or the stream option on TextDecoder.decode).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs info needs further information to be properly triaged web related to Web APIs
Projects
None yet
Development

No branches or pull requests

5 participants