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

Memory leak #39

Open
phlmn opened this issue Jul 6, 2023 · 12 comments
Open

Memory leak #39

phlmn opened this issue Jul 6, 2023 · 12 comments
Labels
bug Something isn't working

Comments

@phlmn
Copy link

phlmn commented Jul 6, 2023

Hi, I'm experiencing extensive memory usage of the Tartelet process. Tartelet runs for less than one day and then does not process jobs anymore, due to the system being out of memory.

I've configured Tartelet to run two VMs.

Screenshot 2023-07-06 at 10 44 02
Screenshot 2023-07-06 at 10 45 09
Screenshot 2023-07-06 at 10 44 20

System Info

Hardware Overview:
Model Name: Mac mini
Model Identifier: Mac14,3
Model Number: Z16K000EYD/A
Chip: Apple M2
Total Number of Cores: 8 (4 performance and 4 efficiency)
Memory: 16 GB
System Firmware Version: 8422.121.1
OS Loader Version: 8422.121.1
Activation Lock Status: Disabled

System Software Overview:
System Version: macOS 13.4 (22F66)
Kernel Version: Darwin 22.5.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Secure Virtual Memory: Enabled
System Integrity Protection: Enabled

@simonbs
Copy link
Contributor

simonbs commented Jul 17, 2023

@phlmn Are you running the latest version of Tartelet?

I've just checked our runners and I'm not seeing nearly as high a memory usage. See below for a screenshot of Activity Monitor from one of the runners.

Screenshot 2023-07-17 at 14 47 58

I also ran the Leaks profiling tool on Tartelet and it revealed no leaks when runners were restarted a bunch of times.

Screenshot 2023-07-17 at 14 47 34

@simonbs simonbs added the bug Something isn't working label Jul 17, 2023
@slashmo
Copy link

slashmo commented Sep 29, 2023

I saw the same memory usage spike happening on our Mac Mini M1 (16GB RAM) with Tartelet 0.7.0. We also hit ~ 120GB of memory usage and the runners weren't properly registering anymore, therefore stalling our CI over night. The host runs the latest version of macOS Ventura (13.6 (22G120)).

@phlmn
Copy link
Author

phlmn commented Sep 29, 2023

Sorry for the late answer. The funny thing is the issue seems to have disappeared on our system… The only thing I know we have changed is too run only one VM. But I believe we also had memory leaks after the change.

@xavierLowmiller
Copy link
Contributor

We're also seeing this on version 0.7.0:
memory leak

@xavierLowmiller
Copy link
Contributor

I also ran the Leaks profiling tool on Tartelet and it revealed no leaks when runners were restarted a bunch of times.

Maybe this can be debugged in Xcode 15.1, the release notes mention that the Leaks instrument has had a bug.

@simonbs
Copy link
Contributor

simonbs commented Oct 6, 2023

I'll make a note to look into this once I get the time but that might not happen until in a few weeks. If anyone else want to take a swing at it in the mean time that would be amazing 🤗

@weakfl
Copy link

weakfl commented Dec 11, 2023

I'm experiencing the same issue with v0.7.1, at least with two VMs.

@hisaac
Copy link
Contributor

hisaac commented Jan 26, 2024

Throwing my name in the ring here, we're also seeing this issue, running the most recent version of Tartelet. It takes a day or so before it crops up.

@hisaac
Copy link
Contributor

hisaac commented Jan 26, 2024

So we've got multiple machines running Tartelet. The issue seems to crop up randomly.

One thing I've noticed is that, when I VNC into a host machine that is currently experiencing the problem, I'm presented with a login screen. Once logging in, there are no active Tart VM sessions running, but they immediately start upon logging in.

On machines that aren't currently experiencing the issue, when I VNC into them, I'm brought right to the desktop without going to the login window first, and Tart VMs are currently running.

It appears as if the machines are going to sleep, even though as far as I can tell, all the machines are configured the same, and have the sleep functionality disabled.

@simonbs
Copy link
Contributor

simonbs commented Jan 29, 2024

I've just checked our three machines which have been maintaining two runners for 42 consecutive days and Tartelet is using around 85 MB of memory on all of them.

I'd love to address this issue but right now I'm unsure where to begin as I'm unable to reproduce it.

@hisaac
Copy link
Contributor

hisaac commented Jan 30, 2024

Understandable @simonbs. I'd like to keep documenting findings here in case anyone affected has ideas or solutions.

@hisaac
Copy link
Contributor

hisaac commented Feb 1, 2024

Not sure if either of these will be useful to anyone, but I took a process sample and spindump of Tartelet when I saw it was using high memory on one of our hosts.

Nothing obvious sticks out to me, but I'm not very experienced reading these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants