Bug 109641 - GLX swrast driver leaks shared memory segments
Summary: GLX swrast driver leaks shared memory segments
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/llvmpipe (show other bugs)
Version: 18.0
Hardware: All Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-15 15:26 UTC by Marcello Blancasio
Modified: 2019-03-13 03:12 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Marcello Blancasio 2019-02-15 15:26:58 UTC
Using Gnome 3.28 (CentOS 7.6) with llvmpipe driver, Mesa 18.0, but same problem exists with Gnome 3.30 (Ubuntu 18.10), Mesa 18.2.

Opened a Gnome Terminal window.

New shared memory segments are created every time the terminal window is resized (found it with: ipcs -m | wc -l).

It looks XShmAttach() is called in src/glx/drisw_glx.c:XCreateDrawable(), but XShmDetach() is never called. Should it be called in XDestroyDrawable()?
Comment 1 Brian Paul 2019-03-12 01:27:48 UTC
I believe this recent patch should help:

commit b344e32cdf7064a1f2ff7ef37027edda6589404f
Author: Ray Zhang <zhanglei002@gmail.com>
Date:   Wed Feb 27 06:54:05 2019 +0000

    glx: fix shared memory leak in X11
    
    call XShmDetach to allow X server to free shared memory
    
    Fixes: bcd80be49a8260c2233d "drisw/glx: use XShm if possible"
    Signed-off-by: Ray Zhang <zhanglei002@gmail.com>
    Reviewed-by: Dave Airlie <airlied@redhat.com>


Can you try top-of-tree Mesa?
Comment 2 Brian Paul 2019-03-12 01:37:58 UTC
And it appears this patch will be in the Mesa 19.0 release.
Comment 3 Marcello Blancasio 2019-03-12 14:45:56 UTC
The patch fixed the issue. Thank you.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.