Closed phryk closed 11 months ago
Hello, same issue on RX 6650 XT. The problem appears on FreeBSD version 14 as well 15. I have that issue, no matter which desktop I tried. Some debug info
hw.model: 13th Gen Intel(R) Core(TM) i7-13700K
My subfiles for xorg
FreeBSD version FreeBSD FreeBSD-GIGABYTE 15.0-CURRENT FreeBSD 15.0-CURRENT #0 main-n265864-23ef25d25d98: Tue Oct 10 19:13:53 CEST 2023 root@FreeBSD-GIGABYTE:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 1500001 1500001
DRM KMOD version drm-515-kmod 5.15.25_3
OOPS. Wrong patch. Proper one is:
diff --git a/drivers/dma-buf/dma-fence-chain.c b/drivers/dma-buf/dma-fence-chain.c
index ae84a72cb2..c13760fe8c 100644
--- a/drivers/dma-buf/dma-fence-chain.c
+++ b/drivers/dma-buf/dma-fence-chain.c
@@ -219,6 +219,7 @@ dma_fence_chain_walk(struct dma_fence *fence)
dma_fence_put(prev);
}
+ dma_fence_put(fence);
return (prev);
}
OOPS. Wrong patch. Proper one is:
diff --git a/drivers/dma-buf/dma-fence-chain.c b/drivers/dma-buf/dma-fence-chain.c index ae84a72cb2..c13760fe8c 100644 --- a/drivers/dma-buf/dma-fence-chain.c +++ b/drivers/dma-buf/dma-fence-chain.c @@ -219,6 +219,7 @@ dma_fence_chain_walk(struct dma_fence *fence) dma_fence_put(prev); } + dma_fence_put(fence); return (prev); }
Okay thanks, I will try this patch
OOPS. Wrong patch. Proper one is:
diff --git a/drivers/dma-buf/dma-fence-chain.c b/drivers/dma-buf/dma-fence-chain.c index ae84a72cb2..c13760fe8c 100644 --- a/drivers/dma-buf/dma-fence-chain.c +++ b/drivers/dma-buf/dma-fence-chain.c @@ -219,6 +219,7 @@ dma_fence_chain_walk(struct dma_fence *fence) dma_fence_put(prev); } + dma_fence_put(fence); return (prev); }
Hi Vladimir,
I've tested this patch since I got the problem too and never took time to look at it, it solves the problems, thanks a lot ! Can you commit this to master and cherry-pick it to 5.15-lts ? I'll make a new release after that.
How do I properly apply this patch? just put it into files/patch-foo
in the ports directory?
I've tested this patch since I got the problem too and never took time to look at it, it solves the problems, thanks a lot ! Can you commit this to master and cherry-pick it to 5.15-lts ? I'll make a new release after that.
Done. I cherry-picked couple of other commits too. I hope they don't break anything. The patch revealed one more bug in dma-buf. Previously leaking memory chunks are allocated with M_DMABUF type but freed with M_LKPI type that brokes memory accounting for this types. I will try to fix that.
How do I properly apply this patch? just put it into
files/patch-foo
in the ports directory?
Just build and install current 5.15-lts branch from sources
I've tested this patch since I got the problem too and never took time to look at it, it solves the problems, thanks a lot ! Can you commit this to master and cherry-pick it to 5.15-lts ? I'll make a new release after that.
Done. I cherry-picked couple of other commits too. I hope they don't break anything. The patch revealed one more bug in dma-buf. Previously leaking memory chunks are allocated with M_DMABUF type but freed with M_LKPI type that brokes memory accounting for this types. I will try to fix that.
Thanks,
Will wait a bit before tagging a release so you have time to fix this.
I've tested this patch since I got the problem too and never took time to look at it, it solves the problems, thanks a lot ! Can you commit this to master and cherry-pick it to 5.15-lts ? I'll make a new release after that.
Done. I cherry-picked couple of other commits too. I hope they don't break anything. The patch revealed one more bug in dma-buf. Previously leaking memory chunks are allocated with M_DMABUF type but freed with M_LKPI type that brokes memory accounting for this types. I will try to fix that.
Thanks,
Will wait a bit before tagging a release so you have time to fix this.
I did a release anyway, we can always make a new one after :)
Issue is fixed, thanks @wulf7
Describe the bug
drm-515-kmod
leaks memory when driving an RX 6600XT throughamdgpu
.FreeBSD version FreeBSD aether 14.0-BETA3 FreeBSD 14.0-BETA3 #0 releng/14.0-n265111-c429a0425dc4: Fri Sep 22 05:52:05 UTC 2023 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 1400097 1400097 PCI Info
pciconf -lv
DRM KMOD version drm-515-kmod 5.15.25_3
To Reproduce
amdgpu
in kld_listvmstat -m | grep lkpikmalloc
in a looplkpikmalloc
grow foreverAdditional context
I already tried locally built
drm-515-kmod
as well as all flavors ofgpu-firmware-amd-kmod
from the main branch of the ports (cloned today), built against thereleng/14.0
branch checked out in/usr/src
. No change in behavior.When
lkpikmalloc
was already over 6G, trying to start firefox lead to both displays switching off, switching to a TTY didn't work. Had to reboot the system, but during shutdown, the displays switched back on and full-res KMS VT was visible.