[Mesa-dev] [Bug 100741] Chromium - Memory leak

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Apr 20 20:17:44 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=100741

            Bug ID: 100741
           Summary: Chromium - Memory leak
           Product: Mesa
           Version: git
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Mesa core
          Assignee: mesa-dev at lists.freedesktop.org
          Reporter: bartosz.tomczyk86 at gmail.com
        QA Contact: mesa-dev at lists.freedesktop.org

Hi,

I observe huge memory leak in chromium browser:

Memory allocation:
==19259== 593,808 (590,328 direct, 3,480 indirect) bytes in 2,733 blocks are
definitely lost in loss record 5,325 of 5,331
==19259==    at 0x4C2CF35: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19259==    by 0x9BAC22F: r600_create_surface_custom (r600_texture.c:1935)
==19259==    by 0x9BACA94: r600_create_surface (r600_texture.c:1989)
==19259==    by 0x97CE93F: st_framebuffer_validate (st_manager.c:222)
==19259==    by 0x97CFBEE: st_api_make_current (st_manager.c:808)
==19259==    by 0x9931097: dri_make_current (dri_context.c:258)
==19259==    by 0x992FD64: driBindContext (dri_util.c:555)
==19259==    by 0x7E5A19E: dri3_bind_context (dri3_glx.c:235)
==19259==    by 0x7E27AB3: MakeContextCurrent (glxcurrent.c:228)

Memory not freed in:
st_renderbuffer_delete+0x243b58: state_tracker/st_cb_fbo.c:246
_mesa_reference_renderbuffer_+0x1997d0: main/renderbuffer.c:212
_mesa_reference_renderbuffer+0x1259d1: main/renderbuffer.h:72
_mesa_free_framebuffer_data+0x1259d1: main/framebuffer.c:223
_mesa_destroy_framebuffer+0x125ad0: main/framebuffer.c:199
_mesa_reference_framebuffer_+0x125b78: main/framebuffer.c:256
_mesa_reference_framebuffer+0x8b5b7: main/framebuffer.h:63
_mesa_make_current+0x8b5b7: main/context.c:1674
st_api_make_current+0x294cba: state_tracker/st_manager.c:827
dri_unbind_context+0x3f5f7d: src/gallium/state_trackers/dri/dri_context.c:217
driUnbindContext+0x3f57ec: src/mesa/drivers/dri/common/dri_util.c:591
MakeContextCurrent+0x164: src/glx/glxcurrent.c:214

Memory is not freed in st_renderbuffer_delete because ctx is NULL.
    if (ctx) {
       struct st_context *st = st_context(ctx);
       pipe_surface_release(st->pipe, &strb->surface);
    }

Changing above part of code to :
    pipe_surface_reference(&strb->surface, NULL);
or
    pipe_surface_release(strb->surface->context, &strb->surface);

fixes problem for me, but I'm not sure if it is correct way of doing it.
Could someone comment on this?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170420/e69cce92/attachment.html>


More information about the mesa-dev mailing list