-
Notifications
You must be signed in to change notification settings - Fork 3
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
Memory leak #8
Comments
valgrind reports However, @compucat, if you eventually have a sec, can I maybe get you to please look at that? |
Can't seem to replicate this specific Valgrind leak. I don't have a Pi with an LED board connected, but I assume this would still happen without that. Could you provide more details on how to replicate it? |
In fairness, I must also confess, I got that report from valgrind when I tested it on my PC. Might be a wise idea to maybe also let run valgrind on the actual Pi eventually. Anyway, I used the valgrind integration of CLion and let the program run for a while, maybe 15 min? I cant quite recall. Ill try to reproduce it myself and let you know (and also, what valgrind reports when I run it on the actual Pi). |
How do you have the program exit cleanly when it's running the loop? Valgrind gives false positives when I force-close it with Ctrl+C. Modifying the main loop to only run an x amount of times only gives a warning about the thread started in |
Oii, that could explain it then, why you arent able to reproduce it then. I just stop running the program within CLion and iirc that just sends an SIGINT to the program. Ill look into it tomorrow! Thx for the heads up, I was unaware of that fact! |
Hey, sorry @Inverted for the delay, there was some uni stuff I needed to get done. I tried running the program with valgrind memcheck on the Pi now, however, I have a slight issue. The eye software needs superuser privileges to run, else its not able to communicate with the LEDs. Err, how do I do that? I tried (sudo on
as well as (sudo on
both with no success. I also tried to login as superuser with
which also failed. (Either it can't handle system call 407 or we missing permission) |
Hmm I'm not sure why none of those worked. Valgrind should just work on a Pi, and running it as superuser should have all the permissions you would ever need I'd assume. Do you get any specific error messages/behaviour? |
Ill try again this weekend. From what I remember, when it was saying it couldt handle system call 407 (which is clock_nanosleep_time64, so the 64 bit variant of clock_nanosleep I guess), there was a constant logging of that issue. The one time I ran it in superuser mode, the LEDs did something, but it was veeeeery glitchy. So valgrind and the LED lib also dont seem to work to well together... What Im also gonna try is, Ill let it run over the course of the next week. From what I remember, dwango wants to let it run for a long period on MAGFest, so when it runs for 4 days (while I'm gone), it should be fine for the event. As you and I both already did changes to code that allocates memory, chances are we already got it fixed. As said, the memory leak is also veeeery smol. |
software was now running for 48+ hours. within the first 24 hours it grew from 4 mb to 11 mb. another 24 hours later it had the exact same memory usage. i ont understand what caused it to inflate, but as it is now, I frankly dont care |
There's a teeny tiny memory leak. No idea where.
The text was updated successfully, but these errors were encountered: