[Mesa-dev] [Bug 107092] Thread leak when changing context size

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jul 3 02:02:19 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=107092

--- Comment #3 from Roland Scheidegger <sroland at vmware.com> ---
I'm near certain this is a bug in the xlib state tracker rather than llvmpipe.
swr will leak as well, you just don't notice because it doesn't create
additional threads.
glXChooseFBConfig will call choose_visual(), which will call xmesa_init(),
which will create the pipe screen (via xmesa_init_display()). (llvmpipe threads
are per screen, not per context.)
(mesa/src/gallium/state_trackers/glx/xlib/ xm_api.c and glx_api.c)

Note that there's 2 places where the screens would get destroyed (one in
xmesa_close_display(), reached via XCloseDisplay(), the other is in
XMesaDestroyContext(), reached via glXDestroyContext()). Both are commented out
and marked as FIXME, since apparently it's not safe to destroy the screen at
this point since surfaces can still be around...
This looks apparently broken but it's not obvious to me how to fix it. At first
glance it looks like screen destruction should be delayed until there's neither
contexts nor surfaces referencing it are around but I guess it isn't that
easy...

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180703/f7a4c131/attachment.html>


More information about the mesa-dev mailing list