Re: Cygwin fails to create sockets correctly
I found that if I start X or an ssh agent, and then manually set the system attribute on the socket file with something like (cd /tmp/.X11-unix/ && attrib +s X0) or (cd /tmp/ssh-gjJq8mINCmz0 && attrib +s agent.3145) then things work fine as far as X windows and ssh-agent are concerned. That means the issue at hand is that the system attribute is not set, the sockets themselves work fine once the file can be identified as a named socket. Starting X or ssh-agent as an administrator does not help. Anybody have any hints on what update / security setting changes could have triggered the system attribute not to be set, and more importantly, how to get this corrected? --Uwe On Wednesday, November 22, 2023 at 11:20:59 AM PST, Uwe F. Mayer wrote: > Cygwin fails to create sockets correctly on some > computers. Specifically, this fails on my machines with Windows 10 > Enterprise, but works fine on a system with Windows 10 Pro. This was > first observed on or about Nov 19, 2023. On one of the Windows 10 > Enterprise machines X has been running for several days and has a > functioning socket created on Nov 15, but new sockets cannot be > successfully created. > > Steps to reproduce: > 1) Run any program that will produce a named socket. > 2) Do an ls -l on the socket, it will come up as an ordinary file with > permissions -rw-rw-rw- instead of srw-rw-rw- (note the missing "s"). > > All my Windows 10 Enterprise machines are centrally managed by my employer. > > The following Microsoft packages seem to have been installed / updated > recently: > > Microsoft Edge Microsoft.Edge > 119.0.2151.72 > Microsoft Edge Update Microsoft Edge Update > 1.3.181.5 > Microsoft Edge WebView2 Runtime Microsoft.EdgeWebView2Runtime > 119.0.2151.72 > App Installer > Microsoft.DesktopAppInstaller_8wekyb3d8??? 1.21.3133.0 > Microsoft Edge > Microsoft.MicrosoftEdge.Stable_8wekyb3d??? 119.0.2151.72 > Feedback Hub > Microsoft.WindowsFeedbackHub_8wekyb3d8b??? 1.2309.12711.0 > Phone Link Microsoft.YourPhone_8wekyb3d8bbwe > 1.23092.158.0 > Microsoft 365 Apps for enterprise - en-??? Microsoft.Office > 16.0.16924.20150 > Mail and Calendar > microsoft.windowscommunicationsapps_8we??? 16005.14326.2174??? > Microsoft Update Health Tools > {1FC1A6C2-576E-489A-9B4A-92D21F542136} 3.74.0.0 > > I specifically noticed the socket issue for ssh-add and for X11. The > issue can also be shown with nc. Below are logs. > > Affected system: > > Edition Windows 10 Enterprise > Version 22H2 > Installed on 5/12/2022 > OS build 19045.3693 > Experience Windows Feature Experience Pack 1000.19053.1000.0 > > LAPTOP:~$ uname -a > CYGWIN_NT-10.0-19045 LAPTOP 3.4.9-1.x86_64 2023-09-06 11:19 UTC x86_64 Cygwin > > LAPTOP:~$ nc -lkU aSocket.sock & > [1] 1451 > LAPTOP:~$ ls -l aSocket.sock > -rw-rw-rw-+ 1 uwe Users 54 Nov 22 10:37 aSocket.sock > > > LAPTOP:~$ eval `ssh-agent -s`; ssh-add ~/.ssh/id_rsa > Agent pid 1365 > Error connecting to agent: Bad file descriptor > LAPTOP:~$ ls -l /tmp/ssh-FRwzveik5MWt/ > total 1 > -rw-rw-rw-+ 1 uwe Users 54 Nov 22 10:09 agent.1364 > > LAPTOP:~$ xinit > > Welcome to the XWin X Server > Vendor: The Cygwin/X Project > Release: 1.21.1.8 > OS: CYGWIN_NT-10.0-19045 LAPTOP 3.4.9-1.x86_64 2023-09-06 11:19 UTC x86_64 > OS: Windows 10 [Windows NT 10.0 build 19045] x64 > Package: version 21.1.8-1 built 2023-06-19 > > XWin was started with the following command line: > > X :0 > > (II) xorg.conf is not supported > (II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more information > winUpdateDpi - primary monitor native DPI x 96 y 96 > LoadPreferences: /home/uwe/.XWinrc not found > LoadPreferences: Loading /etc/X11/system.XWinrc > LoadPreferences: Done parsing the configuration file... > winDetectSupportedEngines - RemoteSession: no > winDetectSupportedEngines - DirectDraw4 installed, allowing ShadowDDNL > winDetectSupportedEngines - Returning, supported engines 0005 > winSetEngine - Using Shadow DirectDraw NonLocking > winScreenInit - Using Windows display depth of 32 bits per pixel > winWindowProc - WM_SIZE - new client area w: 1904 h: 1011 > winFinishScreenInitFB - Masks: 00ff ff00 00ff > MIT-SHM extension disabled due to lack of kernel support > XFree86-Bigfont extension local-client optimization disabled due to lack of > shared memory s
Cygwin fails to create sockets correctly
Cygwin fails to create sockets correctly on some computers. Specifically, this fails on my machines with Windows 10 Enterprise, but works fine on a system with Windows 10 Pro. This was first observed on or about Nov 19, 2023. On one of the Windows 10 Enterprise machines X has been running for several days and has a functioning socket created on Nov 15, but new sockets cannot be successfully created. Steps to reproduce:1) Run any program that will produce a named socket.2) Do an ls -l on the socket, it will come up as an ordinary file with permissions -rw-rw-rw- instead of srw-rw-rw- (note the missing "s"). All my Windows 10 Enterprise machines are centrally managed by my employer. The following Microsoft packages seem to have been installed / updated recently: Microsoft Edge Microsoft.Edge 119.0.2151.72Microsoft Edge Update Microsoft Edge Update 1.3.181.5Microsoft Edge WebView2 Runtime Microsoft.EdgeWebView2Runtime 119.0.2151.72App Installer Microsoft.DesktopAppInstaller_8wekyb3d8??? 1.21.3133.0Microsoft Edge Microsoft.MicrosoftEdge.Stable_8wekyb3d??? 119.0.2151.72Feedback Hub Microsoft.WindowsFeedbackHub_8wekyb3d8b??? 1.2309.12711.0Phone Link Microsoft.YourPhone_8wekyb3d8bbwe 1.23092.158.0Microsoft 365 Apps for enterprise - en-??? Microsoft.Office 16.0.16924.20150Mail and Calendar microsoft.windowscommunicationsapps_8we??? 16005.14326.2174???Microsoft Update Health Tools {1FC1A6C2-576E-489A-9B4A-92D21F542136} 3.74.0.0 I specifically noticed the socket issue for ssh-add and for X11. The issue can also be shown with nc. Below are logs. Affected system:Edition Windows 10 EnterpriseVersion 22H2Installed on 5/12/2022OS build 19045.3693Experience Windows Feature Experience Pack 1000.19053.1000.0 LAPTOP:~$ uname -aCYGWIN_NT-10.0-19045 LAPTOP 3.4.9-1.x86_64 2023-09-06 11:19 UTC x86_64 Cygwin LAPTOP:~$ nc -lkU aSocket.sock &[1] 1451LAPTOP:~$ ls -l aSocket.sock-rw-rw-rw-+ 1 uwe Users 54 Nov 22 10:37 aSocket.sock LAPTOP:~$ eval `ssh-agent -s`; ssh-add ~/.ssh/id_rsaAgent pid 1365Error connecting to agent: Bad file descriptorLAPTOP:~$ ls -l /tmp/ssh-FRwzveik5MWt/total 1-rw-rw-rw-+ 1 uwe Users 54 Nov 22 10:09 agent.1364 LAPTOP:~$ xinit Welcome to the XWin X ServerVendor: The Cygwin/X ProjectRelease: 1.21.1.8OS: CYGWIN_NT-10.0-19045 LAPTOP 3.4.9-1.x86_64 2023-09-06 11:19 UTC x86_64OS: Windows 10 [Windows NT 10.0 build 19045] x64Package: version 21.1.8-1 built 2023-06-19 XWin was started with the following command line: X :0 (II) xorg.conf is not supported(II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more informationwinUpdateDpi - primary monitor native DPI x 96 y 96LoadPreferences: /home/uwe/.XWinrc not foundLoadPreferences: Loading /etc/X11/system.XWinrcLoadPreferences: Done parsing the configuration file...winDetectSupportedEngines - RemoteSession: nowinDetectSupportedEngines - DirectDraw4 installed, allowing ShadowDDNLwinDetectSupportedEngines - Returning, supported engines 0005winSetEngine - Using Shadow DirectDraw NonLockingwinScreenInit - Using Windows display depth of 32 bits per pixelwinWindowProc - WM_SIZE - new client area w: 1904 h: 1011winFinishScreenInitFB - Masks: 00ff ff00 00ffMIT-SHM extension disabled due to lack of kernel supportXFree86-Bigfont extension local-client optimization disabled due to lack of shared memory support in the kernel(EE) AIGLX: No native OpenGL in modes with a root window(II) IGLX: Loaded and initialized swrast(II) GLX: Initialized DRISWRAST GL provider for screen 0winPointerWarpCursor - Discarding first warp: 952 505(--) 16 mouse buttons found(--) Setting autorepeat to delay=500, rate=31(--) Windows keyboard layout: "0409" (0409) "US", type 4(--) Found matching XKB configuration "English (USA)"(--) Model = "pc105" Layout = "us" Variant = "none" Options = "none"Rules = "base" Model = "pc105" Layout = "us" Variant = "none" Options = "none" waiting for X server to begin accepting connections ...[etc].. [closing down X externally] winDeinitMultiWindowWM - Noting shutdown in progress(II) Server terminated successfully (0). Closing log file.xinit: giving upxinit: unable to connect to X server: Connection refusedxinit: server error # in a separate terminal while X was runningLAPTOP:~$ v /tmp/.X11-unix/total 1-rw-rw-rw-+ 1 uwe Users 54 Nov 22 10:12 X0 Unaffected system-Edition Windows 10 ProVersion 22H2Installed on 11/2/2020OS build 19045.3693Experience Windows Feature Experience