From: bugzilla-daemon@freedesktop.org Subject: [Bug 106533] r300_dri.so SIGSEGV in llvm_pipeline_generic under Cinnamon Date: Mon, 04 Jun 2018 22:47:01 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1993902666==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 7CBD66EC3F for ; Mon, 4 Jun 2018 22:47:01 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1993902666== Content-Type: multipart/alternative; boundary="15281524212.2fFBe19D2.5030" Content-Transfer-Encoding: 7bit --15281524212.2fFBe19D2.5030 Date: Mon, 4 Jun 2018 22:47:01 +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=3D106533 Roland Scheidegger changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |maraeo@gmail.com --- Comment #4 from Roland Scheidegger --- You have the same tcl-less chipset? So the assembly shows the segfault isn't due to alignment, but simply becau= se it's a null pointer. This is also mesa 18.0? I'm just asking because according to the line numbe= rs (r300_render_stencilref.c:113) it's doing two-sided stencil emulation, whic= h I can't see how it could happen with the emulated clear (which definitely doe= sn't enable two-sided stencil), so that looks a little bit suspect. Although may= be the line numbers aren't quite accurate due to optimization... You could try setting (with a debug build) DRAW_USE_LLVM=3D"0" and see if t= his fixes the crash - and if it still crashes it should be easier to figure out what pointer is zero. You could print out the shader (with a debug build) with GALLIVM_DEBUG=3Dtgsi,ir,asm to see what the assembly really might do. I thi= nk though this is trying to read a vertex buffer (for position probably) which just isn't there. Or you could try setting (with a debug build) DRAW_USE_LLVM=3D"0" and see i= f this fixes the crash - and if it still crashes it should be easier to figure out what pointer is zero. I think I have an idea why it might fail, but someone more familiar with the u_upload stuff and r300 would have to look at it: r300_set_vertex_buffers_swtcl() would provide the vertex buffers to draw, a= nd I suspect it's always setting NULL buffer, because I think it's going to be n= ot a user buffer, but there won't be a malloced_buffer neither - the u_upload co= de will call r300_buffer_create() but it won't alloc the malloced_buffer becau= se the PIPE_BIND_CUSTOM bit will always be set (because r300->stream_uploader = is the same as r300->uploader which will set that by default). I'm not quite sure actually how it's supposed to work, maybe the logic in r300_buffer_create should always use the malloced_buffer path when !has_tcl? --=20 You are receiving this mail because: You are the assignee for the bug.= --15281524212.2fFBe19D2.5030 Date: Mon, 4 Jun 2018 22:47:01 +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 = Roland Scheidegger changed bug 10653= 3
What Removed Added
CC   maraeo@gmail.com

Commen= t # 4 on bug 10653= 3 from Roland Scheidegger
You have the same tcl-less chipset?
So the assembly shows the segfault isn't due to alignment, but simply becau=
se
it's a null pointer.
This is also mesa 18.0? I'm just asking because according to the line numbe=
rs
(r300_render_stencilref.c:113) it's doing two-sided stencil emulation, whic=
h I
can't see how it could happen with the emulated clear (which definitely doe=
sn't
enable two-sided stencil), so that looks a little bit suspect. Although may=
be
the line numbers aren't quite accurate due to optimization...

You could try setting (with a debug build) DRAW_USE_LLVM=3D"0" an=
d see if this
fixes the crash - and if it still crashes it should be easier to figure out
what pointer is zero.

You could print out the shader (with a debug build) with
GALLIVM_DEBUG=3Dtgsi,ir,asm to see what the assembly really might do. I thi=
nk
though this is trying to read a vertex buffer (for position probably) which
just isn't there.

Or you could try setting (with a debug build) DRAW_USE_LLVM=3D"0"=
 and see if this
fixes the crash - and if it still crashes it should be easier to figure out
what pointer is zero.

I think I have an idea why it might fail, but someone more familiar with the
u_upload stuff and r300 would have to look at it:
r300_set_vertex_buffers_swtcl() would provide the vertex buffers to draw, a=
nd I
suspect it's always setting NULL buffer, because I think it's going to be n=
ot a
user buffer, but there won't be a malloced_buffer neither - the u_upload co=
de
will call r300_buffer_create() but it won't alloc the malloced_buffer becau=
se
the PIPE_BIND_CUSTOM bit will always be set (because r300->stream_upload=
er is
the same as r300->uploader which will set that by default).

I'm not quite sure actually how it's supposed to work, maybe the logic in
r300_buffer_create should always use the malloced_buffer path when !has_tcl=
?


You are receiving this mail because:
  • You are the assignee for the bug.
= --15281524212.2fFBe19D2.5030-- --===============1993902666== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1993902666==--