Most of the patch I don't understand, but this seems like this might be causing some leaks:
@@ -457,11 +455,9 @@ pthread_create(pthread_t *thread, const if (!PTQ_EMPTY(&pthread__deadqueue)) { pthread_mutex_lock(&pthread__deadqueue_lock); PTQ_FOREACH(newthread, &pthread__deadqueue, pt_deadq) { - /* Still running? */ + /* Still busily exiting, or finished? */ if (newthread->pt_lwpctl->lc_curcpu == - LWPCTL_CPU_EXITED || - (_lwp_kill(newthread->pt_lid, 0) == -1 && - errno == ESRCH)) + LWPCTL_CPU_EXITED) break; } if (newthread) Can you try if the leak is gone if you only revert this part of the patch? Jaromir Le jeu. 6 juin 2024 à 20:13, Brian Marcotte <marco...@panix.com> a écrit : > > > All started with this commit: > > > > https://mail-index.netbsd.org/source-changes/2020/01/27/msg113341.html > > > > Undoing part of this commit (diff attached) makes the leak disappear > > I'm trying this now. I can already see it's helping these: > > gpg-agent > opendmarc > dkimpy_milter (python3) > > I'm also trying it with mariadb, but it may take a few days to see if > the leak is gone. > > Thanks for looking into this. > > -- > - Brian >