public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cygwin fails to create sockets correctly
       [not found] <239550729.5234119.1700680859793.ref@mail.yahoo.com>
@ 2023-11-22 19:20 ` Uwe F. Mayer
  2023-12-06 17:50   ` Uwe F. Mayer
  0 siblings, 1 reply; 2+ messages in thread
From: Uwe F. Mayer @ 2023-11-22 19:20 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 7867 bytes --]

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 00000005winSetEngine - Using Shadow DirectDraw NonLockingwinScreenInit - Using Windows display depth of 32 bits per pixelwinWindowProc - WM_SIZE - new client area w: 1904 h: 1011winFinishScreenInitFB - Masks: 00ff0000 0000ff00 000000ffMIT-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: "00000409" (00000409) "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 Pack 1000.19053.1000.0
BLACK:~$ uname -aCYGWIN_NT-10.0-19045 BLACK 3.4.9-1.x86_64 2023-09-06 11:19 UTC x86_64 Cygwin
BLACK:~$ nc -lkU aSocket.sock &[1] 1374BLACK:~$ ls -l aSocket.socksrw-rw-rw-+ 1 uwe None 0 Nov 22 10:39 aSocket.sock

BLACK:~$ eval `ssh-agent -s`; ssh-add ~/.ssh/id_rsaAgent pid 1298Enter passphrase for /home/uwe/.ssh/id_rsa:Identity added: /home/uwe/.ssh/id_rsa (/home/uwe/.ssh/id_rsa)BLACK:~$ ls -l /tmp/ssh-RgXsP4KvO7yd/total 1srw-rw-rw-+ 1 uwe None 0 Nov 22 10:08 agent.1297
Black:~$ xinit
Welcome to the XWin X ServerVendor: The Cygwin/X ProjectRelease: 1.21.1.8OS: CYGWIN_NT-10.0-19045 BLACK 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 00000005winSetEngine - Using Shadow DirectDraw NonLockingwinScreenInit - Using Windows display depth of 32 bits per pixelwinWindowProc - WM_SIZE - new client area w: 1664 h: 981winFinishScreenInitFB - Masks: 00ff0000 0000ff00 000000ffMIT-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: 832 490(--) 16 mouse buttons found(--) Setting autorepeat to delay=500, rate=31(--) Windows keyboard layout: "00000409" (00000409) "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"winProcEstablishConnection - winInitClipboard returned.winClipboardThreadProc - DISPLAY=:0.0winClipboardProc - xcb_connect () returned and successfully opened the display.
[closing down X externally]
exiting main loop.xterm: fatal IO error 11 (Resource temporarily unavailable) or KillClient on X server ":0"xinit: connection to X server lost
waiting for X server to shut down winDeinitMultiWindowWM - Noting shutdown in progress(II) Server terminated successfully (0). Closing log file.
# in a separate terminal while X was runningBLACK:~$ ls -l /tmp/.X11-unix/total 1srw-rw-rw-+ 1 uwe None 0 Nov 22 10:10 X0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Cygwin fails to create sockets correctly
  2023-11-22 19:20 ` Cygwin fails to create sockets correctly Uwe F. Mayer
@ 2023-12-06 17:50   ` Uwe F. Mayer
  0 siblings, 0 replies; 2+ messages in thread
From: Uwe F. Mayer @ 2023-12-06 17:50 UTC (permalink / raw)
  To: cygwin

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 <uwe_f_mayer@yahoo.com> 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 00000005
> 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: 00ff0000 0000ff00 000000ff
> MIT-SHM extension disabled due to lack of kernel support
> XFree86-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 0
> winPointerWarpCursor - Discarding first warp: 952 505
> (--) 16 mouse buttons found
> (--) Setting autorepeat to delay=500, rate=31
> (--) Windows keyboard layout: "00000409" (00000409) "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 up
> xinit: unable to connect to X server: Connection refused
> xinit: server error
> 
> # in a separate terminal while X was running
> LAPTOP:~$ v /tmp/.X11-unix/
> total 1
> -rw-rw-rw-+ 1 uwe Users 54 Nov 22 10:12 X0
> 
> 
> Unaffected system
> -----------------
> Edition         Windows 10 Pro
> Version         22H2
> Installed on    11/2/2020
> OS build        19045.3693
> Experience      Windows Feature Experience Pack 1000.19053.1000.0
> 
> BLACK:~$ uname -a
> CYGWIN_NT-10.0-19045 BLACK 3.4.9-1.x86_64 2023-09-06 11:19 UTC x86_64 Cygwin
> 
> BLACK:~$ nc -lkU aSocket.sock &
> [1] 1374
> BLACK:~$ ls -l aSocket.sock
> srw-rw-rw-+ 1 uwe None 0 Nov 22 10:39 aSocket.sock
> 
> 
> BLACK:~$ eval `ssh-agent -s`; ssh-add ~/.ssh/id_rsa
> Agent pid 1298
> Enter passphrase for /home/uwe/.ssh/id_rsa:
> Identity added: /home/uwe/.ssh/id_rsa (/home/uwe/.ssh/id_rsa)
> BLACK:~$ ls -l /tmp/ssh-RgXsP4KvO7yd/
> total 1
> srw-rw-rw-+ 1 uwe None 0 Nov 22 10:08 agent.1297
> 
> Black:~$ xinit
> 
> Welcome to the XWin X Server
> Vendor: The Cygwin/X Project
> Release: 1.21.1.8
> OS: CYGWIN_NT-10.0-19045 BLACK 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 00000005
> winSetEngine - Using Shadow DirectDraw NonLocking
> winScreenInit - Using Windows display depth of 32 bits per pixel
> winWindowProc - WM_SIZE - new client area w: 1664 h: 981
> winFinishScreenInitFB - Masks: 00ff0000 0000ff00 000000ff
> MIT-SHM extension disabled due to lack of kernel support
> XFree86-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 0
> winPointerWarpCursor - Discarding first warp: 832 490
> (--) 16 mouse buttons found
> (--) Setting autorepeat to delay=500, rate=31
> (--) Windows keyboard layout: "00000409" (00000409) "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"
> winProcEstablishConnection - winInitClipboard returned.
> winClipboardThreadProc - DISPLAY=:0.0
> winClipboardProc - xcb_connect () returned and successfully opened the display.
> 
> [closing down X externally]
> 
> exiting main loop.
> xterm: fatal IO error 11 (Resource temporarily unavailable) or KillClient on X server ":0"
> xinit: connection to X server lost
> 
> waiting for X server to shut down winDeinitMultiWindowWM - Noting shutdown in progress
> (II) Server terminated successfully (0). Closing log file.
> 
> # in a separate terminal while X was running
> BLACK:~$ ls -l /tmp/.X11-unix/
> total 1
> srw-rw-rw-+ 1 uwe None 0 Nov 22 10:10 X0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-06 17:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <239550729.5234119.1700680859793.ref@mail.yahoo.com>
2023-11-22 19:20 ` Cygwin fails to create sockets correctly Uwe F. Mayer
2023-12-06 17:50   ` Uwe F. Mayer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).