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

Deno 1.32.2 hangs when run and then crashes with OOM error #18648

Closed
lpil opened this issue Apr 9, 2023 · 1 comment
Closed

Deno 1.32.2 hangs when run and then crashes with OOM error #18648

lpil opened this issue Apr 9, 2023 · 1 comment
Labels
duplicate a duplicate of another issue

Comments

@lpil
Copy link

lpil commented Apr 9, 2023

Hello!

Today I've returned to my computer (aarch64 macOS 13.1) and now if I run deno in the terminal it hangs for about 40 seconds before the shell starts. Once the shell it present it works and feels normal, but then the program entirely crashes with an OOM error 5 to 10 seconds later.

Deno 1.32.2
exit using ctrl+d, ctrl+c, or close()
REPL is running with all permissions allowed.
To specify permissions, run `deno repl` with allow flags.
> 1
1
> 2
2
<--- Last few GCs --->

[626:0x110040000]    57466 ms: Scavenge 1373.0 (1423.1) -> 1372.2 (1433.1) MB, 3.12 / 0.00 ms  (average mu = 0.831, current mu = 0.711) allocation failure;
[626:0x110040000]    57487 ms: Scavenge 1378.1 (1433.1) -> 1376.2 (1434.4) MB, 4.08 / 0.00 ms  (average mu = 0.831, current mu = 0.711) allocation failure;
[626:0x110040000]    57622 ms: Scavenge 1379.7 (1434.4) -> 1378.2 (1453.4) MB, 123.38 / 0.00 ms  (average mu = 0.831, current mu = 0.711) allocation failure;


<--- JS stacktrace --->


#
# Fatal javascript OOM in Reached heap limit
#

fish: Job 1, 'deno' terminated by signal SIGTRAP (Trace or breakpoint trap)

I have not knowningly changed my computer at all since when I last used Deno on this machine a few days ago.

If I run deno --log-level=debug it prints many many lines like this before it crashes:

DEBUG RS - deno::npm::resolvers:144 - Resolved package folder of file:https:///Users/louis/Library/Caches/deno/npm/registry.npmjs.org/fp-ts/2.13.1/es6/Pointed.d.ts to /Users/louis/Library/Caches/deno/npm/registry.npmjs.org/fp-ts/2.13.1
DEBUG RS - deno::npm::resolvers:144 - Resolved package folder of file:https:///Users/louis/Library/Caches/deno/npm/registry.npmjs.org/fp-ts/2.13.1/es6/Predicate.d.ts to /Users/louis/Library/Caches/deno/npm/registry.npmjs.org/fp-ts/2.13.1
DEBUG RS - deno::npm::resolvers:144 - Resolved package folder of file:https:///Users/louis/Library/Caches/deno/npm/registry.npmjs.org/fp-ts/2.13.1/es6/Refinement.d.ts to /Users/louis/Library/Caches/deno/npm/registry.npmjs.org/fp-ts/2.13.1

Here is the full log: deno-log.txt

If I move ~/Library/Caches/deno/npm to a new location it no longer crashes, but it still takes 6 seconds to start the shell.

Here is the logs for when that happens:

$ time deno --log-level=debug
DEBUG RS - deno::args::package_json:147 - No package.json file found
DEBUG RS - deno::cache::cache_db:129 - Opening cache /Users/louis/Library/Caches/deno/dep_analysis_cache_v1...
DEBUG RS - deno::cache::cache_db:129 - Opening cache /Users/louis/Library/Caches/deno/node_analysis_cache_v1...
DEBUG RS - deno::js:10 - Deno isolate init with snapshots.
DEBUG JS - args []
DEBUG RS - deno::args::package_json:147 - No package.json file found
DEBUG RS - deno_runtime::permissions:58 - ⚠️️  Granted net access to "deno.land"
DEBUG RS - deno::file_fetcher:342 - FileFetcher::fetch_remote() - specifier: https://deno.land/.well-known/deno-import-intellisense.json
DEBUG RS - deno_runtime::permissions:58 - ⚠️️  Granted net access to "deno.land"
DEBUG RS - deno::file_fetcher:245 - FileFetcher::fetch_cached - specifier: https://deno.land/.well-known/deno-import-intellisense.json
Deno 1.32.2
exit using ctrl+d, ctrl+c, or close()
REPL is running with all permissions allowed.
To specify permissions, run `deno repl` with allow flags.
>

________________________________________________________
Executed in    6.07 secs    fish           external
   usr time    6.66 secs    0.08 millis    6.66 secs
   sys time    0.29 secs    1.72 millis    0.29 secs

Do let me know what else I can do to help debug!

Thanks,
Louis

edit: I mistaken when I said removing the npm cache directory fixed it, it seems to instead be based upon what my working directory is. If I'm in my home directory it crashes, but if I'm in the ~/Library/Caches/deno it starts the shell in 6 seconds and uses 2.52GB of memory at start. If I run it in a new directory it starts near instantly and uses 54MB.

edit 2: 1.32.3 does not have this problem, but I had to manually upgrade. brew doesn't have this for some reason.

@lpil lpil changed the title Deno hangs when run and then crashes with OOM error Deno 1.32.2 hangs when run and then crashes with OOM error Apr 9, 2023
@dsherret dsherret added the duplicate a duplicate of another issue label Apr 9, 2023
@dsherret
Copy link
Member

dsherret commented Apr 9, 2023

It's fixed in 1.32.3. Homebrew release is temporarily broken #18608 (edit: it is fixed now)

Duplicate of #18538 , #18540 , #18615

@dsherret dsherret closed this as not planned Won't fix, can't repro, duplicate, stale Apr 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate a duplicate of another issue
Projects
None yet
Development

No branches or pull requests

2 participants