[Bug 82683] Segfault in glBufferSubData

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Sep 15 00:18:29 PDT 2014


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

--- Comment #9 from Iago Toral <itoral at igalia.com> ---
(In reply to comment #6)
(...)
> Frankly, I'm a bit loathe to fix these, as it adds overhead (even if not
> much) to well behaved applications, to try and provide a better error report
> to applications which are clearly broken.  Most applications don't even try
> to handle GL_OUT_OF_MEMORY, because in order to notice, they'd have to call
> glGetError() after virtually every API call...which is a widely known way to
> make your application horribly slow.  Without doing that, you don't know
> what API calls actually failed, so how can you recover from it?  And even if
> you know exactly what failed...you still have to be able to stop what you're
> doing, delete a bunch of things, and recover sensibly...which is a pretty
> heroic task.

FWIW, I totally agree with this.

(In reply to comment #7)
> Sorry, can someone help me understand how this did turn out to be an OOM
> issue?
> 
> At 128000 buffers x 2^7 bytes per buffer, I get segfaults.
> At 64000 buffers x 2^14 bytes per buffer, it completes fine.
> At 64000 buffers x 2^15 bytes per buffer, the OS kills the program for using
> too much RAM. It says "Killed". It doesn't segfault.

>From the results, it seems like the kernel drm module has some limit on the
number of buffers it can allocate. Indeed, if I reduce the size of the data to
a single float per buffer it still segfaults at 128000 buffers.

At least on my SNB, the limit is close to 2^16 (65536 buffers). It starts to
segfault a  bit before that (around 65300) but I guess that is probably because
other apps in my desktop and the desktop itself are also allocating buffers
from the driver.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20140915/a0449db8/attachment.html>


More information about the intel-3d-bugs mailing list