<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - System hang when use glTexImage3D to specify a 3D texture image"
href="https://bugs.freedesktop.org/show_bug.cgi?id=104760">104760</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>System hang when use glTexImage3D to specify a 3D texture image
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr>
<tr>
<th>Version</th>
<td>17.2
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Drivers/DRI/i965
</td>
</tr>
<tr>
<th>Assignee</th>
<td>intel-3d-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>xinghua.cao@intel.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>intel-3d-bugs@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=136929" name="attach_136929" title="text3dsizelimit.c">attachment 136929</a> <a href="attachment.cgi?id=136929&action=edit" title="text3dsizelimit.c">[details]</a></span>
text3dsizelimit.c
Produce steps:
1. Attached file is the C source code;
2. Build the source file(I built it on Ubuntu 17.10, IntelĀ® HD Graphics
(Coffeelake 3x8 GT2)), "gcc -o tex3dsizelimit tex3dsizelimit.c -lX11 -lepoxy";
3. run "./tex3dsizelimit", system hangs.
Actually, this issue reported form WebGL Conformance Tests. If you want to
reproduce this issue on chrome, follow below steps:
1. Download latest chrome and install it on Ubuntu 17.10.
2. Open chrome, and open the link,
<a href="https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/misc/tex-3d-size-limit.html?webglVersion=2&quiet=0">https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/misc/tex-3d-size-limit.html?webglVersion=2&quiet=0</a>
3. system also hangs.
I had checked the linux kernel log, and it report some messages as below:
tex3dsizelimit: page allocation stalls for 32092ms, order:0,
mode:0x14204d2(GFP_HIGHUSER|__GFP_RETRY_MAYFAIL|__GFP_RECLAIMABLE),
nodemask=(null)
The root cause seemed that could not alloc big memory for texture image.
In this case, calls TexImage3D to specify the texture image from level
maxLevels to level 0.
for(int i = 0; i < maxLevels; i++)
{
int size = 1 << i;
int level = maxLevels - i - 1;
glTexImage3D(GL_TEXTURE_3D, level, GL_RGBA, size, 1, 1, 0, GL_RGBA,
GL_UNSIGNED_BYTE, NULL);
}
If calls TexImage3D to specify the texture image from level 0 to level
maxLevels, the system will not hang.
Is there different memory alloc memory machanism between these two situations?
Is every TexImage3D call realloc a new and entire texture images?
Or may I not follow spec to use TexImage3D?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>