https://bugs.freedesktop.org/show_bug.cgi?id=39320
Summary: util/u_upload_mgr.c:192:u_upload_alloc: Assertion `offset < upload->buffer->width0' failed. Product: Mesa Version: git Platform: Other URL: http://bugs.winehq.org/show_bug.cgi?id=27823 OS/Version: All Status: NEW Severity: normal Priority: medium Component: Drivers/Gallium/r300 AssignedTo: dri-devel@lists.freedesktop.org ReportedBy: hramrach@gmail.com
This happens when running d3d application in recent wine with MESA_EXTENSION_OVERRIDE="-GL_ARB_map_buffer_range"
https://bugs.freedesktop.org/show_bug.cgi?id=39320
--- Comment #1 from Marek Olšák maraeo@gmail.com 2011-07-18 18:18:00 PDT --- Could you please attach an apitrace file?
Apitrace can record and replay OpenGL commands. You can get it here: https://github.com/apitrace/apitrace
https://bugs.freedesktop.org/show_bug.cgi?id=39320
--- Comment #2 from Michal Suchanek hramrach@gmail.com 2011-07-19 06:09:04 PDT --- Can't.
The trace file is 6.7M gzipped and the attachment limit is 3000k.
It is trace from the start of the application to the point where it finishes initialization, tries to render the first scene and triggers the assert.
glretrace complains that the last call is incomplete whatever that means:
warning: incomplete call glDrawElementsBaseVertex 27826 glDrawElementsBaseVertex(mode = GL_TRIANGLE_STRIP, count = 110, type = GL_UNSIGNED_SHORT, indices = blob(220), basevertex = 54)
Tried taking glretrace snapshots with -s. They are all small black squares. With -sb and -s I get errors about GL_BACK being invalid but every other snapshot contains the application loading screen (upside down).
https://bugs.freedesktop.org/show_bug.cgi?id=39320
--- Comment #3 from Marek Olšák maraeo@gmail.com 2011-09-11 00:55:56 PDT --- I couldn't reproduce this with the Wine D3D9 tests.
Can you attach the full backtrace of the crash? Knowing the values of local variables and upload->buffer->width0 would be useful too. Alternatively, you can update your apitrace and give it a try again.
https://bugs.freedesktop.org/show_bug.cgi?id=39320
--- Comment #4 from Michal Suchanek hramrach@gmail.com 2011-09-11 01:51:02 PDT --- I think that the reason apitrace does not finish the trace properly is that Mesa aborts and apitrace runs in the aborted process so there is not much that can be done.
I can't really debug wine because it is i386, not amd64.
I could perhaps try building more recent mesa to see if the issue is gone yet.
https://bugs.freedesktop.org/show_bug.cgi?id=39320
--- Comment #5 from Marek Olšák maraeo@gmail.com 2011-09-11 01:57:41 PDT --- You may set:
export GALLIUM_ABORT_ON_ASSERT=0
to disable abort() on assertions.
https://bugs.freedesktop.org/show_bug.cgi?id=39320
--- Comment #6 from Michal Suchanek hramrach@gmail.com 2011-09-11 16:10:26 PDT --- Hmm, current apitrace can't trace the program, it segfaults.
Also retracing a trace which would lead to the assertion causes glretrace segfault.
This is somewhat different from what I got previously but not exactly helpful except perhaps as a sample trace showing apitrace problems.
https://bugs.freedesktop.org/show_bug.cgi?id=39320
--- Comment #7 from Michal Suchanek hramrach@gmail.com 2011-09-19 09:39:58 PDT --- According to apitrace author the glretrace crash is due to gallium reading more data than is in the buffer.
https://github.com/apitrace/apitrace/issues/39#issuecomment-2134199
https://bugs.freedesktop.org/show_bug.cgi?id=39320
--- Comment #8 from Marek Olšák maraeo@gmail.com 2011-09-19 12:44:51 PDT --- Created an attachment (id=51371) View: https://bugs.freedesktop.org/attachment.cgi?id=51371 Review: https://bugs.freedesktop.org/review?bug=39320&attachment=51371
print debug info
I think it crashes because offset >= upload->buffer->width0.
Could you apply the attached patch and post the output of stderr?
https://bugs.freedesktop.org/show_bug.cgi?id=39320
--- Comment #9 from Michal Suchanek hramrach@gmail.com 2011-09-19 14:52:19 PDT --- I get this extra output:
u_vbuf_upload_buffers u_vbuf_upload_buffers u_vbuf_upload_buffers u_vbuf_upload_buffers u_vbuf_upload_buffers u_vbuf_upload_buffers u_vbuf_upload_buffers u_upload_alloc:194: min_out_offset = 4294966000, size = 1296, alloc_size = 1296, alloc_offset = 4294966000, upload->offset = 322528, upload->size = 1048576, upload->buffer->width0 = 1048576, offset = 4294966000 util/u_upload_mgr.c:195:u_upload_alloc: Assertion `offset < upload->buffer->width0' failed.
https://bugs.freedesktop.org/show_bug.cgi?id=39320
--- Comment #10 from Michal Suchanek hramrach@gmail.com 2011-09-19 15:36:08 PDT --- Created an attachment (id=51377) --> (https://bugs.freedesktop.org/attachment.cgi?id=51377) backtrace of glretrace
backtrace of glretrace on older unpatched mesa
https://bugs.freedesktop.org/show_bug.cgi?id=39320
Michal Suchanek hramrach@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #51377|text/x-log |text/plain mime type| |
https://bugs.freedesktop.org/show_bug.cgi?id=39320
--- Comment #11 from Marek Olšák maraeo@gmail.com 2011-09-20 01:55:38 PDT --- Can you send me the trace file that glretrace crashes with?
https://bugs.freedesktop.org/show_bug.cgi?id=39320
--- Comment #12 from Marek Olšák maraeo@gmail.com 2011-09-26 09:13:55 PDT --- The trace helped me to identify and fix the bug. Mesa master should work now. Could you test it?
https://bugs.freedesktop.org/show_bug.cgi?id=39320
Michal Suchanek hramrach@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #13 from Michal Suchanek hramrach@gmail.com 2011-09-27 03:40:53 PDT --- Yes, with mesa master the crash no longer happens.
Thanks
dri-devel@lists.freedesktop.org