[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg
Subject: Small leak in X server process after open/close from client
From: Nick Veys <psylence519 () gmail ! com>
Date: 2011-01-24 22:50:12
Message-ID: AANLkTinqL6bT-e_sGyikJw-Vwoi4Sz9tDHYNZ3qx_hxw () mail ! gmail ! com
[Download RAW message or body]
Using R7.5 with xserver v1.7.1 and vesa driver 2.3.0, it appears a
small leak occurs on each XOpenDisplay/XCloseDisplay call pair. This
was encountered during some unrelated testing, and eventually
distilled down to those 2 calls.
Previously on 6.9.0 this leak did not occur. Our application makes
multiple connections over time to the X server, I fear I'm simply
doing something wrong or abusive here, is this a known issue?
With the attached trivial test snippet (just XOpenDisplay followed by
XCloseDisplay), running it continually increases the memory owned by
the X process until it is eventually oom-killed some hours later. I'm
working to remedy the limited debugging utilities available on the
target machine to get more details.
Bug 25029 [1] seemed close, but feels unrelated due to those functions
being called on initialization, not per-connection (unless that's not
the case of course).
[1] https://bugs.freedesktop.org/show_bug.cgi?id=25029
["openclose.c" (text/x-csrc)]
#include <X11/Xlib.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
unsigned long int cnt = 0l;
while (1)
{
Display* display = XOpenDisplay(NULL);
assert(display);
XCloseDisplay(display);
if (!(++cnt % 1000))
{
printf("%8ld iterations complete...\n", cnt);
}
}
return 0;
}
_______________________________________________
xorg@lists.freedesktop.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.freedesktop.org/mailman/listinfo/xorg
Your subscription address: freedesktop-xorg@progressive-comp.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic