From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ@public.gmane.org Subject: [Bug 99464] New: openmw - Segfault with the nouveau ddx + DRI3 Date: Thu, 19 Jan 2017 23:45:53 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1807973749==" Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: nouveau-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Sender: "Nouveau" To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org List-Id: nouveau.vger.kernel.org --===============1807973749== Content-Type: multipart/alternative; boundary="14848695530.5E094da.9460"; charset="UTF-8" --14848695530.5E094da.9460 Date: Thu, 19 Jan 2017 23:45:53 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D99464 Bug ID: 99464 Summary: openmw - Segfault with the nouveau ddx + DRI3 Product: Mesa Version: git Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: normal Priority: medium Component: Drivers/DRI/nouveau Assignee: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Reporter: ovariegata-/E1597aS9LQAvxtiuMwx3w@public.gmane.org QA Contact: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Created attachment 129055 --> https://bugs.freedesktop.org/attachment.cgi?id=3D129055&action=3Dedit Apitrace. When starting openmw which is the free engine re-implementation of the game morrowind it will segfault. This may be a mesa core bug, but it will only happen with the nouveau DDX + DRI3. It will not crash with modesetting + DR= I3, DRI2 or the llvmpipe. Here is a backtrace. http://pastebin.com/HMdv4iWb Apitrace log. http://pastebin.com/FzZVyGqW Here is a workaround as reported to the the mesa mailing list by Tobias Klausmann. It successfully hides the crash, but potentially breaking the hardware cursor used by openmw which works correctly with DRI2, modesetting= or the llvmpipe. It also was not intended as a real fix. "OpenMW tries to upload a new surface (mouse pointer) which fails in the now guarded update_framebuffer_size() as the surface is NULL. This is not inteded as a real "fix", as it would just hide the immediate cr= ash. So if somebody could take a look at this... Reported-by: Signed-off-by: Tobias Klausmann --- src/mesa/state_tracker/st_atom_framebuffer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c b/src/mesa/state_tracker/st_atom_framebuffer.c index ea41d9d..3ee4ea5 100644 --- a/src/mesa/state_tracker/st_atom_framebuffer.c +++ b/src/mesa/state_tracker/st_atom_framebuffer.c @@ -177,8 +177,10 @@ update_framebuffer_state( struct st_context *st ) /* rendering to a GL texture, may have to update surface */ st_update_renderbuffer_surface(st, strb); } - pipe_surface_reference(&framebuffer->zsbuf, strb->surface); - update_framebuffer_size(framebuffer, strb->surface); + if (strb->surface) { + pipe_surface_reference(&framebuffer->zsbuf, strb->surface); + update_framebuffer_size(framebuffer, strb->surface); + } } else { strb =3D st_renderbuffer(fb->Attachment[BUFFER_STENCIL].Renderbuffer); --=20 2.9.2" --=20 You are receiving this mail because: You are the assignee for the bug. You are the QA Contact for the bug.= --14848695530.5E094da.9460 Date: Thu, 19 Jan 2017 23:45:53 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated
Bug ID 99464
Summary openmw - Segfault with the nouveau ddx + DRI3
Product Mesa
Version git
Hardware x86-64 (AMD64)
OS Linux (All)
Status NEW
Severity normal
Priority medium
Component Drivers/DRI/nouveau
Assignee nouveau@lists.freedesktop.org
Reporter ovariegata@yahoo.com
QA Contact nouveau@lists.freedesktop.org

Created attachment 129055 [deta=
ils]
Apitrace.

When starting openmw which is the free engine re-implementation of the game
morrowind it will segfault. This may be a mesa core bug, but it will only
happen with the nouveau DDX + DRI3. It will not crash with modesetting + DR=
I3,
DRI2 or the llvmpipe.

Here is a backtrace.
http://pastebin.com/HMdv4iWb

Apitrace log.
http://pastebin.com/FzZVyGqW

Here is a workaround as reported to the the mesa mailing list by Tobias
Klausmann. It successfully hides the crash, but potentially breaking the
hardware cursor used by openmw which works correctly with DRI2, modesetting=
 or
the llvmpipe. It also was not intended as a real fix.

"OpenMW tries to upload a new surface (mouse pointer) which fails in t=
he now
guarded update_framebuffer_size() as the surface is NULL.

This is not inteded as a real "fix", as it would just hide the im=
mediate crash.

So if somebody could take a look at this...

Reported-by: <ovariegata@=
;yahoo.com>
Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
---
src/mesa/state_tracker/st_atom_framebuffer.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c
b/src/mesa/state_tracker/st_atom_framebuffer.c
index ea41d9d..3ee4ea5 100644
--- a/src/mesa/state_tracker/st_atom_framebuffer.c
+++ b/src/mesa/state_tracker/st_atom_framebuffer.c
@@ -177,8 +177,10 @@ update_framebuffer_state( struct st_co=
ntext *st )
          /* rendering to a GL texture, may have to update surface */
          st_update_renderbuffer_surface(st, strb);
      }
-      pipe_surface_reference(&framebuffer->zsbuf, strb->surface);
-      update_framebuffer_size(framebuffer, strb->surface);
+      if (strb->surface) {
+        pipe_surface_reference(&framebuffer->zsbuf, strb->surfac=
e);
+        update_framebuffer_size(framebuffer, strb->surface);
+      }
    }
    else {
      strb =3D st_renderbuffer(fb->Attachment[BUFFER_STENCIL].Renderbuff=
er);
--=20
2.9.2"


You are receiving this mail because:
  • You are the assignee for the bug.
  • You are the QA Contact for the bug.
= --14848695530.5E094da.9460-- --===============1807973749== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KTm91dmVhdSBt YWlsaW5nIGxpc3QKTm91dmVhdUBsaXN0cy5mcmVlZGVza3RvcC5vcmcKaHR0cHM6Ly9saXN0cy5m cmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9ub3V2ZWF1Cg== --===============1807973749==--