You can easily get Xorg killed by the OOM handler by running:
LIBGL_ALWAYS_INDIRECT=1 piglit run all results
I haven't debugged where it is leaking so I don't know if this is an Xorg or Mesa issue, but I'll start by filing a bug here. :)
Tested with xorg-x11-server-Xorg-1.18.0-0.4.20150907.fc23.x86_64 and mesa-libGL-11.0.0-2.20150913.fc23.x86_64 as well as TigerVNC based on Xorg 1.14 and Mesa 9.1.1.
Created attachment 123642 [details]
Here is a valgrind run from Xvnc built on Xorg 1.14.0 and Mesa 9.1.1 and just the "llvmpipe" tests of piglit.
Pretty sure this was fixed by:
Author: Guilherme Quentel Melo <firstname.lastname@example.org>
Date: Tue May 10 00:29:58 2016 +0000
glx: avoid memory leak when using indirect rendering
When multiple processes are using GL with indirect rendering a race
condition can make drawables refcount never drop to zero.
This situation could happen when there are many X clients using indirect
1 - client1: calls glXMakeCurrent
2 - client2: calls glXMakeCurrent
This is the first context switch for this client. So old_context_tag=0
3 - client1: calls glXRender
For the client, its context is already current.
For the server side lastGLContext points to client2's context.
Reviewed-by: Adam Jackson <email@example.com>
Signed-off-by: Guilherme Quentel Melo <firstname.lastname@example.org>