<div dir="ltr">Hey Dan,<div><br></div><div>Not sure what would be causing that, especially since valgrind isn't complaining. Some ideas: <div><br></div><div>What drivers have you noticed this on? Is there a pattern to them? I could see a leaking texture handle etc. on a software driver doing something like this. </div><div><br></div><div>Has this been tested on all the major drivers? This would help narrow down whether it's something on our side or theirs.</div><div><br></div><div>This is a shot in the dark, but try running this through apitrace (<a href="https://github.com/apitrace/apitrace">https://github.com/apitrace/apitrace</a>), then playback the trace and monitor memory usage + the error log. Maybe something's funky in the OpenGL command stream.</div><div><br></div><div><div>Beyond that, the debugging tools are failing us and I don't see many other options than to start cutting out bits of the code to locate the problem. See if the leak goes away when, e.g. vtkOpenGLRenderer::DeviceRender is bypassed and go from there.</div></div><div><br></div><div>HTH,</div><div>Dave</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 9, 2016 at 4:24 PM, Dan Lipsa <span dir="ltr"><<a href="mailto:dan.lipsa@kitware.com" target="_blank">dan.lipsa@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I did not have --show-leak-kinds=all. This is the new result:<div><br></div><div><div>==492== HEAP SUMMARY:</div><div>==492==     in use at exit: 113 bytes in 3 blocks</div><div>==492==   total heap usage: 28,104 allocs, 28,101 frees, 18,108,567 bytes allocated</div><div>==492== </div><div>==492== 24 bytes in 1 blocks are still reachable in loss record 1 of 3</div><div>==492==    at 0x4C2C857: malloc (vg_replace_malloc.c:291)</div><div>==492==    by 0xE42680D: XextCreateExtension (in /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0)</div><div>==492==    by 0x8AEBF37: ??? (in /usr/lib/nvidia-304/libGL.so.304.131)</div><div>==492==    by 0x105A05DF: ???</div><div>==492== </div><div>==492== 32 bytes in 1 blocks are still reachable in loss record 2 of 3</div><div>==492==    at 0x4C2AAE8: calloc (vg_replace_malloc.c:618)</div><div>==492==    by 0xE62D68F: _dlerror_run (dlerror.c:141)</div><div>==492==    by 0xE62D197: dlsym (dlsym.c:70)</div><div>==492==    by 0x8B1410D: ??? (in /usr/lib/nvidia-304/libGL.so.304.131)</div><div>==492==    by 0x8D4471F: ??? (in /usr/lib/nvidia-304/libGL.so.304.131)</div><div>==492==    by 0x8D7561F: ???</div><div>==492==    by 0x8B2AAF4: ??? (in /usr/lib/nvidia-304/libGL.so.304.131)</div><div>==492== </div><div>==492== 57 bytes in 1 blocks are still reachable in loss record 3 of 3</div><div>==492==    at 0x4C2C857: malloc (vg_replace_malloc.c:291)</div><div>==492==    by 0x8B1134C: ??? (in /usr/lib/nvidia-304/libGL.so.304.131)</div><div>==492==    by 0x61642F656D6F682E: ???</div><div>==492==    by 0x732F617370696C6D: ???</div><div>==492==    by 0x61646376752F6371: ???</div><div>==492==    by 0x6C706D6178652D73: ???</div><div>==492==    by 0x2F6B61656C2F7364: ???</div><div>==492==    by 0x74762F646C697561: ???</div><div>==492==    by 0x79726F6D656D2D6A: ???</div><div>==492== </div><div>==492== LEAK SUMMARY:</div><div>==492==    definitely lost: 0 bytes in 0 blocks</div><div>==492==    indirectly lost: 0 bytes in 0 blocks</div><div>==492==      possibly lost: 0 bytes in 0 blocks</div><div>==492==    still reachable: 113 bytes in 3 blocks</div><div>==492==         suppressed: 0 bytes in 0 blocks</div><div>==492== </div><div>==492== For counts of detected and suppressed errors, rerun with: -v</div><div>==492== Use --track-origins=yes to see where uninitialised values come from</div><div>==492== ERROR SUMMARY: 292 errors from 5 contexts (suppressed: 0 from 0)</div></div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 9, 2016 at 3:46 PM, Aashish Chaudhary <span dir="ltr"><<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Did you run with this option? (See the message below)<span><div><br></div><div><span style="font-size:12.8px"> To see them, rerun with: --leak-check=full --show-leak-kinds=all</span><br></div></span></div><div class="gmail_extra"><div><div><br><div class="gmail_quote">On Thu, Jun 9, 2016 at 2:45 PM, Dan Lipsa <span dir="ltr"><<a href="mailto:dan.lipsa@kitware.com" target="_blank">dan.lipsa@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I did run it, it does not report anything. This is the report for 10 iterations. It was similar for 10000.<div>Maybe the memory is allocated by the driver and not caught by valgrind.<br><div><br></div><div><div>=24195== HEAP SUMMARY:</div><div>==24195==     in use at exit: 113 bytes in 3 blocks</div><div>==24195==   total heap usage: 28,105 allocs, 28,102 frees, 18,108,607 bytes allocated</div><div>==24195== </div><div>==24195== LEAK SUMMARY:</div><div>==24195==    definitely lost: 0 bytes in 0 blocks</div><div>==24195==    indirectly lost: 0 bytes in 0 blocks</div><div>==24195==      possibly lost: 0 bytes in 0 blocks</div><div>==24195==    still reachable: 113 bytes in 3 blocks</div><div>==24195==         suppressed: 0 bytes in 0 blocks</div><div>==24195== Reachable blocks (those to which a pointer was found) are not shown.</div><div>==24195== To see them, rerun with: --leak-check=full --show-leak-kinds=all</div><div>==24195== </div><div>==24195== For counts of detected and suppressed errors, rerun with: -v</div><div>==24195== Use --track-origins=yes to see where uninitialised values come from</div><div>==24195== ERROR SUMMARY: 292 errors from 5 contexts (suppressed: 0 from 0)</div></div><div><br></div></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 9, 2016 at 2:24 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If you are on linux, can you run valgrind on this?<br>
<br>
Bill<br>
<div><div><br>
On Thu, Jun 9, 2016 at 1:37 PM, Dan Lipsa <<a href="mailto:dan.lipsa@kitware.com" target="_blank">dan.lipsa@kitware.com</a>> wrote:<br>
> Hi all,<br>
> Does anybody have seen or has advice on fixing the following bug.<br>
> Thank you.<br>
><br>
> <a href="http://www.vtk.org/Bug/view.php?id=16744" rel="noreferrer" target="_blank">http://www.vtk.org/Bug/view.php?id=16744</a><br>
><br>
> I paste here a portion of the test I am using. The whole test is in mantis.<br>
><br>
> 10000 iterations of Render leak about 20MB according the reports from the<br>
> OS. The render window is kept around and the renderer and all other objects<br>
> are deleted and and re-added at each iteration.<br>
><br>
> The same program does not leak for onscreen OpenGL or offscreen/onscreen<br>
> OpenGL2.<br>
><br>
><br>
><br>
> void iteration(int i, vtkRenderWindow* renderWindow)<br>
> {<br>
>   vtkSmartPointer<vtkCylinderSource> cylinder =<br>
>     vtkSmartPointer<vtkCylinderSource>::New();<br>
>   cylinder->SetResolution(8);<br>
><br>
>   vtkSmartPointer<vtkPolyDataMapper> cylinderMapper =<br>
>     vtkSmartPointer<vtkPolyDataMapper>::New();<br>
>   cylinderMapper->SetInputConnection(cylinder->GetOutputPort());<br>
><br>
>   vtkSmartPointer<vtkActor> cylinderActor =<br>
>     vtkSmartPointer<vtkActor>::New();<br>
>   cylinderActor->SetMapper(cylinderMapper);<br>
>   cylinderActor->GetProperty()->SetColor(1.0000, 0.3882, 0.2784);<br>
>   cylinderActor->RotateX(30.0);<br>
>   cylinderActor->RotateY(-45.0);<br>
><br>
>   vtkSmartPointer<vtkRenderer> renderer =<br>
>     vtkSmartPointer<vtkRenderer>::New();<br>
>   renderer->AddActor(cylinderActor);<br>
>   renderer->SetBackground(0.1, 0.2, 0.4);<br>
>   // Zoom in a little by accessing the camera and invoking its "Zoom"<br>
> method.<br>
>   renderer->ResetCamera();<br>
><br>
>   renderWindow->AddRenderer(renderer);<br>
>   renderWindow->Render();<br>
>   renderWindow->RemoveRenderer(renderer);<br>
> }<br>
><br>
> int main()<br>
> {<br>
>   vtkSmartPointer<vtkRenderWindow> renderWindow =<br>
>     vtkSmartPointer<vtkRenderWindow>::New();<br>
>   renderWindow->SetSize(200, 200);<br>
>   //renderWindow->OffScreenRenderingOn();<br>
>   for (int i = 0; i < 10000; ++i)<br>
>     {<br>
>     iteration(i, renderWindow);<br>
>     if (i % 10 == 0)<br>
>       {<br>
>       std::cout << i << " ==== Iteration ====" << std::endl;<br>
>       os_memory_usage();<br>
>       }<br>
>     }<br>
>   return 0;<br>
> }<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtk-developers</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
><br>
><br>
<span><font color="#888888"><br>
<br>
<br>
--<br>
Unpaid intern in BillsBasement at noware dot com<br>
</font></span></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
<br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br></div></div><span><font color="#888888"><div data-smartmail="gmail_signature"><div dir="ltr"><font face="trebuchet ms, sans-serif"><i>| Aashish Chaudhary <br>| Technical Leader         <br>| Kitware Inc.            <br></i></font><div><i><font face="trebuchet ms, sans-serif">| </font><a href="http://www.kitware.com/company/team/chaudhary.html" target="_blank">http://www.kitware.com/company/team/chaudhary.html</a></i></div></div></div>
</font></span></div>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
<br>
<br></blockquote></div><br></div>