X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:subject:to:references:from:message-id:date
	:mime-version:in-reply-to:content-type
	:content-transfer-encoding; q=dns; s=default; b=N8jO9Pw1SiEdmObu
	q2r/3gYEY7+KIXQGZIwbiv7Adh4Lgb+xiV33/bdnbO773mA0RYABFGESrwY9lx+a
	VpwY2XHCs3s6eoTm/h0s0QpLW0XVwkQ4C8d+j4JULgIutcVgyBLuNPi3XbRDOgft
	1pKHm8GwjZu989zayWGoWNLTK7g=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:subject:to:references:from:message-id:date
	:mime-version:in-reply-to:content-type
	:content-transfer-encoding; s=default; bh=b9gXwExrX79VAorwNcfAlI
	lm/1w=; b=Ra8XLGNaT1aXyd8DcqFZ1wqrCgPEOeNJQ1rQlwv0Gt+HooPKnHKiuJ
	yNk3rdUcc9EQugdelpSrPS4jHphDoJTyGtldsUDhrV1xXr1yhu/xdtbknIJQYHB/
	dsHX1Nq2RPSCTcYyEGeiPItziFzat5BGZxoHw3EGmNrDePV7v0RqA=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=04, 1112, 0.4, symptoms
X-HELO: out2-smtp.messagingengine.com
Subject: Re: [ANNOUNCEMENT] mesa 11.0.9-2
To: cygwin@cygwin.com
References: <announce.201602220900.u1M90xBM023169@int-mx11.intmail.prod.int.phx2.redhat.com> <570D122B.50307@gmail.com> <570DAFFA.7020700@cygwin.com>
From: Jon Turney <jon.turney@dronecode.org.uk>
Message-ID: <b8ee7d32-504d-27d8-51ab-547ea7a51968@dronecode.org.uk>
Date: Tue, 31 May 2016 18:03:16 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0
MIME-Version: 1.0
In-Reply-To: <570DAFFA.7020700@cygwin.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

On 13/04/2016 03:33, Yaakov Selkowitz wrote:
> On 2016-04-12 10:20, Marco Atzeri wrote:
>> we found a case where the 32bit is segfaulting
>> while dri-drivers-11.0.9-1
>> works fine.
>> For reference:
>> https://cygwin.com/ml/cygwin/2016-04/msg00245.html
>> https://cygwin.com/ml/cygwin/2016-04/msg00251.html
>>
>> To replicate with octave is enough :
>> run from xterm
>>    /usr/bin/octave-cli-4.0.1.exe
>>
>>   x=1:100;
>>   plot(x,x)
>>
>> However I see that also mesa-demos segfault
>>
>> $ cd /usr/lib/mesa-demos
>> $ ./quad-clip.exe
>> GL_RENDERER   = Gallium 0.4 on llvmpipe (LLVM 3.7, 256 bits)
>> GL_VERSION    = 3.0 Mesa 11.0.9
>> GL_VENDOR     = VMware, Inc.
>> Segmentation fault (core dumped)
>
> I can reproduce this on 32-bit but not 64-bit, and the same happens with
> 11.1.2.  It may be an issue with LLVM 3.7 (11.0.9-1 was built with 3.5)
> but without a useful backtrace it will be hard to pin down.

gdb can successfully backtrace this, with today's cygwin snapshot.

Both examples of the crash provided by Marco show very similar symptoms.

Unfortunately, the backtrace stops at llvm_pipeline_generic() calling 
into some JIT-ed code.  The faulting is at an insertps instruction with 
what looks like a bogus absolute address.

So I guess this some is an llvm issue, possibly with some address 
computation which doesn't give the right result on 32 bit?

> # gdb ./quad-clip
> [...]
> (gdb) r
> [...]
> Program received signal SIGSEGV, Segmentation fault.
> 0x7fdf00c1 in ?? ()
> (gdb) bt
> #0  0x7fdf00c1 in ?? ()
> #1  0x55c7b977 in llvm_pipeline_generic (middle=0x20070e54, middle@entry=0x20073920, fetch_info=fetch_info@entry=0x23c710, in_prim_info=0xc, in_prim_info@entry=0x23c720) at /usr/src/debug/mesa-11.2.2-1/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c:377
> #2  0x55c7bcff in llvm_middle_end_linear_run (middle=0x20073920, start=0, count=4, prim_flags=0) at /usr/src/debug/mesa-11.2.2-1/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c:541
> #3  0x55b9ea9d in vsplit_segment_simple_linear (vsplit=0x20095a40, icount=4, istart=0, flags=0) at /usr/src/debug/mesa-11.2.2-1/src/gallium/auxiliary/draw/draw_pt_vsplit_tmp.h:240
> #4  vsplit_run_linear (frontend=0x20095a40, start=0, count=4) at /usr/src/debug/mesa-11.2.2-1/src/gallium/auxiliary/draw/draw_split_tmp.h:60
> #5  0x55b977ed in draw_pt_arrays (draw=draw@entry=0x20070dd0, prim=7, start=0, count=<optimized out>, count@entry=4) at /usr/src/debug/mesa-11.2.2-1/src/gallium/auxiliary/draw/draw_pt.c:149
> #6  0x55b97c77 in draw_vbo (draw=draw@entry=0x20070dd0, info=0x23c820, info@entry=0x23c910) at /usr/src/debug/mesa-11.2.2-1/src/gallium/auxiliary/draw/draw_pt.c:564
> #7  0x55cc14d5 in llvmpipe_draw_vbo (pipe=0x2006ec20, info=0x23c910) at /usr/src/debug/mesa-11.2.2-1/src/gallium/drivers/llvmpipe/lp_draw_arrays.c:132
> #8  0x559b97d0 in st_draw_vbo (ctx=0x20157038, prims=0x20188b70, nr_prims=1, ib=0x0, index_bounds_valid=1 '\001', min_index=0, max_index=3, tfb_vertcount=0x0, stream=0, indirect=0x0) at /usr/src/debug/mesa-11.2.2-1/src/mesa/state_tracker/st_draw.c:288
> #9  0x5597f656 in vbo_exec_vtx_flush (exec=<optimized out>, exec@entry=0x20188780, keepUnmapped=1 '\001') at /usr/src/debug/mesa-11.2.2-1/src/mesa/vbo/vbo_exec_draw.c:422
> #10 0x5596b4f2 in vbo_exec_FlushVertices_internal (exec=0x20188780, unmap=<optimized out>) at /usr/src/debug/mesa-11.2.2-1/src/mesa/vbo/vbo_exec_api.c:624
> #11 0x5597c5a5 in vbo_exec_FlushVertices (ctx=ctx@entry=0x20157038, flags=flags@entry=1) at /usr/src/debug/mesa-11.2.2-1/src/mesa/vbo/vbo_exec_api.c:1261
> #12 0x55858150 in _mesa_flush (ctx=0x20157038) at /usr/src/debug/mesa-11.2.2-1/src/mesa/main/context.c:1871
> #13 0x55858968 in _mesa_Flush () at /usr/src/debug/mesa-11.2.2-1/src/mesa/main/context.c:1906
> #14 0x004012a5 in Draw () at /usr/src/debug/mesa-demos-8.3.0-1/src/trivial/quad-clip.c:86
> #15 0x62b7ae48 in glutJoystickGetCenter () from /usr/bin/cygglut-3.dll
> #16 0x62b7eaa2 in fgEnumWindows () from /usr/bin/cygglut-3.dll
> #17 0x62b7b6c7 in glutMainLoopEvent () from /usr/bin/cygglut-3.dll
> #18 0x62b7ba78 in glutMainLoop () from /usr/bin/cygglut-3.dll
> #19 0x00401b82 in main (argc=1, argv=0x23cc9c) at /usr/src/debug/mesa-demos-8.3.0-1/src/trivial/quad-clip.c:137
> (gdb) disassemble 0x7fdf00b1,0x7fdf00d2
> Dump of assembler code from 0x7fdf00b1 to 0x7fdf00d2:
>    0x7fdf00b1:  insertps $0x10,0x4(%eax,%edi,1),%xmm0
>    0x7fdf00b9:  insertps $0x20,0x8(%eax,%edi,1),%xmm0
> => 0x7fdf00c1:  insertps $0x30,0xfffeff34,%xmm0
>    0x7fdf00cb:  mov    (%esi),%eax
>    0x7fdf00cd:  mul    %ecx


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

