<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - leak due spice-widget-egl"
href="https://bugs.freedesktop.org/show_bug.cgi?id=95335">95335</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>leak due spice-widget-egl
</td>
</tr>
<tr>
<th>Product</th>
<td>Spice
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>spice-gtk
</td>
</tr>
<tr>
<th>Assignee</th>
<td>spice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>bugzilla@victortoso.com
</td>
</tr></table>
<p>
<div>
<pre>Leak is:
==30366== 72,704 bytes in 1 blocks are definitely lost in loss record 9,971 of
9,978
==30366== at 0x4C28BF6: malloc (vg_replace_malloc.c:299)
==30366== by 0x3962AEDF: ???
==30366== by 0x400F749: call_init.part.0 (dl-init.c:72)
==30366== by 0x400F85A: call_init (dl-init.c:30)
==30366== by 0x400F85A: _dl_init (dl-init.c:120)
==30366== by 0x40143B1: dl_open_worker (dl-open.c:564)
==30366== by 0x400F5F3: _dl_catch_error (dl-error.c:187)
==30366== by 0x40136B2: _dl_open (dl-open.c:649)
==30366== by 0xC45EFC8: dlopen_doit (dlopen.c:66)
==30366== by 0x400F5F3: _dl_catch_error (dl-error.c:187)
==30366== by 0xC45F630: _dlerror_run (dlerror.c:163)
==30366== by 0xC45F060: dlopen@@GLIBC_2.2.5 (dlopen.c:87)
==30366== by 0xF0073B5: dri2_open_driver.isra.7 (egl_dri2.c:452)
Tracking this with gdb:
Breakpoint 1, dri2_open_driver (disp=0xadfee0) at drivers/dri2/egl_dri2.c:419
419 dri2_open_driver(_EGLDisplay *disp)
(gdb) bt
#0 dri2_open_driver (disp=0xadfee0) at drivers/dri2/egl_dri2.c:419
#1 0x00007fffed9ff092 in dri2_load_driver_dri3 (disp=disp@entry=0xadfee0) at
drivers/dri2/egl_dri2.c:508
#2 0x00007fffeda01e77 in dri2_initialize_x11_dri3 (drv=<optimized out>,
disp=0xadfee0) at drivers/dri2/platform_x11.c:1292
#3 dri2_initialize_x11 (drv=<optimized out>, disp=0xadfee0) at
drivers/dri2/platform_x11.c:1464
#4 0x00007fffed9fb8ff in _eglMatchAndInitialize (dpy=0xadfee0) at
main/egldriver.c:261
#5 0x00007fffed9fb9b9 in _eglMatchDriver (dpy=dpy@entry=0xadfee0,
test_only=test_only@entry=0) at main/egldriver.c:292
#6 0x00007fffed9f7d32 in eglInitialize (dpy=0xadfee0, major=0x7fffffffb67c,
minor=0x7fffffffb680) at main/eglapi.c:482
#7 0x00007ffff7599cb7 in spice_egl_init (display=display@entry=0xaa0440,
err=err@entry=0x7fffffffb6c0) at spice-widget-egl.c:226
#8 0x00007ffff75938d6 in drawing_area_realize (area=0x6ab3b0,
user_data=<optimized out>) at spice-widget.c:571
Looking at khronos docs, eglInitialize [0] says that we must eglTerminate [1]
to release resources, which we do. eglTerminate docs also says:
<span class="quote">> (...) they are not released until they are no longer current as a result of
> eglMakeCurrent.</span >
but we are calling eglMakeCurrent correctly just before eglTerminate... so I
guess it could be some race conditions that makes dlclose() nerver be called?
[0] <a href="https://www.khronos.org/registry/egl/sdk/docs/man/html/eglInitialize.xhtml">https://www.khronos.org/registry/egl/sdk/docs/man/html/eglInitialize.xhtml</a>
[1] <a href="https://www.khronos.org/registry/egl/sdk/docs/man/html/eglTerminate.xhtml">https://www.khronos.org/registry/egl/sdk/docs/man/html/eglTerminate.xhtml</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>