Randy Galbraith – MCPS AppDev – Scottsdale
480-445-2685 – cell: 602-531-0957 – wendy: 602-909-9901 – home: 602-539-1817
Absolutely critical: “Universal wearing of masks. Stay away from crowds. Close 
the bars."
- Dr. Anthony Fauci, PBS NewsHour, 7/17/20.
Data classification: PROPRIETARY

-----Original Message-----
From: Galbraith, Randy 
Sent: Thursday, May 20, 2021 9:56 AM
To: cygwin@cygwin.com
Subject: Re: Cygwin/X fails post Windows 10 version 1909

On 19/05/2021 19:03, Galbraith, Randy via Cygwin wrote:
>>> Hi Everyone.
>>> 
>>> Following a Windows 10 version 1909 update Cygwin/X fails to start. It ends 
>>> with:
>>> 
>>> (--) 16 mouse buttons found
>>> (--) Setting autorepeat to delay=500, rate=31
>>> xinit: giving up
>>> xinit: unable to connect to X server: Connection refused
>>> xinit: server error
>>> 
>>> [1]+ Exit 1 startx -- :1 -multiwindow -clipboard
>>> 
>>> If I run XWin under gdb with xorg-server-debuginfo package installed I can 
>>> see this stack trace:
>>> 
>>> Thread 1 "XWin" received signal ?, Unknown signal.
>>> 0x00007ffa99383b19 in RaiseException () from 
>>> /cygdrive/c/WINDOWS/System32/KERNELBASE.dll
>>> (gdb) bt
>>> #0 0x00007ffa99383b19 in RaiseException () from 
>>> /cygdrive/c/WINDOWS/System32/KERNELBASE.dll
>>> #1 0x00007ffa97662086 in ?? ()
>>> from /cygdrive/c/Program Files/Citrix/ICAService/cxinjime64.dll
>>> #2 0x00007ffa97661afd in ?? ()
>>> from /cygdrive/c/Program Files/Citrix/ICAService/cxinjime64.dll
>>> #3 0x00007ffa97661695 in ?? ()
>>> from /cygdrive/c/Program Files/Citrix/ICAService/cxinjime64.dll
>>> #4 0x000000010040df3e in winConfigKeyboard 
>>> (pDevice=pDevice@entry=0x80027d720)
>>> at ../hw/xwin/winconfig.c:274

>>XWin is just calling GetKeyboardLayoutName() here, which Citrix appears to be 
>>hooking.

>> https://gitlab.freedesktop.org/xorg/xserver/-/blob/master/hw/xwin/winc
>> onfig.c#L274

>>> #5 0x0000000100410f36 in winKeybdProc (pDeviceInt=0x80027d720, 
>>> iState=<optimized out>>>) at ../hw/xwin/winkeybd.c:99
>>> #6 0x0000000100469bc7 in ActivateDevice (dev=dev@entry=0x80027d720,
>>> sendevent=sendevent@entry=1 '\001') at ../dix/devices.c:576
>>> #7 0x000000010046d8bd in InitAndStartDevices () at 
>>> ../dix/devices.c:762
>>> #8 0x0000000100479f8f in dix_main (argc=2, argv=0xffffcc50, 
>>> envp=<optimized out>>>) at ../dix/main.c:251
>>> #9 0x0000000180049efd in dll_crt0_1 () at 
>>> /usr/src/debug/cygwin-3.2.0-1/winsup/cygwin/dcrt0.cc:1028
>>> #10 0x0000000180047856 in _cygtls::call2 (this=0xffffce00,
>>> func=0x180048d30 <dll_crt0_1(void*)>>>, arg=0x0, 
>>> buf=buf@entry=0xffffcdf0) at 
>>> /usr/src/debug/cygwin-3.2.0-1/winsup/cygwin/cygtls.cc:40
>>> #11 0x0000000180047904 in _cygtls::call (func=<optimized out>>>, 
>>> --Type <RET>>> for more, q to quit, c to continue without paging-- 
>>> arg=<optimized out>>>) at 
>>> /usr/x86_64-pc-cygwin/sys-root/usr/include/w32api/psdk_inc/intrin-imp
>>> l.h:790
>>> #12 0x0000000000000000 in ?? ()
>>> Backtrace stopped: previous frame inner to this frame (corrupt 
>>> stack?)
>>> (gdb)
>>> 
>>> The ICA reference reflects my Citrix connection to a virtual Windows 10 
>>> desktop. I am working in a corporate setting however I do have admin rights 
>>> to this virtual machine. Based on "connection refused" my hypothesis was 
>>> our Windows 1909 push may have blocked ports Xwin is using. If there are 
>>> specific Windows Defender Firewall rules that are required I would be happy 
>>> to put them in. The bit of firewall setup I've tried thus far has not 
>>> helped. This backtrace though makes me think this may be a keyboard 
>>> configuration issue.
>>> 
>>> Any advice and guidance on how to debug this problem will be greatly 
>>> appreciated. Several on our development team rely on Cygwin/X and are 
>>> rather unhappy to now be restricted to command line tools until we can get 
>>> this resolved.

>>This is a crash in Citrix, so I'm afraid the best (and possibly only) people 
>>who can debug this are Citrix...

>> Just Googling the faulting DLL name did I find [1], which seems to indicate 
>> you can turn off this hooking with a registry key.

>>[1] 
>>https://helgeklein.com/blog/2015/10/citrix-xenappxendesktop-api-hooking-explained

>Jon, thank you so much for your response! For a brief moment yesterday 
>X-Windows >started. This occurred after I set:

>Flag = 0 under:
>HKLM\SOFTWARE\Citrix\CtxHook\AppInit_Dlls\Multiple Monitor Hook

>I then removed:
>xorg-server-cygwin-crashreporter
>xorg-server-debuginfo

>Rebooted and tried again. Alas, back to "Connection refused." I reinstalled 
>those >packages but the problem continues. I ran gdb to get a backtrace this 
>morning and >we're still seeing the same stack:

>#0  0x00007ffa0af83b19 in RaiseException ()
>   from /cygdrive/c/WINDOWS/System32/KERNELBASE.dll
>#1  0x00007ffa0a032086 in ?? ()
>   from /cygdrive/c/Program Files/Citrix/ICAService/cxinjime64.dll
>#2  0x00007ffa0a031afd in ?? ()
>   from /cygdrive/c/Program Files/Citrix/ICAService/cxinjime64.dll
>#3  0x00007ffa0a031695 in ?? ()
>   from /cygdrive/c/Program Files/Citrix/ICAService/cxinjime64.dll
>#4  0x000000010040df3e in winConfigKeyboard (pDevice=pDevice@entry=0x80027d720)
>    at ../hw/xwin/winconfig.c:274

>I asked one of our developers who has a company laptop (i.e. VPN access, not 
>Citrix) to test his setup. It works. Thus the problem does seem to be Citrix 
>related. I've now reached out to another developer who is running Cygwin 
>2.11.1. I believe his copy is running while he does use Citrix and Windows 10 
>1909.

>That's all I have for now. The chase continues.

>Kind regards,
>-Randy Galbraith

One of my colleagues discovered the act of change 
HKLM\SOFTWARE\Citrix\CtxHook\AppInit_Dlls\Multiple Monitor Hook\Flag from 0 to 
1 and back again can be a work-around. Immediately after this key is changed 
X-Windows will start. If one does a reboot X-Windows will fail again. Change 
Flag and X-Windows works.

Not ideal and we would still like to figure out what is going on, this does get 
us back in business with X-Windows.

Kind regards,
-Randy


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

Reply via email to