Closed vojtatranta closed 1 year ago
Having the same issue. Also flow check
does not work. Tried both 0.36 and 0.37.
So looking at the exit codes, I think exit code 16 means Flow's shared hash table is full. How large is the code base that you're trying to check? Is it something I can try and repro?
In the meantime, can you try adding this to the options section of your .flowconfig
?
sharedmemory.hash_table_pow=21
The default is 19, I believe. This change will quadruple the size of your hash table, from 512k elements to 2M elements. I think each element is 16 bytes, so I think this will end up growing the hash table from 8MB to 32MB.
Does this help?
In the meantime, I ran rm -rf
on my node_modules
and npm install
ed everything including flow-bin
and it started working after that. If I run into the issue again, I will try this and let you know.
I can reproduce this on the latest version, 0.57.3
. I can try to generate a minimal repro and open a new issue if needed.
Increasing hash table size worked in my case (sharedmemory.hash_table_pow=21
). Thanks @gabelevi
Discovered this very issue just now (macOS, project with about 200,000 LOC). `sharedmemory.hash_table_pow=21). Thanks @gabelevi. You're an absolute saviour!
The error message looks like this now:
Worker exited (code: 16)
Worker exited (code: 16)
Worker exited (code: 16)
Worker exited (code: 16)
Worker exited (code: 16)
Worker exited (code: 16)
Worker exited (code: 16)
Worker exited (code: 16)
Subprocess(2138): fail 16Subprocess(2141): fail 16Unhandled exception: SharedMem.Hash_table_full
Raised by primitive operation at file "hack/heap/sharedMem.ml", line 484, characters 58-66
Called from file "hack/heap/workerCancel.ml", line 30, characters 6-10
Re-raised at file "src/core/lwt.ml", line 3008, characters 20-29
Called from file "src/unix/lwt_main.ml", line 42, characters 8-18
Called from file "src/commands/checkCommands.ml", line 108, characters 57-132
Called from file "src/flow.ml", line 86, characters 6-34
But the @gabelevi’s suggestions still fixes it.
Flow 0.91.0
Arch Linux
Not a particularly huge project
$ flow check src/
Worker exited (code: 16)
Worker exited (code: 16)
Worker exited (code: 16)
Worker exited (code: 16)
Unhandled exception: SharedMem.Hash_table_full
Raised by primitive operation at file "hack/heap/sharedMem.ml", line 484, characters 58-66
Called from file "hack/heap/workerCancel.ml", line 30, characters 6-10
Re-raised at file "src/core/lwt.ml", line 3008, characters 20-29
Called from file "src/unix/lwt_main.ml", line 42, characters 8-18
Called from file "src/commands/checkCommands.ml", line 135, characters 27-86
Called from file "src/commands/commandUtils.ml", line 13, characters 4-32
increasing the hash table pow did the trick for me, but I'm not sure about the performance implications.
Version 0.37.4
Hi there, I have troubles to spawn Flow server. For moment it ran but know, it just keep trying to initialize over and over. A while after processing starts this gets to the log:
And then flow tries to run same server again...