delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/11/19/15:22:03

X-Recipient: archive-cygwin AT delorie DOT 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:reply-to:references:to:from:cc
:message-id:date:mime-version:in-reply-to:content-type; q=dns;
s=default; b=TbnzyaUeJb3d7qlfqvSiCxiDG+I2pB1RCmtKUebqudGYNBbSUV
25vqkddgqIsnniRDIQf8scqTItRMuahnwS+2Bw89xwVjOVTCE170cd9w/0GK0XY9
p0e36SDLSuiC4l2YwU9p8GnyZb9q2+jwyy0GVpfRxxZOnGUkAYRsL3n+0=
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:reply-to:references:to:from:cc
:message-id:date:mime-version:in-reply-to:content-type; s=
default; bh=IMFdTPYsFtRYjpYNJes2AMFcpTA=; b=KKPMRUPCTs6eEbKxRZ88
k9cESq6QxZGsw5FyeB3L5uldq/LwvIftO5Ny+5HMdacryTP6M/e2CbfEluK+j1c6
2QzTBOKxusFk3/uU2BMsD2fks1+wvIDWiqaPECRjlkV4LuHvBTJV2fVjOnXmkklW
pGkXG+QabJvH6YzCk1LUWss=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2
X-HELO: out5-smtp.messagingengine.com
Subject: Re: XWin Server starts but terminates shortly after
Reply-To: cygwin AT cygwin DOT com
References: <CA+rGx5fU2q-6Wqsv2VBgJ_HaAOOSFkm32B60_bBLP45x5RbtKg AT mail DOT gmail DOT com> <5644A543 DOT 4040508 AT dronecode DOT org DOT uk> <564B442E DOT 6060009 AT dronecode DOT org DOT uk>
To: cygwin AT cygwin DOT com
From: Jon Turney <jon DOT turney AT dronecode DOT org DOT uk>
Cc: Thomas Schweikle <tschweikle AT gmail DOT com>
Message-ID: <564E2F54.1000803@dronecode.org.uk>
Date: Thu, 19 Nov 2015 20:21:40 +0000
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
MIME-Version: 1.0
In-Reply-To: <564B442E.6060009@dronecode.org.uk>

--------------090806000507040301090904
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

On 17/11/2015 15:13, Jon Turney wrote:
> On 13/11/2015 15:13, Thomas Schweikle wrote:
>> Adding "-nowgl" does the trick. XWin is running again.
>
> It seems that this problem manifests itself when running on a Windows
> guest under VMWare, with their SVGA driver.
>
> This seems to be caused by a c0000374 (STATUS_HEAP_CORRUPTION) exception
> raised whilst loading the VMWare OpenGL driver.

This is easy to reduce to just the code that XWin uses to probe the 
capabilities of the native OpenGL renderer (attached).

$ gcc -Wall xwin-gl-probe.c -lgdi32 -lopengl32 -o xwin-gl-probe.exe

$ strace ./xwin-gl-probe.exe
[...]
--- Process 2356, exception c0000374 at 0000000077B64102
[...]

If I add a checking with HeapValidate() before the crashing call to 
ChoosePixelFormat(), that doesn't report any problems, so that seems to 
rule out the heap corruption being introduced by this code.

Compiling the same code with VS 2013 works without problems on my test 
VM (VMWare Player 12.0.1 + W7 x64 + VMWare SVGA driver)

This doesn't really get me any further forward though.  Does this crash 
loading vm3dgl64 because of a bug in vm3dgl64 which is only exposed in 
Cygwin? or because the Cygwin environment doesn't satisfy some 
requirement of vm3dgl64 that it should?

This isn't the first report of a crash in this probe with various 
graphics drivers (although typically the exception is c0000005, which we 
can catch and fallback to software rendering), so while it's tempting to 
assume this is a problem in the graphics driver, it's possible that 
something systematic is wrong.

-- 
Jon TURNEY
Volunteer Cygwin/X X Server maintainer

--------------090806000507040301090904
Content-Type: text/plain; charset=UTF-8;
 name="xwin-gl-probe.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="xwin-gl-probe.c"

Ly8KLy8gZ2NjIHh3aW4tZ2wtcHJvYmUuYyAtbGdkaTMyIC1sb3BlbmdsMzIg
LW8geHdpbi1nbC1wcm9iZS5leGUgLVdhbGwKLy8KCiNpbmNsdWRlIDxzdGRp
by5oPgojaW5jbHVkZSA8d2luZG93cy5oPgoKaW50Cm1haW4odm9pZCkKewog
ICAgSFdORCBod25kOwogICAgSERDIGhkYzsKICAgIEhHTFJDIGhnbHJjOwoK
ICAgIC8vIGNyZWF0ZSB3aW5kb3cgY2xhc3MKI2RlZmluZSBXSU5fR0xfVEVT
VF9XSU5ET1dfQ0xBU1MgTCJYV2luR0xUZXN0IgogICAgewogICAgICAgIHN0
YXRpYyBBVE9NIGdsVGVzdFduZENsYXNzID0gMDsKCiAgICAgICAgaWYgKGds
VGVzdFduZENsYXNzID09IDApIHsKICAgICAgICAgICAgV05EQ0xBU1NFWFcg
d2M7CgogICAgICAgICAgICB3Yy5jYlNpemUgPSBzaXplb2YoV05EQ0xBU1NF
WCk7CiAgICAgICAgICAgIHdjLnN0eWxlID0gQ1NfSFJFRFJBVyB8IENTX1ZS
RURSQVcgfCBDU19PV05EQzsKICAgICAgICAgICAgd2MubHBmblduZFByb2Mg
PSBEZWZXaW5kb3dQcm9jOwogICAgICAgICAgICB3Yy5jYkNsc0V4dHJhID0g
MDsKICAgICAgICAgICAgd2MuY2JXbmRFeHRyYSA9IDA7CiAgICAgICAgICAg
IHdjLmhJbnN0YW5jZSA9IEdldE1vZHVsZUhhbmRsZShOVUxMKTsKICAgICAg
ICAgICAgd2MuaEljb24gPSAwOwogICAgICAgICAgICB3Yy5oQ3Vyc29yID0g
MDsKICAgICAgICAgICAgd2MuaGJyQmFja2dyb3VuZCA9IChIQlJVU0gpIEdl
dFN0b2NrT2JqZWN0KFdISVRFX0JSVVNIKTsKICAgICAgICAgICAgd2MubHBz
ek1lbnVOYW1lID0gTlVMTDsKICAgICAgICAgICAgd2MubHBzekNsYXNzTmFt
ZSA9IFdJTl9HTF9URVNUX1dJTkRPV19DTEFTUzsKICAgICAgICAgICAgd2Mu
aEljb25TbSA9IDA7CiAgICAgICAgICAgIFJlZ2lzdGVyQ2xhc3NFeFcoJndj
KTsKICAgICAgICB9CiAgICB9CgogICAvLyBjcmVhdGUgYW4gaW52aXNpYmxl
IHdpbmRvdyBmb3IgYSBzY3JhdGNoIERDCiAgIGh3bmQgPSBDcmVhdGVXaW5k
b3dFeFcoMCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgV0lOX0dMX1RF
U1RfV0lORE9XX0NMQVNTLAogICAgICAgICAgICAgICAgICAgICAgICAgICBM
IlhXaW4gR0wgUmVuZGVyZXIgQ2FwYWJpbGl0aWVzIFRlc3QgV2luZG93IiwK
ICAgICAgICAgICAgICAgICAgICAgICAgICAgV1NfT1ZFUkxBUFBFRFdJTkRP
V3xXU19WSVNJQkxFLCAwLCAwLCAwLCAwLCBOVUxMLCBOVUxMLCBHZXRNb2R1
bGVIYW5kbGUoTlVMTCksCiAgICAgICAgICAgICAgICAgICAgICAgICAgIE5V
TEwpOwogICAgaWYgKGh3bmQgPT0gTlVMTCkgewogICAgICAgIHByaW50Zigi
Q291bGRuJ3QgY3JlYXRlIGEgd2luZG93IGZvciByZW5kZXIgY2FwYWJpbGl0
aWVzIHRlc3RpbmdcbiIpOwogICAgICAgIGdvdG8gZXJyb3I7CiAgICB9Cgog
ICAgaGRjID0gR2V0REMoaHduZCk7CiAgICBpZiAoIWhkYykgewogICAgICAg
IHByaW50ZigiQ291bGRuJ3QgY3JlYXRlIGEgREMgZm9yIHJlbmRlciBjYXBh
YmlsaXRpZXMgdGVzdGluZ1xuIik7CiAgICAgICAgZ290byBlcnJvcjsKICAg
IH0KCiAgICAvLyB3ZSBtdXN0IHNldCBhIHBpeGVsIGZvcm1hdCBiZWZvcmUg
d2UgY2FuIGNyZWF0ZSBhIGNvbnRleHQKICAgIHsKICAgICAgICBQSVhFTEZP
Uk1BVERFU0NSSVBUT1IgcGZkID0gewogICAgICAgICAgICBzaXplb2YoUElY
RUxGT1JNQVRERVNDUklQVE9SKSwKICAgICAgICAgICAgMSwKICAgICAgICAg
ICAgUEZEX0RSQVdfVE9fV0lORE9XIHwgUEZEX1NVUFBPUlRfT1BFTkdMIHwg
UEZEX0RFUFRIX0RPTlRDQVJFIHwgUEZEX0RPVUJMRUJVRkZFUl9ET05UQ0FS
RSB8IFBGRF9TVEVSRU9fRE9OVENBUkUsCiAgICAgICAgICAgIFBGRF9UWVBF
X1JHQkEsCiAgICAgICAgICAgIDI0LAogICAgICAgICAgICAwLCAwLCAwLCAw
LCAwLCAwLAogICAgICAgICAgICAwLAogICAgICAgICAgICAwLAogICAgICAg
ICAgICAwLAogICAgICAgICAgICAwLCAwLCAwLCAwLAogICAgICAgICAgICAw
LAogICAgICAgICAgICAwLAogICAgICAgICAgICAwLAogICAgICAgICAgICBQ
RkRfTUFJTl9QTEFORSwKICAgICAgICAgICAgMCwKICAgICAgICAgICAgMCwg
MCwgMAogICAgICAgIH07CgogICAgICAgIGludCBpUGl4ZWxGb3JtYXQgPSBD
aG9vc2VQaXhlbEZvcm1hdChoZGMsICZwZmQpOwogICAgICAgIGlmIChpUGl4
ZWxGb3JtYXQgPT0gMCkgewogICAgICAgICAgICBwcmludGYoIkNob29zZVBp
eGVsRm9ybWF0IGZhaWxlZFxuIik7CiAgICAgICAgICAgIGdvdG8gZXJyb3I7
CiAgICAgICAgfQoKICAgICAgICBpZiAoIVNldFBpeGVsRm9ybWF0KGhkYywg
aVBpeGVsRm9ybWF0LCBOVUxMKSkgewogICAgICAgICAgICBwcmludGYoIlNl
dFBpeGVsRm9ybWF0ICVkIGZhaWxlZFxuIiwgaVBpeGVsRm9ybWF0KTsKICAg
ICAgICAgICAgZ290byBlcnJvcjsKICAgICAgICB9CiAgICAgICAgcHJpbnRm
KCJUZXN0aW5nIHBpeGVsRm9ybWF0SW5kZXggJWRcbiIsaVBpeGVsRm9ybWF0
KTsKICAgIH0KCiAgICBoZ2xyYyA9IHdnbENyZWF0ZUNvbnRleHQoaGRjKTsK
ICAgIGlmICghd2dsTWFrZUN1cnJlbnQoaGRjLCBoZ2xyYykpIHsKICAgICAg
ICBwcmludGYoIndnbE1ha2VDdXJyZW50IGVycm9yOiAlMDh4IGRjICVwIGN0
eCAlcFxuIiwgKHVuc2lnbmVkKUdldExhc3RFcnJvcigpLCBoZGMsIGhnbHJj
KTsKICAgIH0KCiAgICBwcmludGYoIkRvbmVcbiIpOwplcnJvcjoKICAgIHJl
dHVybiAwOwp9Cg==


--------------090806000507040301090904
Content-Type: text/plain; charset=us-ascii

--
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
--------------090806000507040301090904--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019