[osg-users] VAO Resource Leak in OSG 3.6.2

Daniel Emminizer, Code 5773 dan.emminizer at nrl.navy.mil
Mon Aug 13 09:23:18 PDT 2018


Hi Guy,

I attached to the original issue a use case that reproduces the problem.  glDeleteVertexArrays() is never called on many of the arrays, although the associated geometry is destroyed.  This goes until exit.  The VAOs leak.  This can be verified by running a profiler on GL and examining the OpenGL commands executed.  The example does not use osgDB and wouldn't have CACHE_NODES enabled; please let me know if you think otherwise, I'd like to learn more.

Earlier someone mentioned not having a memory leak with this; but I am seeing on Windows and Linux associated and significant growth (over time) with these lost VAOs in Task Manager (Windows) and in top (Linux).  So although it's technically a resource leak, that resource has (at least on my system) real memory associated with the running application.

I'm seeing this because real apps out there are encountering SIGKILL conditions under Linux due to running into the out-of-memory (OOM) handler.  The code in the PR prevents this.  Though as Julien points out, the PR could have issues with shared arrays amongst multiple geometries, but I don't have that use case in my apps and I do not see any examples in OSG that demonstrate this capability.  We patched locally to prevent this SIGKILL in live code and have had no further reported issues in the last week and a half about it.

Hope this helps explain.  Thanks,

 - Dan



> -----Original Message-----
> From: osg-users [mailto:osg-users-bounces at lists.openscenegraph.org] On
> Behalf Of Guy Volckaert
> Sent: Monday, August 13, 2018 12:14 PM
> To: osg-users at lists.openscenegraph.org
> Subject: Re: [osg-users] VAO Resource Leak in OSG 3.6.2
> 
> Julien,
> 
> Yo may want to verify if you have CACHE_NODES enabled. If so, then you
> may think there's a resource leak but in fact the scene graph leading to your
> Geometry may be cached by OSG.
> 
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=74511#74511
> 
> 
> 
> 
> 
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


More information about the osg-users mailing list