Thread leak when changing context size
Submitted by Cory Quammen
Assigned to mes..@..op.org
Link to original bug (#107092)
Description
Created attachment 140440 apitrace output from the example
I have observed a thread leak in Linux when using offscreen rendering in VTK via llvmpipe. A minimal VTK example code is attached, as is the output of running apitrace.
One can observe the thread leak by doing the following:
-
down ParaView-5.5.2-Qt5-MPI-Linux-64bit.tar.gz from www.paraview.org/download
-
tar xzf ParaView-5.5.2-Qt5-MPI-Linux-64bit.tar.gz
-
cd ParaView-5.5.2-Qt5-MPI-Linux-64bit
-
Run
bin/pvbatch --mesa-llvm vtk-mesa-threads-growth.py
In this example, we are repeatedly resizing the render window. Each time the window is resized, the current context is destroyed with glXDestroyContext. A new context is created with the new desired size, but looking at the output of htop, the threads used from the previous render never rejoin the main thread, causing the total number of threads to grow each time the render window size is changed. For long-running animation creation, this situation can lead to a major system slow down.
If this is not a mesa bug and it looks like I am doing something not correct in the trace, please let me know.
Attachment 140440, "apitrace output from the example":
pvbatch.trace