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

Building application with nimble run causes system to crash (out of memory) #1284

Closed
WeebNetsu opened this issue Nov 11, 2024 · 4 comments
Closed

Comments

@WeebNetsu
Copy link

WeebNetsu commented Nov 11, 2024

When trying to build Lesson 50 using nimble run, 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.

It seems to produce this bit of info before taking my system for a ride:

Verifying dependencies for [email protected]
   Building project/project using c backend
/home/netsu/.nimble/pkgs2/async_http_request-0.1.4-944652f72180b0daac91cd897a466e3a0f7c0625/async_http_request.nim(157, 34) template/generic instantiation of `request` from here
/home/netsu/.choosenim/toolchains/nim-2.2.0/lib/pure/httpclient.nim(1154, 14) Warning: Deprecated since v1.5; use HttpMethod enum instead; string parameter httpMethod is deprecated [User]

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
Nim Compiler Version 2.2.0 [Linux: amd64]
Compiled at 2024-10-02

@Patitotective
Copy link

Hi, I was able to replicate the same behavior in my computer. I also tried to find any memory leaks with valgrind but I'm not sure how to analyze the result, here is log file after running valgrind --leak-check=full --log-file=./mem-leak-nimble.log nimble run: https://pastebin.com/5Z4JiM9F.

OS: Linux Mint 21.3 Cinnamon
CPU: 12th Gen Intel Core i5-12450H
RAM: 8GB
nimble v0.16.1 compiled at 2024-10-02 02:00:57
Nim Compiler Version 2.2.0 [Linux: amd64]

@xTrayambak
Copy link
Contributor

xTrayambak commented Dec 3, 2024

I cannot reproduce this error. I can't compile the code in the first place due to GCC compiler errors (just a NixOS problem). I'm not getting OOM'd.

@WeebNetsu Are you getting this OOM just with nimble run or nimble build as well? If it's just when running the program, that might suggest that the libraries you're using have a memory leak, not Nimble itself.

EDIT: Upon checking the video you attached, htop shows that the Nim compiler itself is consuming lots of memory, not Nimble. I suggest you to create an issue at the Nim compiler repository, not here.

@WeebNetsu
Copy link
Author

I cannot reproduce this error. I can't compile the code in the first place due to GCC compiler errors (just a NixOS problem). I'm not getting OOM'd.

@WeebNetsu Are you getting this OOM just with nimble run or nimble build as well? If it's just when running the program, that might suggest that the libraries you're using have a memory leak, not Nimble itself.

EDIT: Upon checking the video you attached, htop shows that the Nim compiler itself is consuming lots of memory, not Nimble. I suggest you to create an issue at the Nim compiler repository, not here.

Cool, I created an issue there, thanks for the tip - should I close this issue, or keep it open and close it alongside the Nim issue?

@xTrayambak
Copy link
Contributor

I'd close it. Re-open it if the developers there say that it's a Nimble issue, of which the odds are next-to-nil.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants