* [Bug 93004] Guild Wars 2 crash on nouveau DX11 cards
[not found] ` <bug-93004-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
@ 2015-11-19 16:59 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2015-11-19 19:02 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2015-11-19 16:59 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1: Type: text/plain, Size: 319 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=93004
--- Comment #1 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> ---
Where is the trace? Could you educate me on how to replay it myself?
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1058 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 8+ messages in thread* [Bug 93004] Guild Wars 2 crash on nouveau DX11 cards
[not found] ` <bug-93004-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
2015-11-19 16:59 ` [Bug 93004] " bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2015-11-19 19:02 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2015-11-20 7:15 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2015-11-19 19:02 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1: Type: text/plain, Size: 764 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=93004
--- Comment #2 from Patrick Rudolph <siro-afHDD34IFkZrovVCs/uTlw@public.gmane.org> ---
Here's the trace (86MByte):
https://drive.google.com/file/d/0ByOfJQh38LRvSHk5YjgwdzVuRWc/view?usp=sharing
You need apitrace:
http://people.freedesktop.org/~jrfonseca/apitrace/
Run it using Gallium nine enabled wine:
wine ./apitrace-msvc/x86/bin/d3dretrace.exe Gw2.trace
To get the valgrind output I used:
valgrind -v --track-origins=yes --leak-check=full --trace-children=yes
--vex-iropt-register-updates=allregs-at-mem-access --workaround-gcc296-bugs=yes
wine ./apitrace-msvc/x86/bin/d3dretrace.exe Gw2.trace
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1663 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 8+ messages in thread* [Bug 93004] Guild Wars 2 crash on nouveau DX11 cards
[not found] ` <bug-93004-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
2015-11-19 16:59 ` [Bug 93004] " bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2015-11-19 19:02 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2015-11-20 7:15 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2015-12-01 8:23 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2015-11-20 7:15 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1: Type: text/plain, Size: 691 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=93004
--- Comment #3 from Patrick Rudolph <siro-afHDD34IFkZrovVCs/uTlw@public.gmane.org> ---
For the crash that occurs in nvc0_clear() I found it is likely a use after
free.
It accesses a pipe_resource that has been destroyed, but is still bound.
The correct behaviour of nine would be to call set_vertex_buffers(..., NULL)
first and then destroy the resource.
What does OpenGL on vertexbuffer destruction ?
Question is why does it work on other drivers, like R600 ?
For the second crash in nvc0_draw_vbo() I'm still investigating.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1433 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 8+ messages in thread* [Bug 93004] Guild Wars 2 crash on nouveau DX11 cards
[not found] ` <bug-93004-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
` (2 preceding siblings ...)
2015-11-20 7:15 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2015-12-01 8:23 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2015-12-03 17:57 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2015-12-01 8:23 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1: Type: text/plain, Size: 1060 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=93004
--- Comment #4 from Patrick Rudolph <siro-afHDD34IFkZrovVCs/uTlw@public.gmane.org> ---
For the second crash I found I simple solution:
It crashes in nvc0_vbo.c:static void nvc0_validate_vertex_buffers_shared(struct
nvc0_context *nvc0), as buf is NULL:
396: buf = nv04_resource(vb->buffer);
397: offset = vb->buffer_offset;
398: limit = buf->base.width0 - 1;
I'm not sure why it is possible to get to this point with a NULL vertex buffer
and a NULL user_buffer. Nine seems to take care and only sets non NULL buffers.
For some reason nvc0->num_vtxbufs always includes an additional NULL vb...
I fixed this problem by adding:
396: buf = nv04_resource(vb->buffer);
if (!buf) continue;
397: offset = vb->buffer_offset;
398: limit = buf->base.width0 - 1;
With this fixed Guild Wars 2 doesn't crash in every pipe->draw_vbo.
I was able to play the game for a few minutes.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1826 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 8+ messages in thread* [Bug 93004] Guild Wars 2 crash on nouveau DX11 cards
[not found] ` <bug-93004-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
` (3 preceding siblings ...)
2015-12-01 8:23 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2015-12-03 17:57 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2015-12-03 18:28 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2015-12-09 20:51 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
6 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2015-12-03 17:57 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1: Type: text/plain, Size: 604 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=93004
--- Comment #5 from Patrick Rudolph <siro-afHDD34IFkZrovVCs/uTlw@public.gmane.org> ---
For the first crash when calling nvc0_clear(), it crashes here:
in file
nvc_context.c
in function
void nvc0_bufctx_fence(struct nvc0_context *nvc0, struct nouveau_bufctx
*bufctx, bool on_flush)
in line
403: if (res)
404: nvc0_resource_validate(res, (unsigned)ref->priv_data);
as the pipe_resource res is pointing to has been already freed.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1349 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 8+ messages in thread* [Bug 93004] Guild Wars 2 crash on nouveau DX11 cards
[not found] ` <bug-93004-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
` (4 preceding siblings ...)
2015-12-03 17:57 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2015-12-03 18:28 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2015-12-09 20:51 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
6 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2015-12-03 18:28 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1: Type: text/plain, Size: 562 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=93004
--- Comment #6 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> ---
nvc0->dirty |= NVC0_NEW_ARRAYS;
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_VTX);
can you stick these 2 lines in under the if (!vb) section of
nvc0_set_vertex_buffers and see if that improves things? I need to think about
why those aren't already there... perhaps there's a reason. Doubtful though.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1307 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 8+ messages in thread* [Bug 93004] Guild Wars 2 crash on nouveau DX11 cards
[not found] ` <bug-93004-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
` (5 preceding siblings ...)
2015-12-03 18:28 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2015-12-09 20:51 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
6 siblings, 0 replies; 8+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2015-12-09 20:51 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1: Type: text/plain, Size: 1535 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=93004
Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> ---
Pushed this out as:
commit 432a798cf5c7fab18a3e32d4073840df7d0d37cb
Author: Patrick Rudolph <siro-afHDD34IFkZrovVCs/uTlw@public.gmane.org>
Date: Sun Dec 6 10:11:59 2015 +0100
nv50,nvc0: fix use-after-free when vertex buffers are unbound
Always reset the vertex bufctx to make sure there's no pointer to
an already freed pipe_resource left after unbinding buffers.
Fixes use after free crash in nvc0_bufctx_fence().
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93004
Signed-off-by: Patrick Rudolph <siro-afHDD34IFkZrovVCs/uTlw@public.gmane.org>
[imirkin: simplify nvc0 fix, apply to nv50]
Signed-off-by: Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
Cc: "11.0 11.1" <mesa-stable-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
I believe this should fix everything. Not sure why you didn't see issues with a
G84... probably gets lucky somehow. Thanks for debugging it and tracking the
issue down!
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 3241 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 8+ messages in thread