<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Segfault in glBufferSubData"
href="https://bugs.freedesktop.org/show_bug.cgi?id=82683#c9">Comment # 9</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Segfault in glBufferSubData"
href="https://bugs.freedesktop.org/show_bug.cgi?id=82683">bug 82683</a>
from <span class="vcard"><a class="email" href="mailto:itoral@igalia.com" title="Iago Toral <itoral@igalia.com>"> <span class="fn">Iago Toral</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=82683#c6">comment #6</a>)
(...)
<span class="quote">> 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.</span >
FWIW, I totally agree with this.
(In reply to <a href="show_bug.cgi?id=82683#c7">comment #7</a>)
<span class="quote">> 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.</span >
>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>