-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Building some applications causes whole system to crash (out of memory) #24503
Comments
This seems to be an infinite loop in the Something to note is that the line in nimx's package file which restricts the variant version was added in 2016 but the 0.3 version is only from August 2023 and was updated as recently as August of this year, so it's possible that the new version of variant not being used isn't intentional. So changing nimx to allow variant >= 0.3 is an option. Edit: Opened yglukhov/nimx#528 As for the infinite loop itself, it happens because There is also the issue that the VM doesn't catch the infinite loop, idk what the problem is there. |
Maybe it would catch it but it runs out of memory first. |
Since yglukhov/nimx#528 was merged, nimx now uses the newest version of variant which doesn't have this problem, so the project above should build now. #24512 would also stop the infinite memory use by detecting the infinite recursion early. But the issue with |
refs #24503 Infinite recursions currently are not tracked separately from infinite loops, because they also increase the loop counter. However the max infinite loop count is very high by default (10 million) and does not reliably catch infinite recursions before consuming a lot of memory. So to protect against infinite recursions, we separately track call depth, and add a separate option for the maximum call depth, much lower than the maximum iteration count by default (2000, the same as `nimCallDepthLimit`). --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Description
Note: Original Issue
When trying to build Lesson 50 using
nimble build
, it will quickly use up all my systems RAM and force me to reboot to get it to respond again. This some sort of leak or maybe unhandled memory usage?I recorded a video to show what happens, I cancelled the execution before my system crashed of course
https://github.com/user-attachments/assets/368a64ba-bc5e-4269-96f5-23c0ef605944
This seems to be a new issue, since I was previously able to build this without issue - have also been replicated by Patitotective
Nim Version
Nim Compiler Version 2.2.0 [Linux: amd64]
Compiled at 2024-10-02
Copyright (c) 2006-2024 by Andreas Rumpf
git hash: 78983f1
active boot switches: -d:release
Current Output
Crashes my system before much else is displayed
Known Workarounds
No response
Additional Information
In case important:
OS: OS: EndeavourOS (Arch Linux)
CPU: AMD Ryzen 7 5700X (16) @ 3.400GHz
RAM: 16GB
nimble v0.16.1 compiled at 2024-10-02 02:00:57
The text was updated successfully, but these errors were encountered: