<p dir="auto">Hello!</p>
<p dir="auto">Today I've returned to my computer (aarch64 macOS 13.1) and now if I run <code class="notranslate">deno</code> 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.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="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.
&gt; 1
1
&gt; 2
2
&lt;--- Last few GCs ---&gt;

[626:0x110040000]    57466 ms: Scavenge 1373.0 (1423.1) -&gt; 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) -&gt; 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) -&gt; 1378.2 (1453.4) MB, 123.38 / 0.00 ms  (average mu = 0.831, current mu = 0.711) allocation failure;


&lt;--- JS stacktrace ---&gt;


#
# Fatal javascript OOM in Reached heap limit
#

fish: Job 1, 'deno' terminated by signal SIGTRAP (Trace or breakpoint trap)"><pre class="notranslate"><code class="notranslate">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.
&gt; 1
1
&gt; 2
2
&lt;--- Last few GCs ---&gt;

[626:0x110040000]    57466 ms: Scavenge 1373.0 (1423.1) -&gt; 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) -&gt; 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) -&gt; 1378.2 (1453.4) MB, 123.38 / 0.00 ms  (average mu = 0.831, current mu = 0.711) allocation failure;


&lt;--- JS stacktrace ---&gt;


#
# Fatal javascript OOM in Reached heap limit
#

fish: Job 1, 'deno' terminated by signal SIGTRAP (Trace or breakpoint trap)
</code></pre></div>
<p dir="auto">I have not knowningly changed my computer at all since when I last used Deno on this machine a few days ago.</p>
<p dir="auto">If I run <code class="notranslate">deno --log-level=debug</code> it prints many many lines like this before it crashes:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="DEBUG RS - deno::npm::resolvers:144 - Resolved package folder of file:///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:///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:///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"><pre class="notranslate"><code class="notranslate">DEBUG RS - deno::npm::resolvers:144 - Resolved package folder of file:///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:///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:///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
</code></pre></div>
<p dir="auto">Here is the full log: <a href="https://github.com/denoland/deno/files/11186372/deno-log.txt">deno-log.txt</a></p>
<p dir="auto">If I move <code class="notranslate">~/Library/Caches/deno/npm</code> to a new location it no longer crashes, but it still takes 6 seconds to start the shell.</p>
<p dir="auto">Here is the logs for when that happens:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ 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 &quot;deno.land&quot;
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 &quot;deno.land&quot;
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.
&gt;

________________________________________________________
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"><pre class="notranslate"><code class="notranslate">$ 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.
&gt;

________________________________________________________
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
</code></pre></div>
<p dir="auto">Do let me know what else I can do to help debug!</p>
<p dir="auto">Thanks,<br>
Louis</p>
<p dir="auto">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 <code class="notranslate">~/Library/Caches/deno</code> 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.</p>
<p dir="auto">edit 2: 1.32.3 does not have this problem, but I had to manually upgrade. <code class="notranslate">brew</code> doesn't have this for some reason.</p>
<p dir="auto">OS: Windows 10 Version 10.0.19045.2728</p>
<p dir="auto">From <code class="notranslate">deno 1.32.1+7722014</code> and up, running <code class="notranslate">deno repl</code> or just <code class="notranslate">deno</code> from certain directories causes the deno process to hang with no repl prompt and with excessive memory usage.</p>
<p dir="auto">The bug is reproducible if running deno from <code class="notranslate">C:\</code>, <code class="notranslate">C:\Windows</code>, <code class="notranslate">C:\Users</code>, <code class="notranslate">C:\Users\&lt;current_user&gt;</code>, <code class="notranslate">C:\Windows\System32</code>, <code class="notranslate">C:\Windows\SysWow64</code>. At the same time runinng <code class="notranslate">deno repl</code> from <code class="notranslate">C:\Users\&lt;current_user&gt;\Desktop</code> or <code class="notranslate">C:\Windows\System32\wbem</code> proceeds as normal. These are the directories that I've tested which reproduced the bug 100% of the times. Other directories and drives seems unaffected.</p>
<p dir="auto">The last unaffected canary version with available binaries to download is <code class="notranslate">deno 1.32.1+e888c3f</code></p>
<p dir="auto">Edit:<br>
Just checked with the 1.32.2 release. It's still affected.</p>
<p dir="auto">Edit2:<br>
Checked 1.32.2 Linux under Windows WSL, it hangs when executing with the root dir (<code class="notranslate">/</code>) as the current directory.</p>