[vtkusers] Llvmpipe threads collapses the system when capturing a screenshot

Patricio Palma C. patriciop at gmail.com
Tue Feb 27 08:46:22 EST 2018


Debugging the aplication I see in my case both
 vtkXOpenGLRenderWindow::CreateOffScreenWindow(int,int) and
vtkXOpenGLRenderWindow::DestroyOffScreenWindow() are being called, but the
latter does not reclaim the llvmpipe threads. I think this is a Mesa issue
and not a VTK one.

Regards
Patricio



El El vie, 23 de feb. de 2018 a las 21:36, Utkarsh Ayachit <
utkarsh.ayachit at kitware.com> escribió:

> Strange coincidence! We just encountered similar issue on ParaView and
> it's being tracked down here:
> https://gitlab.kitware.com/paraview/paraview/issues/17999
>
> Utkarsh
>
> On Fri, Feb 23, 2018 at 7:06 PM, Patricio Palma C. <patriciop at gmail.com>
> wrote:
> > Thanks David.!
> >
> > I’ve continued debugging and I’ve noticed my VTK code works fine with
> Mesa
> > 10.6.5 gallium 0.4 on llvmpipe (llvm 3.6)
> >
> > Could it be a bug in Mesa 17.0.6 gallium 0.4 on llvmpipe (llvm 4.0) the
> > cause of this issue?
> >
> > At this moment downgrade is not an option as I also need AVX support
> which
> > is available only from Mesa 11.1.
> >
> > Should I try the latest Mesa version or is there a favorited Mesa
> version to
> > use with VTK ?
> >
> > Regards
> > Patricio
> >
> >
> > El El jue, 22 de feb. de 2018 a las 21:03, David Gobbi
> > <david.gobbi at gmail.com> escribió:
> >>
> >> Hi Patricio,
> >>
> >> The primary thing that vtkWindowToImageFilter does is call
> glReadPixels()
> >> via vtkOpenGLRenderWindow::GetPixelData().  So you can try
> >> debugging/profiling the vtkOpenGLRenderWindow.cxx code at the point
> where it
> >> calls glReadPixels() to see if that is where the llvmpipe threads are
> being
> >> created.
> >>
> >>  - David
> >>
> >>
> >> On Thu, Feb 22, 2018 at 4:07 PM, Patricio Palma C. <patriciop at gmail.com
> >
> >> wrote:
> >>>
> >>> Hi All
> >>>
> >>>    I’m using vtkWindowToImageFilter to export screenshots of a
> >>> vtkXOpenGLRenderWindow. It works, but every time a screenshot is
> created, 15
> >>> new llvmpipe threads are spawned and they are not finalized by the
> app. I
> >>> noticed this because after a while the number of threads reached the
> limit
> >>> (about 5500) and no more threads can be spawned.
> >>>
> >>> This application is running linux RH 6.6 / VTK 7.1 / mesa 17.0.6
> >>>
> >>>
> >>>
> >>> Source code extract:
> >>>
> >>>
> >>>
> >>> vtkSmartPointer<vtkRenderer> osRenderer =
> >>> vtkSmartPointer<vtkRenderer>::New();
> >>>
> >>> vtkSmartPointer<vtkXOpenGLRenderWindow> renWin =
> >>> vtkSmartPointer<vtkXOpenGLRenderWindow>::New();
> >>>
> >>>
> >>>
> >>> renWin->SetOffScreenRendering(true);
> >>>
> >>> renWin->AddRenderer(osRenderer);
> >>>
> >>> renWin->SetSize(pictureSize.width(), pictureSize.height());
> >>>
> >>>
> >>>
> >>> // copyActors from QVTKWidget2
> >>>
> >>>
> >>>
> >>> vtkSmartPointer<vtkWindowToImageFilter> filter =
> >>> vtkSmartPointer<vtkWindowToImageFilter>::New();
> >>>
> >>> filter->SetInput(renWin);
> >>>
> >>> filter->SetInputBufferTypeToRGB();
> >>>
> >>> filter->SetMagnification(1);
> >>>
> >>> filter->Update();
> >>>
> >>>
> >>>
> >>> vtkSmartPointer<vtkImageData> image = filter->GetOutput();
> >>>
> >>> …
> >>>
> >>> (continue using image)
> >>>
> >>> At this moment I’m using an empty RenderWindow, I thought actors could
> >>> have a problem so I commented that out but the problem persists.
> >>>
> >>> After some testing I’ve noticed that the problem arise after calling
> >>> filter->Update(). If this line is commented, no picture is generated
> but the
> >>> threads are finalized.
> >>>
> >>> Any ideas on how can I track this issue or where should I continue
> >>> looking for an issue in my code?
> >>>
> >>>
> >>> Regards
> >>>
> >>> Patricio
> >>>
> >>> --
> >>> Patricio Palma C.
> >>
> >>
> > --
> > Patricio Palma C.
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the VTK FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> >
> > Search the list archives at: http://markmail.org/search/?q=vtkusers
> >
> > Follow this link to subscribe/unsubscribe:
> > https://vtk.org/mailman/listinfo/vtkusers
> >
>
-- 
Patricio Palma C.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180227/61d45a6b/attachment.html>


More information about the vtkusers mailing list