i don't get it
i'm having a kernel-side memory leak, that only gets triggered on minecraft
what the fuck is that
i guess it's a driver leak (i've had a lot of issues with the intel gpu driver), but the leak goes away when (inevitably) minecraft crashes, so like wtf

Follow

@chjara So it seems that the leak generates some process-associated objects that are actually destroyed with the process, but not destroyed when w/e in userspace requests them to be.

This isn't as weird as it might sound. For example, if vma (virtual memory area) coalescing (i.e. stitching together two adjacent mappings that happen to be equivalent to one mapping -- because they point at appropriately distant offsets in the same file) didn't work, the way Golang uses heap might cause kernel to keep creating more and more vmas, until they all get destroyed when the process exits.

Try looking at /proc/slabinfo and compare contents when the leak has leaked lots of memory and when it hasn't. (Slab is an allocator in kernel for objects of known and fixed sizes: if the leak is in one of those classes, then you can narrow down _what_ is leaking.) If you can find the leak there, it should be much easier to debug.

@chjara Also, this might be a userspace bug. If the userspace continues to leak file descriptors or something like that, then kernel memory usage (accounted to that process, but still kernel) _will_ increase.

@robryk@qoto.org i fixed the issue by using optimus to run it on the nvidia gpu instead of igpu. was a driver issue, somehow

@chjara Yeah, then it's more likely to be actually an issue with the driver. I wonder how well specified that interface is, and whether userspace does something importantly different depending on which gpu is used.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.