unisonweb / unison

A friendly programming language from the future
https://unison-lang.org
Other
5.69k stars 265 forks source link

OOM crashes #5085

Open ceedubs opened 1 month ago

ceedubs commented 1 month ago

Describe and demonstrate the bug

I don't know a simple way to reproduce this. But for the last couple of hours I have doing a lot of the following commands on the nimbus codebase while searching for unused code and code that has been upstreamed to libraries:

Often I'm calling these with numbered args from ls and dependents output.

2 or 3 times my computer has frozen and my fans have gone full throttle (presumably from CPU usage). One time I gave up and did a hard power reset of my computer and the other time my OS had killed my tmux process when I returned to my computer ~10 min later.

I'm guessing that there is a memory leak and that I could get this to fail more gracefully by setting a max memory limit on the Haskell runtime. But ideally this wouldn't be necessary.

Environment (please complete the following information):

aryairani commented 1 month ago

Let's reevaluate this after #5041, though it shouldn't be leaking per se.

In Haskell can we detect memory pressure and reduce our cache sizes?