public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Mintty terminal crashes after changing the default home via nsswitch.conf and launch in a new profile in Windows 11
@ 2023-04-04 15:13 Yuta SUZUKI
  2023-04-04 19:46 ` Brian Inglis
  2023-04-05 18:44 ` Thomas Wolff
  0 siblings, 2 replies; 6+ messages in thread
From: Yuta SUZUKI @ 2023-04-04 15:13 UTC (permalink / raw)
  To: cygwin

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

Hi,

I am recently setting up the computer room of my faculty
and then encountered the following issue:

Short description:
Change the default home directory via
/etc/nsswitch.conf
and make a new Windows user.
Login to the new user (and do not logout) and launch cygwin.
After opening another application's window, e.g. Explorer,
and try to switch the focus between the cygwin window and the other window.
After once or twice of switch, switching is not smooth
and both the cygwin and the other application seem freezing.
(Still we can launch powershell to restart the machine.)

Procedure to reproduce the issue:
1. Login as an administrator.
2. Install cygwin with the default configuration.
3. In C:\cygwin64\etc\nssswitch.conf, replace
# db_home:  /home/%U
to
db_home: /%H/cygwin
and save the file.
4. Create a new Windows user, say "test", without Microsoft account.
5. Logout from the administrator user used so far.
6. Login as the user "test". (Do not logout in the remaining steps.)
7. Launch cygwin from the desktop icon.
8. Run cygcheck -s -v -r > cygcheck_before_crash.out (to reproduce the
issue, this step is unnecessary.)
9. Open a window of the Explorer.
10. Click the cygwin window. This does not switch the focus to the focus...
11. Click the cygwin icon in the task bar. Probably it switches the window.
12. Run cygcheck -s -v -r > cygcheck_after_crash.out (to reproduce the
issue, this step is unnecessary.)
13. Click the Explorer window. This does not switch the focus to the focus...
14. Click the "x" mark on the top right of the cygwin window. This
does not close the window...
16. Close the cygwin from the task bar. Probably it closes the window.

For me, the behaviour in the step 11, 14, 15 are rather troublesome.
If the situation is worse, then I cannot even use the start menu to
turn off the machine.
In such a case, still I could launch PowerShell with keyboard and run
Restart-Computer -Force
to restart the machine.

Note that if you logout and re-login after the step 6
or if you are using Windows 10, then the issue is not reproduced.

Environment:
Edition Windows 11 Home
Version 22H2
Installed on ‎3/‎29/‎2023
OS build 22621.1413
Experience Windows Feature Experience Pack 1000.22639.1000.0

I attach the above two log files.
(Some Japanese is included, sorry: some translations are
"なし" = "not applicable"
and
"ローカル アカウント" = "local account")

I would appreciate it very much if someone would solve this issue.

Yours,
Yuta Suzuki

[-- Attachment #2: cygcheck_after_crash.out --]
[-- Type: application/octet-stream, Size: 16019 bytes --]


Cygwin Configuration Diagnostics
Current System Time: Tue Apr 04 15:44:43 2023

Windows 11 Home Ver 10.0 Build 22621 

Path:	C:\cygwin64\usr\local\bin
	C:\cygwin64\bin
	C:\Program Files\ImageMagick-7.1.0-Q16-HDRI
	C:\Program Files (x86)\Common Files\Apple\Apple Application Support
	C:\WINDOWS\system32
	C:\WINDOWS
	C:\WINDOWS\System32\Wbem
	C:\WINDOWS\System32\WindowsPowerShell\v1.0
	C:\WINDOWS\System32\OpenSSH
	C:\Program Files (x86)\Fujitsu\FJAgent\Core\bin
	C:\texlive\2021\bin\win32
	C:\Program Files\gs\gs10.00.0\bin
	C:\Users\test\AppData\Local\Microsoft\WindowsApps

Output from C:\cygwin64\bin\id.exe
UID: 197612(test)                 GID: 197121(なし)
197121(なし)                    545(Users)
4(INTERACTIVE)                    66049(CONSOLE LOGON)
11(Authenticated Users)           15(This Organization)
113(ローカル アカウント) 4095(CurrentSession)
66048(LOCAL)                      262154(NTLM Authentication)
401408(Medium Mandatory Level)

SysDir: C:\WINDOWS\system32
WinDir: C:\WINDOWS

PWD = '/cygdrive/c/Users/test/cygwin'
HOME = '/cygdrive/c/Users/test/cygwin'
USER = 'test'

ProgramFiles(x86) = 'C:\Program Files (x86)'
!:: = '::\'
CommonProgramFiles(x86) = 'C:\Program Files (x86)\Common Files'
SHELL = '/bin/bash'
NUMBER_OF_PROCESSORS = '8'
PROCESSOR_LEVEL = '6'
TERM_PROGRAM_VERSION = '3.6.4'
USERDOMAIN_ROAMINGPROFILE = 'LAPTOP-JF3AAISC'
HOSTNAME = 'LAPTOP-JF3AAISC'
PROGRAMFILES = 'C:\Program Files'
PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'
OS = 'Windows_NT'
HOMEDRIVE = 'C:'
USERDOMAIN = 'LAPTOP-JF3AAISC'
USERPROFILE = 'C:\Users\test'
OneDriveConsumer = 'C:\Users\test\OneDrive'
PRINTER = 'FUJI XEROX DocuPrint CM310 z'
TZ = 'Asia/Tokyo'
ALLUSERSPROFILE = 'C:\ProgramData'
ORIGINAL_PATH = '/cygdrive/c/Program Files/ImageMagick-7.1.0-Q16-HDRI:/cygdrive/c/Program Files (x86)/Common Files/Apple/Apple Application Support:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/WINDOWS/System32/OpenSSH:/cygdrive/c/Program Files (x86)/Fujitsu/FJAgent/Core/bin:/cygdrive/c/texlive/2021/bin/win32:/cygdrive/c/Program Files/gs/gs10.00.0/bin:/cygdrive/c/Users/test/AppData/Local/Microsoft/WindowsApps'
CommonProgramW6432 = 'C:\Program Files\Common Files'
USERNAME = 'test'
OneDrive = 'C:\Users\test\OneDrive'
COMSPEC = 'C:\WINDOWS\system32\cmd.exe'
APPDATA = 'C:\Users\test\AppData\Roaming'
SYSTEMROOT = 'C:\WINDOWS'
LOCALAPPDATA = 'C:\Users\test\AppData\Local'
__COMPAT_LAYER = 'DetectorsAppHealth'
COMPUTERNAME = 'LAPTOP-JF3AAISC'
INFOPATH = '/usr/local/info:/usr/share/info:/usr/info'
TERM = 'xterm'
LOGONSERVER = '\\LAPTOP-JF3AAISC'
ZES_ENABLE_SYSMAN = '1'
PSModulePath = 'C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules'
TEMP = '/tmp'
SHLVL = '1'
PROCESSOR_REVISION = '8c01'
DriverData = 'C:\Windows\System32\Drivers\DriverData'
COMMONPROGRAMFILES = 'C:\Program Files\Common Files'
LC_CTYPE = 'ja_JP.UTF-8'
PROCESSOR_IDENTIFIER = 'Intel64 Family 6 Model 140 Stepping 1, GenuineIntel'
SESSIONNAME = 'Console'
PS1 = '\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ '
HOMEPATH = '\Users\test'
TMP = '/tmp'
ProgramW6432 = 'C:\Program Files'
PROFILEREAD = 'true'
MINTTY_SHORTCUT = '/cygdrive/c/Users/Public/Desktop/Cygwin64 Terminal.lnk'
WINDIR = 'C:\WINDOWS'
PROCESSOR_ARCHITECTURE = 'AMD64'
PUBLIC = 'C:\Users\Public'
SYSTEMDRIVE = 'C:'
EXECIGNORE = '*.dll'
OLDPWD = '/etc/skel'
TERM_PROGRAM = 'mintty'
ProgramData = 'C:\ProgramData'
_ = '/usr/bin/cygcheck'

HKEY_CURRENT_USER\Software\Cygwin
HKEY_CURRENT_USER\Software\Cygwin\Installations
  (default) = '\??\C:\cygwin64'
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Installations
  (default) = '\??\C:\cygwin64'
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup
  (default) = 'C:\cygwin64'

obcaseinsensitive set to 1

Cygwin installations found in the registry:
  System: Key: e022582115c10879 Path: C:\cygwin64
  User:   Key: e022582115c10879 Path: C:\cygwin64

c:  hd  NTFS    484157Mb  29% CP CS UN PA FC    QU  

C:\cygwin64      /          system  binary,auto
C:\cygwin64\bin  /usr/bin   system  binary,auto
C:\cygwin64\lib  /usr/lib   system  binary,auto
cygdrive prefix  /cygdrive  user    binary,posix=0,auto

Found: C:\cygwin64\bin\awk
 -> C:\cygwin64\bin\gawk.exe
Found: C:\cygwin64\bin\bash.exe
Found: C:\WINDOWS\system32\bash.exe
Warning: C:\cygwin64\bin\bash.exe hides C:\WINDOWS\system32\bash.exe
Found: C:\cygwin64\bin\cat.exe
Found: C:\WINDOWS\system32\certutil.exe
Not Found: clinfo
Found: C:\WINDOWS\system32\comp.exe
Found: C:\WINDOWS\system32\convert.exe
Found: C:\cygwin64\bin\cp.exe
Not Found: cpp (good!)
Not Found: crontab
Found: C:\WINDOWS\system32\curl.exe
Found: C:\cygwin64\bin\expand.exe
Found: C:\WINDOWS\system32\expand.exe
Warning: C:\cygwin64\bin\expand.exe hides C:\WINDOWS\system32\expand.exe
Found: C:\cygwin64\bin\find.exe
Found: C:\WINDOWS\system32\find.exe
Warning: C:\cygwin64\bin\find.exe hides C:\WINDOWS\system32\find.exe
Found: C:\WINDOWS\system32\ftp.exe
Not Found: gcc
Not Found: gdb
Found: C:\cygwin64\bin\grep.exe
Found: C:\cygwin64\bin\hostname.exe
Found: C:\WINDOWS\system32\hostname.exe
Warning: C:\cygwin64\bin\hostname.exe hides C:\WINDOWS\system32\hostname.exe
Found: C:\cygwin64\bin\kill.exe
Found: C:\WINDOWS\system32\klist.exe
Not Found: ld
Found: C:\cygwin64\bin\ls.exe
Not Found: make
Found: C:\cygwin64\bin\mv.exe
Found: C:\WINDOWS\system32\nslookup.exe
Not Found: patch
Not Found: perl
Found: C:\WINDOWS\system32\replace.exe
Found: C:\cygwin64\bin\rm.exe
Found: C:\cygwin64\bin\sed.exe
Found: C:\cygwin64\bin\sh.exe
Found: C:\WINDOWS\system32\shutdown.exe
Found: C:\cygwin64\bin\sort.exe
Found: C:\WINDOWS\system32\sort.exe
Warning: C:\cygwin64\bin\sort.exe hides C:\WINDOWS\system32\sort.exe
Found: C:\WINDOWS\System32\OpenSSH\ssh.exe
Found: C:\cygwin64\bin\tar.exe
Found: C:\WINDOWS\system32\tar.exe
Warning: C:\cygwin64\bin\tar.exe hides C:\WINDOWS\system32\tar.exe
Found: C:\cygwin64\bin\test.exe
Found: C:\cygwin64\bin\timeout.exe
Found: C:\WINDOWS\system32\timeout.exe
Warning: C:\cygwin64\bin\timeout.exe hides C:\WINDOWS\system32\timeout.exe
Found: C:\cygwin64\bin\vi.exe
Not Found: vim
Found: C:\cygwin64\bin\whoami.exe
Found: C:\WINDOWS\system32\whoami.exe
Warning: C:\cygwin64\bin\whoami.exe hides C:\WINDOWS\system32\whoami.exe

   39k 2016/09/19 C:\cygwin64\bin\cygargp-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygargp-0.dll" v0.0 ts=2016-09-19 02:13
   17k 2023/01/15 C:\cygwin64\bin\cygattr-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygattr-1.dll" v0.0 ts=2023-01-15 15:39
  254k 2020/03/31 C:\cygwin64\bin\cygblkid-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygblkid-1.dll" v0.0 ts=2020-03-28 06:22
   66k 2019/07/21 C:\cygwin64\bin\cygbz2-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygbz2-1.dll" v0.0 ts=2019-07-22 00:05
 2493k 2023/02/21 C:\cygwin64\bin\cygcrypto-1.1.dll - os=4.0 img=0.0 sys=5.2
                  "cygcrypto-1.1.dll" v0.0 ts=2023-02-21 18:56
  353k 2020/03/31 C:\cygwin64\bin\cygfdisk-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygfdisk-1.dll" v0.0 ts=2020-03-28 06:23
   27k 2015/11/17 C:\cygwin64\bin\cygffi-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygffi-6.dll" v0.0 ts=2015-11-17 22:14
   60k 2023/01/20 C:\cygwin64\bin\cygformw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygformw-10.dll" v0.0 ts=2023-01-20 06:16
   74k 2022/05/02 C:\cygwin64\bin\cyggcc_s-seh-1.dll - os=4.0 img=0.0 sys=5.2
                  "cyggcc_s-seh-1.dll" v0.0 ts=2022-05-02 11:29
   49k 2019/07/10 C:\cygwin64\bin\cyggdbm-6.dll - os=4.0 img=0.0 sys=5.2
                  "cyggdbm-6.dll" v0.0 ts=2019-07-10 14:53
  582k 2021/08/21 C:\cygwin64\bin\cyggmp-10.dll - os=4.0 img=0.0 sys=5.2
                  "cyggmp-10.dll" v0.0 ts=2021-08-21 19:11
   36k 2022/10/08 C:\cygwin64\bin\cyghistory7.dll - os=4.0 img=0.0 sys=5.2
                  "cyghistory7.dll" v0.0 ts=2022-10-08 05:37
 1063k 2022/05/23 C:\cygwin64\bin\cygiconv-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygiconv-2.dll" v0.0 ts=2022-05-23 12:22
   44k 2022/11/18 C:\cygwin64\bin\cygintl-8.dll - os=4.0 img=0.0 sys=5.2
                  "cygintl-8.dll" v0.0 ts=2022-11-18 12:16
  136k 2022/10/30 C:\cygwin64\bin\cyglz4-1.dll - os=4.0 img=0.0 sys=5.2
                  "cyglz4-1.dll" v0.0 ts=2022-10-30 17:59
  174k 2023/03/25 C:\cygwin64\bin\cyglzma-5.dll - os=4.0 img=0.0 sys=5.2
                  "cyglzma-5.dll" v0.0 ts=2023-03-25 21:53
  160k 2023/01/14 C:\cygwin64\bin\cygmagic-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygmagic-1.dll" v0.0 ts=2023-01-14 21:35
  214k 2023/01/14 C:\cygwin64\bin\cygman-2-11-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygman-2-11-2.dll" v0.0 ts=2023-01-14 18:17
   25k 2023/01/14 C:\cygwin64\bin\cygmandb-2-11-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygmandb-2-11-2.dll" v0.0 ts=2023-01-14 18:17
   29k 2023/01/20 C:\cygwin64\bin\cygmenuw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygmenuw-10.dll" v0.0 ts=2023-01-20 06:14
  650k 2023/01/07 C:\cygwin64\bin\cygmpfr-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygmpfr-6.dll" v0.0 ts=2023-01-07 08:06
  327k 2023/01/20 C:\cygwin64\bin\cygncursesw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygncursesw-10.dll" v0.0 ts=2023-01-20 06:12
 1020k 2020/03/27 C:\cygwin64\bin\cygp11-kit-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygp11-kit-0.dll" v0.0 ts=2020-03-27 22:30
   13k 2023/01/20 C:\cygwin64\bin\cygpanelw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygpanelw-10.dll" v0.0 ts=2023-01-20 06:14
  620k 2022/12/18 C:\cygwin64\bin\cygpcre2-8-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygpcre2-8-0.dll" v0.0 ts=2022-12-18 16:27
   44k 2022/10/06 C:\cygwin64\bin\cygpipeline-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygpipeline-1.dll" v0.0 ts=2022-10-06 19:49
   42k 2023/02/19 C:\cygwin64\bin\cygpopt-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygpopt-0.dll" v0.0 ts=2023-02-19 19:45
  257k 2022/10/08 C:\cygwin64\bin\cygreadline7.dll - os=4.0 img=0.0 sys=5.2
                  "cygreadline7.dll" v0.0 ts=2022-10-08 05:37
   11k 2015/07/17 C:\cygwin64\bin\cygsigsegv-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygsigsegv-2.dll" v0.0 ts=2015-07-17 22:35
  156k 2020/03/31 C:\cygwin64\bin\cygsmartcols-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygsmartcols-1.dll" v0.0 ts=2020-03-28 06:22
  512k 2023/02/21 C:\cygwin64\bin\cygssl-1.1.dll - os=4.0 img=0.0 sys=5.2
                  "cygssl-1.1.dll" v0.0 ts=2023-02-21 18:57
 1870k 2022/05/02 C:\cygwin64\bin\cygstdc++-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygstdc++-6.dll" v0.0 ts=2022-05-02 11:43
   68k 2019/07/29 C:\cygwin64\bin\cygtasn1-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygtasn1-6.dll" v0.0 ts=2019-07-29 03:12
   59k 2023/01/20 C:\cygwin64\bin\cygticw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygticw-10.dll" v0.0 ts=2023-01-20 06:12
   27k 2020/03/31 C:\cygwin64\bin\cyguuid-1.dll - os=4.0 img=0.0 sys=5.2
                  "cyguuid-1.dll" v0.0 ts=2020-03-28 06:22
   88k 2022/10/15 C:\cygwin64\bin\cygz.dll - os=4.0 img=0.0 sys=5.2
                  "cygz.dll" v0.0 ts=2022-10-15 19:14
  637k 2023/02/11 C:\cygwin64\bin\cygzstd-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygzstd-1.dll" v0.0 ts=2023-02-11 14:15
 2884k 2023/02/14 C:\cygwin64\bin\cygwin1.dll - os=4.0 img=0.0 sys=5.2
                  "cygwin1.dll" v0.0 ts=2023-02-14 13:23
    Cygwin DLL version info:
        DLL version: 3.4.6
        API major: 0
        API minor: 345
        Shared data: 5
        DLL identifier: cygwin1
        Mount registry: 3
        Cygwin registry name: Cygwin
        Installations name: Installations
        Cygdrive default prefix: 
        Build date: 
        Shared id: cygwin1S5


Can't find the cygrunsrv utility, skipping services check.


Cygwin Package Information
Last downloaded files to: C:\Users\suzuyu\Downloads
Last downloaded files from: https://ftp.jaist.ac.jp/pub/cygwin/

Package              Version                      Status
_autorebase          001091-1                     OK
alternatives         1.3.30c-10                   OK
base-cygwin          3.8-2                        OK
base-files           4.3-3                        OK
bash                 5.2.15-3                     OK
bzip2                1.0.8-1                      OK
ca-certificates      2023.2.60-1                  OK
coreutils            9.0-1                        OK
crypto-policies      20190218-1                   OK
cygutils             1.4.17-1                     OK
cygwin               3.4.6-1                      OK
dash                 0.5.12-2                     OK
diffutils            3.9-1                        OK
editrights           1.04-1                       OK
file                 5.44-1                       OK
findutils            4.9.0-1                      OK
gawk                 5.2.1-2                      OK
getent               2.18.90-5                    OK
grep                 3.10-1                       OK
groff                1.22.4-1                     OK
gzip                 1.12-1                       OK
hostname             3.13-1                       OK
info                 7.0.3-1                      OK
ipc-utils            1.1-1                        OK
less                 590-1                        OK
libargp              20110921-3                   OK
libattr1             2.5.1-1.20.g0981a7bfe487     OK
libblkid1            2.33.1-2                     OK
libbz2_1             1.0.8-1                      OK
libfdisk1            2.33.1-2                     OK
libffi6              3.2.1-2                      OK
libgcc1              11.3.0-1                     OK
libgdbm6             1.18.1-1                     OK
libgmp10             6.2.1-2                      OK
libiconv2            1.17-1                       OK
libintl8             0.21.1-2                     OK
liblz4_1             1.9.4-1                      OK
liblzma5             5.4.2-1                      OK
libmpfr6             4.2.0-1                      OK
libncursesw10        6.4-3.20230114               OK
libp11-kit0          0.23.20-1                    OK
libpcre2_8_0         10.42-1                      OK
libpipeline1         1.5.6-1                      OK
libpopt-common       1.19-1                       OK
libpopt0             1.19-1                       OK
libreadline7         8.2-2                        OK
libsigsegv2          2.10-2                       OK
libsmartcols1        2.33.1-2                     OK
libssl1.1            1.1.1t-1                     OK
libstdc++6           11.3.0-1                     OK
libtasn1_6           4.14-1                       OK
libuuid1             2.33.1-2                     OK
libzstd1             1.5.4-1                      OK
login                1.13-1                       OK
man-db               2.11.2-1                     OK
mintty               3.6.4-1                      OK
ncurses              6.4-3.20230114               OK
openssl              1.1.1t-1                     OK
p11-kit              0.23.20-1                    OK
p11-kit-trust        0.23.20-1                    OK
rebase               4.6.2-2                      OK
run                  1.3.4-2                      OK
sed                  4.9-1                        OK
tar                  1.34-1                       OK
terminfo             6.4-3.20230114               OK
tzcode               2023c-1                      OK
tzdata               2023c-1                      OK
util-linux           2.33.1-2                     OK
vim-minimal          8.2.4372-1                   OK
which                2.20-2                       OK
xz                   5.4.2-1                      OK
zlib0                1.2.13-1                     OK
zstd                 1.5.4-1                      OK
Use -h to see help about each section

[-- Attachment #3: cygcheck_before_crash.out --]
[-- Type: application/octet-stream, Size: 16019 bytes --]


Cygwin Configuration Diagnostics
Current System Time: Tue Apr 04 15:44:08 2023

Windows 11 Home Ver 10.0 Build 22621 

Path:	C:\cygwin64\usr\local\bin
	C:\cygwin64\bin
	C:\Program Files\ImageMagick-7.1.0-Q16-HDRI
	C:\Program Files (x86)\Common Files\Apple\Apple Application Support
	C:\WINDOWS\system32
	C:\WINDOWS
	C:\WINDOWS\System32\Wbem
	C:\WINDOWS\System32\WindowsPowerShell\v1.0
	C:\WINDOWS\System32\OpenSSH
	C:\Program Files (x86)\Fujitsu\FJAgent\Core\bin
	C:\texlive\2021\bin\win32
	C:\Program Files\gs\gs10.00.0\bin
	C:\Users\test\AppData\Local\Microsoft\WindowsApps

Output from C:\cygwin64\bin\id.exe
UID: 197612(test)                 GID: 197121(なし)
197121(なし)                    545(Users)
4(INTERACTIVE)                    66049(CONSOLE LOGON)
11(Authenticated Users)           15(This Organization)
113(ローカル アカウント) 4095(CurrentSession)
66048(LOCAL)                      262154(NTLM Authentication)
401408(Medium Mandatory Level)

SysDir: C:\WINDOWS\system32
WinDir: C:\WINDOWS

PWD = '/cygdrive/c/Users/test/cygwin'
HOME = '/cygdrive/c/Users/test/cygwin'
USER = 'test'

ProgramFiles(x86) = 'C:\Program Files (x86)'
!:: = '::\'
CommonProgramFiles(x86) = 'C:\Program Files (x86)\Common Files'
SHELL = '/bin/bash'
NUMBER_OF_PROCESSORS = '8'
PROCESSOR_LEVEL = '6'
TERM_PROGRAM_VERSION = '3.6.4'
USERDOMAIN_ROAMINGPROFILE = 'LAPTOP-JF3AAISC'
HOSTNAME = 'LAPTOP-JF3AAISC'
PROGRAMFILES = 'C:\Program Files'
PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'
OS = 'Windows_NT'
HOMEDRIVE = 'C:'
USERDOMAIN = 'LAPTOP-JF3AAISC'
USERPROFILE = 'C:\Users\test'
OneDriveConsumer = 'C:\Users\test\OneDrive'
PRINTER = 'FUJI XEROX DocuPrint CM310 z'
TZ = 'Asia/Tokyo'
ALLUSERSPROFILE = 'C:\ProgramData'
ORIGINAL_PATH = '/cygdrive/c/Program Files/ImageMagick-7.1.0-Q16-HDRI:/cygdrive/c/Program Files (x86)/Common Files/Apple/Apple Application Support:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/WINDOWS/System32/OpenSSH:/cygdrive/c/Program Files (x86)/Fujitsu/FJAgent/Core/bin:/cygdrive/c/texlive/2021/bin/win32:/cygdrive/c/Program Files/gs/gs10.00.0/bin:/cygdrive/c/Users/test/AppData/Local/Microsoft/WindowsApps'
CommonProgramW6432 = 'C:\Program Files\Common Files'
USERNAME = 'test'
OneDrive = 'C:\Users\test\OneDrive'
COMSPEC = 'C:\WINDOWS\system32\cmd.exe'
APPDATA = 'C:\Users\test\AppData\Roaming'
SYSTEMROOT = 'C:\WINDOWS'
LOCALAPPDATA = 'C:\Users\test\AppData\Local'
__COMPAT_LAYER = 'DetectorsAppHealth'
COMPUTERNAME = 'LAPTOP-JF3AAISC'
INFOPATH = '/usr/local/info:/usr/share/info:/usr/info'
TERM = 'xterm'
LOGONSERVER = '\\LAPTOP-JF3AAISC'
ZES_ENABLE_SYSMAN = '1'
PSModulePath = 'C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules'
TEMP = '/tmp'
SHLVL = '1'
PROCESSOR_REVISION = '8c01'
DriverData = 'C:\Windows\System32\Drivers\DriverData'
COMMONPROGRAMFILES = 'C:\Program Files\Common Files'
LC_CTYPE = 'ja_JP.UTF-8'
PROCESSOR_IDENTIFIER = 'Intel64 Family 6 Model 140 Stepping 1, GenuineIntel'
SESSIONNAME = 'Console'
PS1 = '\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ '
HOMEPATH = '\Users\test'
TMP = '/tmp'
ProgramW6432 = 'C:\Program Files'
PROFILEREAD = 'true'
MINTTY_SHORTCUT = '/cygdrive/c/Users/Public/Desktop/Cygwin64 Terminal.lnk'
WINDIR = 'C:\WINDOWS'
PROCESSOR_ARCHITECTURE = 'AMD64'
PUBLIC = 'C:\Users\Public'
SYSTEMDRIVE = 'C:'
EXECIGNORE = '*.dll'
OLDPWD = '/etc/skel'
TERM_PROGRAM = 'mintty'
ProgramData = 'C:\ProgramData'
_ = '/usr/bin/cygcheck'

HKEY_CURRENT_USER\Software\Cygwin
HKEY_CURRENT_USER\Software\Cygwin\Installations
  (default) = '\??\C:\cygwin64'
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Installations
  (default) = '\??\C:\cygwin64'
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup
  (default) = 'C:\cygwin64'

obcaseinsensitive set to 1

Cygwin installations found in the registry:
  System: Key: e022582115c10879 Path: C:\cygwin64
  User:   Key: e022582115c10879 Path: C:\cygwin64

c:  hd  NTFS    484157Mb  29% CP CS UN PA FC    QU  

C:\cygwin64      /          system  binary,auto
C:\cygwin64\bin  /usr/bin   system  binary,auto
C:\cygwin64\lib  /usr/lib   system  binary,auto
cygdrive prefix  /cygdrive  user    binary,posix=0,auto

Found: C:\cygwin64\bin\awk
 -> C:\cygwin64\bin\gawk.exe
Found: C:\cygwin64\bin\bash.exe
Found: C:\WINDOWS\system32\bash.exe
Warning: C:\cygwin64\bin\bash.exe hides C:\WINDOWS\system32\bash.exe
Found: C:\cygwin64\bin\cat.exe
Found: C:\WINDOWS\system32\certutil.exe
Not Found: clinfo
Found: C:\WINDOWS\system32\comp.exe
Found: C:\WINDOWS\system32\convert.exe
Found: C:\cygwin64\bin\cp.exe
Not Found: cpp (good!)
Not Found: crontab
Found: C:\WINDOWS\system32\curl.exe
Found: C:\cygwin64\bin\expand.exe
Found: C:\WINDOWS\system32\expand.exe
Warning: C:\cygwin64\bin\expand.exe hides C:\WINDOWS\system32\expand.exe
Found: C:\cygwin64\bin\find.exe
Found: C:\WINDOWS\system32\find.exe
Warning: C:\cygwin64\bin\find.exe hides C:\WINDOWS\system32\find.exe
Found: C:\WINDOWS\system32\ftp.exe
Not Found: gcc
Not Found: gdb
Found: C:\cygwin64\bin\grep.exe
Found: C:\cygwin64\bin\hostname.exe
Found: C:\WINDOWS\system32\hostname.exe
Warning: C:\cygwin64\bin\hostname.exe hides C:\WINDOWS\system32\hostname.exe
Found: C:\cygwin64\bin\kill.exe
Found: C:\WINDOWS\system32\klist.exe
Not Found: ld
Found: C:\cygwin64\bin\ls.exe
Not Found: make
Found: C:\cygwin64\bin\mv.exe
Found: C:\WINDOWS\system32\nslookup.exe
Not Found: patch
Not Found: perl
Found: C:\WINDOWS\system32\replace.exe
Found: C:\cygwin64\bin\rm.exe
Found: C:\cygwin64\bin\sed.exe
Found: C:\cygwin64\bin\sh.exe
Found: C:\WINDOWS\system32\shutdown.exe
Found: C:\cygwin64\bin\sort.exe
Found: C:\WINDOWS\system32\sort.exe
Warning: C:\cygwin64\bin\sort.exe hides C:\WINDOWS\system32\sort.exe
Found: C:\WINDOWS\System32\OpenSSH\ssh.exe
Found: C:\cygwin64\bin\tar.exe
Found: C:\WINDOWS\system32\tar.exe
Warning: C:\cygwin64\bin\tar.exe hides C:\WINDOWS\system32\tar.exe
Found: C:\cygwin64\bin\test.exe
Found: C:\cygwin64\bin\timeout.exe
Found: C:\WINDOWS\system32\timeout.exe
Warning: C:\cygwin64\bin\timeout.exe hides C:\WINDOWS\system32\timeout.exe
Found: C:\cygwin64\bin\vi.exe
Not Found: vim
Found: C:\cygwin64\bin\whoami.exe
Found: C:\WINDOWS\system32\whoami.exe
Warning: C:\cygwin64\bin\whoami.exe hides C:\WINDOWS\system32\whoami.exe

   39k 2016/09/19 C:\cygwin64\bin\cygargp-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygargp-0.dll" v0.0 ts=2016-09-19 02:13
   17k 2023/01/15 C:\cygwin64\bin\cygattr-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygattr-1.dll" v0.0 ts=2023-01-15 15:39
  254k 2020/03/31 C:\cygwin64\bin\cygblkid-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygblkid-1.dll" v0.0 ts=2020-03-28 06:22
   66k 2019/07/21 C:\cygwin64\bin\cygbz2-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygbz2-1.dll" v0.0 ts=2019-07-22 00:05
 2493k 2023/02/21 C:\cygwin64\bin\cygcrypto-1.1.dll - os=4.0 img=0.0 sys=5.2
                  "cygcrypto-1.1.dll" v0.0 ts=2023-02-21 18:56
  353k 2020/03/31 C:\cygwin64\bin\cygfdisk-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygfdisk-1.dll" v0.0 ts=2020-03-28 06:23
   27k 2015/11/17 C:\cygwin64\bin\cygffi-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygffi-6.dll" v0.0 ts=2015-11-17 22:14
   60k 2023/01/20 C:\cygwin64\bin\cygformw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygformw-10.dll" v0.0 ts=2023-01-20 06:16
   74k 2022/05/02 C:\cygwin64\bin\cyggcc_s-seh-1.dll - os=4.0 img=0.0 sys=5.2
                  "cyggcc_s-seh-1.dll" v0.0 ts=2022-05-02 11:29
   49k 2019/07/10 C:\cygwin64\bin\cyggdbm-6.dll - os=4.0 img=0.0 sys=5.2
                  "cyggdbm-6.dll" v0.0 ts=2019-07-10 14:53
  582k 2021/08/21 C:\cygwin64\bin\cyggmp-10.dll - os=4.0 img=0.0 sys=5.2
                  "cyggmp-10.dll" v0.0 ts=2021-08-21 19:11
   36k 2022/10/08 C:\cygwin64\bin\cyghistory7.dll - os=4.0 img=0.0 sys=5.2
                  "cyghistory7.dll" v0.0 ts=2022-10-08 05:37
 1063k 2022/05/23 C:\cygwin64\bin\cygiconv-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygiconv-2.dll" v0.0 ts=2022-05-23 12:22
   44k 2022/11/18 C:\cygwin64\bin\cygintl-8.dll - os=4.0 img=0.0 sys=5.2
                  "cygintl-8.dll" v0.0 ts=2022-11-18 12:16
  136k 2022/10/30 C:\cygwin64\bin\cyglz4-1.dll - os=4.0 img=0.0 sys=5.2
                  "cyglz4-1.dll" v0.0 ts=2022-10-30 17:59
  174k 2023/03/25 C:\cygwin64\bin\cyglzma-5.dll - os=4.0 img=0.0 sys=5.2
                  "cyglzma-5.dll" v0.0 ts=2023-03-25 21:53
  160k 2023/01/14 C:\cygwin64\bin\cygmagic-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygmagic-1.dll" v0.0 ts=2023-01-14 21:35
  214k 2023/01/14 C:\cygwin64\bin\cygman-2-11-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygman-2-11-2.dll" v0.0 ts=2023-01-14 18:17
   25k 2023/01/14 C:\cygwin64\bin\cygmandb-2-11-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygmandb-2-11-2.dll" v0.0 ts=2023-01-14 18:17
   29k 2023/01/20 C:\cygwin64\bin\cygmenuw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygmenuw-10.dll" v0.0 ts=2023-01-20 06:14
  650k 2023/01/07 C:\cygwin64\bin\cygmpfr-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygmpfr-6.dll" v0.0 ts=2023-01-07 08:06
  327k 2023/01/20 C:\cygwin64\bin\cygncursesw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygncursesw-10.dll" v0.0 ts=2023-01-20 06:12
 1020k 2020/03/27 C:\cygwin64\bin\cygp11-kit-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygp11-kit-0.dll" v0.0 ts=2020-03-27 22:30
   13k 2023/01/20 C:\cygwin64\bin\cygpanelw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygpanelw-10.dll" v0.0 ts=2023-01-20 06:14
  620k 2022/12/18 C:\cygwin64\bin\cygpcre2-8-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygpcre2-8-0.dll" v0.0 ts=2022-12-18 16:27
   44k 2022/10/06 C:\cygwin64\bin\cygpipeline-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygpipeline-1.dll" v0.0 ts=2022-10-06 19:49
   42k 2023/02/19 C:\cygwin64\bin\cygpopt-0.dll - os=4.0 img=0.0 sys=5.2
                  "cygpopt-0.dll" v0.0 ts=2023-02-19 19:45
  257k 2022/10/08 C:\cygwin64\bin\cygreadline7.dll - os=4.0 img=0.0 sys=5.2
                  "cygreadline7.dll" v0.0 ts=2022-10-08 05:37
   11k 2015/07/17 C:\cygwin64\bin\cygsigsegv-2.dll - os=4.0 img=0.0 sys=5.2
                  "cygsigsegv-2.dll" v0.0 ts=2015-07-17 22:35
  156k 2020/03/31 C:\cygwin64\bin\cygsmartcols-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygsmartcols-1.dll" v0.0 ts=2020-03-28 06:22
  512k 2023/02/21 C:\cygwin64\bin\cygssl-1.1.dll - os=4.0 img=0.0 sys=5.2
                  "cygssl-1.1.dll" v0.0 ts=2023-02-21 18:57
 1870k 2022/05/02 C:\cygwin64\bin\cygstdc++-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygstdc++-6.dll" v0.0 ts=2022-05-02 11:43
   68k 2019/07/29 C:\cygwin64\bin\cygtasn1-6.dll - os=4.0 img=0.0 sys=5.2
                  "cygtasn1-6.dll" v0.0 ts=2019-07-29 03:12
   59k 2023/01/20 C:\cygwin64\bin\cygticw-10.dll - os=4.0 img=0.0 sys=5.2
                  "cygticw-10.dll" v0.0 ts=2023-01-20 06:12
   27k 2020/03/31 C:\cygwin64\bin\cyguuid-1.dll - os=4.0 img=0.0 sys=5.2
                  "cyguuid-1.dll" v0.0 ts=2020-03-28 06:22
   88k 2022/10/15 C:\cygwin64\bin\cygz.dll - os=4.0 img=0.0 sys=5.2
                  "cygz.dll" v0.0 ts=2022-10-15 19:14
  637k 2023/02/11 C:\cygwin64\bin\cygzstd-1.dll - os=4.0 img=0.0 sys=5.2
                  "cygzstd-1.dll" v0.0 ts=2023-02-11 14:15
 2884k 2023/02/14 C:\cygwin64\bin\cygwin1.dll - os=4.0 img=0.0 sys=5.2
                  "cygwin1.dll" v0.0 ts=2023-02-14 13:23
    Cygwin DLL version info:
        DLL version: 3.4.6
        API major: 0
        API minor: 345
        Shared data: 5
        DLL identifier: cygwin1
        Mount registry: 3
        Cygwin registry name: Cygwin
        Installations name: Installations
        Cygdrive default prefix: 
        Build date: 
        Shared id: cygwin1S5


Can't find the cygrunsrv utility, skipping services check.


Cygwin Package Information
Last downloaded files to: C:\Users\suzuyu\Downloads
Last downloaded files from: https://ftp.jaist.ac.jp/pub/cygwin/

Package              Version                      Status
_autorebase          001091-1                     OK
alternatives         1.3.30c-10                   OK
base-cygwin          3.8-2                        OK
base-files           4.3-3                        OK
bash                 5.2.15-3                     OK
bzip2                1.0.8-1                      OK
ca-certificates      2023.2.60-1                  OK
coreutils            9.0-1                        OK
crypto-policies      20190218-1                   OK
cygutils             1.4.17-1                     OK
cygwin               3.4.6-1                      OK
dash                 0.5.12-2                     OK
diffutils            3.9-1                        OK
editrights           1.04-1                       OK
file                 5.44-1                       OK
findutils            4.9.0-1                      OK
gawk                 5.2.1-2                      OK
getent               2.18.90-5                    OK
grep                 3.10-1                       OK
groff                1.22.4-1                     OK
gzip                 1.12-1                       OK
hostname             3.13-1                       OK
info                 7.0.3-1                      OK
ipc-utils            1.1-1                        OK
less                 590-1                        OK
libargp              20110921-3                   OK
libattr1             2.5.1-1.20.g0981a7bfe487     OK
libblkid1            2.33.1-2                     OK
libbz2_1             1.0.8-1                      OK
libfdisk1            2.33.1-2                     OK
libffi6              3.2.1-2                      OK
libgcc1              11.3.0-1                     OK
libgdbm6             1.18.1-1                     OK
libgmp10             6.2.1-2                      OK
libiconv2            1.17-1                       OK
libintl8             0.21.1-2                     OK
liblz4_1             1.9.4-1                      OK
liblzma5             5.4.2-1                      OK
libmpfr6             4.2.0-1                      OK
libncursesw10        6.4-3.20230114               OK
libp11-kit0          0.23.20-1                    OK
libpcre2_8_0         10.42-1                      OK
libpipeline1         1.5.6-1                      OK
libpopt-common       1.19-1                       OK
libpopt0             1.19-1                       OK
libreadline7         8.2-2                        OK
libsigsegv2          2.10-2                       OK
libsmartcols1        2.33.1-2                     OK
libssl1.1            1.1.1t-1                     OK
libstdc++6           11.3.0-1                     OK
libtasn1_6           4.14-1                       OK
libuuid1             2.33.1-2                     OK
libzstd1             1.5.4-1                      OK
login                1.13-1                       OK
man-db               2.11.2-1                     OK
mintty               3.6.4-1                      OK
ncurses              6.4-3.20230114               OK
openssl              1.1.1t-1                     OK
p11-kit              0.23.20-1                    OK
p11-kit-trust        0.23.20-1                    OK
rebase               4.6.2-2                      OK
run                  1.3.4-2                      OK
sed                  4.9-1                        OK
tar                  1.34-1                       OK
terminfo             6.4-3.20230114               OK
tzcode               2023c-1                      OK
tzdata               2023c-1                      OK
util-linux           2.33.1-2                     OK
vim-minimal          8.2.4372-1                   OK
which                2.20-2                       OK
xz                   5.4.2-1                      OK
zlib0                1.2.13-1                     OK
zstd                 1.5.4-1                      OK
Use -h to see help about each section

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

* Re: Mintty terminal crashes after changing the default home via nsswitch.conf and launch in a new profile in Windows 11
  2023-04-04 15:13 Mintty terminal crashes after changing the default home via nsswitch.conf and launch in a new profile in Windows 11 Yuta SUZUKI
@ 2023-04-04 19:46 ` Brian Inglis
  2023-04-05  2:56   ` Yuta SUZUKI
  2023-04-05 18:44 ` Thomas Wolff
  1 sibling, 1 reply; 6+ messages in thread
From: Brian Inglis @ 2023-04-04 19:46 UTC (permalink / raw)
  To: cygwin; +Cc: Yuta SUZUKI

On 2023-04-04 09:13, Yuta SUZUKI via Cygwin wrote:
> I am recently setting up the computer room of my faculty
> and then encountered the following issue:
> Short description:
> Change the default home directory via
> /etc/nsswitch.conf
> and make a new Windows user.
> Login to the new user (and do not logout) and launch cygwin.
> After opening another application's window, e.g. Explorer,
> and try to switch the focus between the cygwin window and the other window.
> After once or twice of switch, switching is not smooth
> and both the cygwin and the other application seem freezing.
> (Still we can launch powershell to restart the machine.)
> Procedure to reproduce the issue:
> 1. Login as an administrator.
> 2. Install cygwin with the default configuration.
> 3. In C:\cygwin64\etc\nssswitch.conf, replace
> # db_home:  /home/%U
> to
> db_home: /%H/cygwin

When you change this field from the default, it is up to you to understand and 
support the setting.

This setting example is only a suggestion, not meant to be used verbatim, and 
means that, for each Windows account at setup or login, under the user's Windows 
home directory, you will create a literal "cygwin" subdirectory, to be mounted 
by Cygwin at the user's Cygwin "login" as the user's Cygwin home directory 
/home/$USER.

Cygwin startup is probably waiting for an automounter to provide the directory 
here, just as if this were a Samba, NFS, or Unix network mount, or a Windows 
remote profile mount set up under 
{$USERPROFILE,$HOMEDRIVE$HOMEPATH}/AppData/Remote/.

Given the use of "cygwin" as a schema also here, this is possibly a poor 
example, which could be better documented.

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry

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

* Re: Mintty terminal crashes after changing the default home via nsswitch.conf and launch in a new profile in Windows 11
  2023-04-04 19:46 ` Brian Inglis
@ 2023-04-05  2:56   ` Yuta SUZUKI
  2023-04-05 19:55     ` Brian Inglis
  0 siblings, 1 reply; 6+ messages in thread
From: Yuta SUZUKI @ 2023-04-05  2:56 UTC (permalink / raw)
  To: cygwin

Brian,

Thank you for your reply.
But I can't get the point so much...

> This setting example is only a suggestion, not meant to be used verbatim, and
--- Yes. In my lab, I use another path for the default home. This is
just a simple test configuration.

> means that, for each Windows account at setup or login, under the user's Windows
> home directory, you will create a literal "cygwin" subdirectory, to be mounted
> ...
---- I think that usually cygwin automatically makes the directory
assigned as the default home in nsswitch.conf (and indeed it does).
I tried the same experiment with making C:\Users\test\cygwin manually
before launching cygwin,
but the same crash is reproduced.

> When you change this field from the default, it is up to you to understand and support the setting.
---- Well, I know that I want to assign the home directory
automatically to every user of my lab.
I don't know the internal structure of cygwin and so what I can do is
to only announce
"Do not use cygwin at your very first sign-in to the machine.
Re-sign-in before launching cygwin".
But I think this is a bit ridiculous...

> Cygwin startup is probably waiting for an automounter to provide the directory here,
---- Actually, in my experiment, cygwin does make the directory
C:\Users\test\cygwin
and even I could output cygcheck to C:\Users\test\cygwin\foo.out (or
/cygdrive/c/test/foo.out).
The problem is only in the crash of the window system.

Addendum:
Setting Windows environment variable HOME to be /cygdrive/c/users/test
works without the issue,
but it does affect another application in my lab as documented in
cygwin's users guide.

Yours,
Yuta Suzuki

2023年4月5日(水) 4:46 Brian Inglis <Brian.Inglis@shaw.ca>:
>
> On 2023-04-04 09:13, Yuta SUZUKI via Cygwin wrote:
> > I am recently setting up the computer room of my faculty
> > and then encountered the following issue:
> > Short description:
> > Change the default home directory via
> > /etc/nsswitch.conf
> > and make a new Windows user.
> > Login to the new user (and do not logout) and launch cygwin.
> > After opening another application's window, e.g. Explorer,
> > and try to switch the focus between the cygwin window and the other window.
> > After once or twice of switch, switching is not smooth
> > and both the cygwin and the other application seem freezing.
> > (Still we can launch powershell to restart the machine.)
> > Procedure to reproduce the issue:
> > 1. Login as an administrator.
> > 2. Install cygwin with the default configuration.
> > 3. In C:\cygwin64\etc\nssswitch.conf, replace
> > # db_home:  /home/%U
> > to
> > db_home: /%H/cygwin
>
> When you change this field from the default, it is up to you to understand and
> support the setting.
>
> This setting example is only a suggestion, not meant to be used verbatim, and
> means that, for each Windows account at setup or login, under the user's Windows
> home directory, you will create a literal "cygwin" subdirectory, to be mounted
> by Cygwin at the user's Cygwin "login" as the user's Cygwin home directory
> /home/$USER.
>
> Cygwin startup is probably waiting for an automounter to provide the directory
> here, just as if this were a Samba, NFS, or Unix network mount, or a Windows
> remote profile mount set up under
> {$USERPROFILE,$HOMEDRIVE$HOMEPATH}/AppData/Remote/.
>
> Given the use of "cygwin" as a schema also here, this is possibly a poor
> example, which could be better documented.
>
> --
> Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada
>
> La perfection est atteinte                   Perfection is achieved
> non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
> mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
>                                  -- Antoine de Saint-Exupéry



-- 
鈴木 雄太
立教大学 理学部数学科 助教
Yuta Suzuki
Department of Mathematics, Rikkyo University
suzuyu1729@gmail.com

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

* Re: Mintty terminal crashes after changing the default home via nsswitch.conf and launch in a new profile in Windows 11
  2023-04-04 15:13 Mintty terminal crashes after changing the default home via nsswitch.conf and launch in a new profile in Windows 11 Yuta SUZUKI
  2023-04-04 19:46 ` Brian Inglis
@ 2023-04-05 18:44 ` Thomas Wolff
  1 sibling, 0 replies; 6+ messages in thread
From: Thomas Wolff @ 2023-04-05 18:44 UTC (permalink / raw)
  To: cygwin



Am 04.04.2023 um 17:13 schrieb Yuta SUZUKI via Cygwin:
> Hi,
>
> I am recently setting up the computer room of my faculty
> and then encountered the following issue:
>
> Short description:
> Change the default home directory via
> /etc/nsswitch.conf
> and make a new Windows user.
> Login to the new user (and do not logout) and launch cygwin.
> After opening another application's window, e.g. Explorer,
> and try to switch the focus between the cygwin window and the other window.
> After once or twice of switch, switching is not smooth
> and both the cygwin and the other application seem freezing.
> (Still we can launch powershell to restart the machine.)
>
> Procedure to reproduce the issue:
> 1. Login as an administrator.
> 2. Install cygwin with the default configuration.
> 3. In C:\cygwin64\etc\nssswitch.conf, replace
> # db_home:  /home/%U
> to
> db_home: /%H/cygwin
> and save the file.
> 4. Create a new Windows user, say "test", without Microsoft account.
> 5. Logout from the administrator user used so far.
> 6. Login as the user "test". (Do not logout in the remaining steps.)
> 7. Launch cygwin from the desktop icon.
> 8. Run cygcheck -s -v -r > cygcheck_before_crash.out (to reproduce the
> issue, this step is unnecessary.)
> 9. Open a window of the Explorer.
> 10. Click the cygwin window. This does not switch the focus to the focus...
> 11. Click the cygwin icon in the task bar. Probably it switches the window.
> 12. Run cygcheck -s -v -r > cygcheck_after_crash.out (to reproduce the
> issue, this step is unnecessary.)
> 13. Click the Explorer window. This does not switch the focus to the focus...
> 14. Click the "x" mark on the top right of the cygwin window. This
> does not close the window...
> 16. Close the cygwin from the task bar. Probably it closes the window.
>
> For me, the behaviour in the step 11, 14, 15 are rather troublesome.
> If the situation is worse, then I cannot even use the start menu to
> turn off the machine.
> In such a case, still I could launch PowerShell with keyboard and run
> Restart-Computer -Force
> to restart the machine.
>
> Note that if you logout and re-login after the step 6
> or if you are using Windows 10, then the issue is not reproduced.
>
> Environment:
> Edition Windows 11 Home
> Version 22H2
> Installed on ‎3/‎29/‎2023
> OS build 22621.1413
> Experience Windows Feature Experience Pack 1000.22639.1000.0
>
> I attach the above two log files.
> (Some Japanese is included, sorry: some translations are
> "なし" = "not applicable"
> and
> "ローカル アカウント" = "local account")
>
> I would appreciate it very much if someone would solve this issue.
>
> Yours,
> Yuta Suzuki
First, the symptoms you describe are not a "crash". Is the terminal 
actually still responsive (even if with delay)?
I cannot reproduce such an issue.
Please also cross-test with another terminal, e.g. rxvt, or xterm (after 
running an X server).
Thomas

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

* Re: Mintty terminal crashes after changing the default home via nsswitch.conf and launch in a new profile in Windows 11
  2023-04-05  2:56   ` Yuta SUZUKI
@ 2023-04-05 19:55     ` Brian Inglis
  2023-04-05 20:29       ` Yuta SUZUKI
  0 siblings, 1 reply; 6+ messages in thread
From: Brian Inglis @ 2023-04-05 19:55 UTC (permalink / raw)
  To: cygwin; +Cc: Yuta SUZUKI

On 2023-04-04 20:56, Yuta SUZUKI via Cygwin wrote:
> Thank you for your reply.
> But I can't get the point so much...

>> This setting example is only a suggestion, not meant to be used verbatim, and

> --- Yes. In my lab, I use another path for the default home. This is
> just a simple test configuration.

>> means that, for each Windows account at setup or login, under the user's Windows
>> home directory, you will create a literal "cygwin" subdirectory, to be mounted

> ---- I think that usually cygwin automatically makes the directory
> assigned as the default home in nsswitch.conf (and indeed it does).
> I tried the same experiment with making C:\Users\test\cygwin manually
> before launching cygwin, but the same crash is reproduced.

>> When you change this field from the default, it is up to you to understand and support the setting.

> ---- Well, I know that I want to assign the home directory
> automatically to every user of my lab.
> I don't know the internal structure of cygwin and so what I can do is
> to only announce
> "Do not use cygwin at your very first sign-in to the machine.
> Re-sign-in before launching cygwin".
> But I think this is a bit ridiculous...

Perhaps wait until account initialization is complete before starting Cygwin

>> Cygwin startup is probably waiting for an automounter to provide the directory here,

> ---- Actually, in my experiment, cygwin does make the directory
> C:\Users\test\cygwin
> and even I could output cygcheck to C:\Users\test\cygwin\foo.out (or
> /cygdrive/c/test/foo.out).
> The problem is only in the crash of the window system.
> Addendum:
> Setting Windows environment variable HOME to be /cygdrive/c/users/test
> works without the issue,
> but it does affect another application in my lab as documented in
> cygwin's users guide.
Are you sure that Windows setup, update, AV update, Edge update, and all the 
other junk Windows runs has completed, and the account has been logged in, and 
that account setup has completed, before you start installing Cygwin, and before 
you start running Cygwin?

Also be aware that if you are on a domain, to top process in each Cygwin process 
tree has to access the ADC to load up all the AD related info including all the 
group memberships and rights for the user.
This can takes seconds to minutes, if the ADC is not on a close, fast LAN link.
So wait until you see a Cygwin shell prompt before trying anything.

Perhaps try with a more lightweight app like cmd, rather than File Explorer, 
which easily locks up systems.
Normally switching to TaskMgr, seeing the issue with, and killing the File 
Explorer process tree, resets the system, and restarts File Explorer.

During testing, switch to TaskMgr and check resource usage and waits to see what 
is actually causing the issue.
It is often an app in Cygwin's BLODA Big List Of Dodgy Apps:

	https://cygwin.com/faq/faq.html#faq.using.bloda

a "dodgy" app, often an AntiVirus, Malware, or other monitor, that is not 
written well enough to do its job without interfering with other apps.

This especially applies to Cygwin as it has to work around Windows limitations 
at a low level to implement POSIX compatible syscalls, and AV and monitoring 
applications are not always well written.

Do you have any such software operating on these systems, what is it, is it in 
our BLODA list; what is the system resource usage and what is in wait states 
when the issue occurs?

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry

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

* Re: Mintty terminal crashes after changing the default home via nsswitch.conf and launch in a new profile in Windows 11
  2023-04-05 19:55     ` Brian Inglis
@ 2023-04-05 20:29       ` Yuta SUZUKI
  0 siblings, 0 replies; 6+ messages in thread
From: Yuta SUZUKI @ 2023-04-05 20:29 UTC (permalink / raw)
  To: cygwin

Thomas and Brian,

Thank you for your replies.

> Please also cross-test with another terminal, e.g. rxvt, or xterm (after running an X server).
--- I tried Cygwin/X in the same procedure. I tried only xterm but
then I found a clearer problem:
After I launch XWin server, I got no response for
"Right-clicking on the "X applications menu" icon in the notification area".
Also, almost all windows get hung up (no normal response for GUI actions).
I can use only keyboard actions to manipulate applications.
Of course, again, signout & re-signin solve the problem completely.
Once I got some warning message, saying "please contact cygwin
developers" or like,
but I couldn't reproduce it and I didn't screenshot it... It said
"/tmp/... is locked" or something similar.

> Are you sure that Windows setup, update, AV update, Edge update, and all the ...
--- The signout & re-signin can be done very quickly, which solves the problem
and so I don't think such applications disturbing the environment.
Also, I found the issue in my lab, but now testing in my private machine,
which is not connected to domain network.

Also, I found that to reproduce the mintty terminal hung up,
it's better to click the blank (I mean black part) part of the terminal window,
not the upper edge of the window. (Then the cursor stops blinking,
which is strange.)

Yours,
Yuta

2023年4月6日(木) 4:55 Brian Inglis <Brian.Inglis@shaw.ca>:
>
> On 2023-04-04 20:56, Yuta SUZUKI via Cygwin wrote:
> > Thank you for your reply.
> > But I can't get the point so much...
>
> >> This setting example is only a suggestion, not meant to be used verbatim, and
>
> > --- Yes. In my lab, I use another path for the default home. This is
> > just a simple test configuration.
>
> >> means that, for each Windows account at setup or login, under the user's Windows
> >> home directory, you will create a literal "cygwin" subdirectory, to be mounted
>
> > ---- I think that usually cygwin automatically makes the directory
> > assigned as the default home in nsswitch.conf (and indeed it does).
> > I tried the same experiment with making C:\Users\test\cygwin manually
> > before launching cygwin, but the same crash is reproduced.
>
> >> When you change this field from the default, it is up to you to understand and support the setting.
>
> > ---- Well, I know that I want to assign the home directory
> > automatically to every user of my lab.
> > I don't know the internal structure of cygwin and so what I can do is
> > to only announce
> > "Do not use cygwin at your very first sign-in to the machine.
> > Re-sign-in before launching cygwin".
> > But I think this is a bit ridiculous...
>
> Perhaps wait until account initialization is complete before starting Cygwin
>
> >> Cygwin startup is probably waiting for an automounter to provide the directory here,
>
> > ---- Actually, in my experiment, cygwin does make the directory
> > C:\Users\test\cygwin
> > and even I could output cygcheck to C:\Users\test\cygwin\foo.out (or
> > /cygdrive/c/test/foo.out).
> > The problem is only in the crash of the window system.
> > Addendum:
> > Setting Windows environment variable HOME to be /cygdrive/c/users/test
> > works without the issue,
> > but it does affect another application in my lab as documented in
> > cygwin's users guide.
> Are you sure that Windows setup, update, AV update, Edge update, and all the
> other junk Windows runs has completed, and the account has been logged in, and
> that account setup has completed, before you start installing Cygwin, and before
> you start running Cygwin?
>
> Also be aware that if you are on a domain, to top process in each Cygwin process
> tree has to access the ADC to load up all the AD related info including all the
> group memberships and rights for the user.
> This can takes seconds to minutes, if the ADC is not on a close, fast LAN link.
> So wait until you see a Cygwin shell prompt before trying anything.
>
> Perhaps try with a more lightweight app like cmd, rather than File Explorer,
> which easily locks up systems.
> Normally switching to TaskMgr, seeing the issue with, and killing the File
> Explorer process tree, resets the system, and restarts File Explorer.
>
> During testing, switch to TaskMgr and check resource usage and waits to see what
> is actually causing the issue.
> It is often an app in Cygwin's BLODA Big List Of Dodgy Apps:
>
>         https://cygwin.com/faq/faq.html#faq.using.bloda
>
> a "dodgy" app, often an AntiVirus, Malware, or other monitor, that is not
> written well enough to do its job without interfering with other apps.
>
> This especially applies to Cygwin as it has to work around Windows limitations
> at a low level to implement POSIX compatible syscalls, and AV and monitoring
> applications are not always well written.
>
> Do you have any such software operating on these systems, what is it, is it in
> our BLODA list; what is the system resource usage and what is in wait states
> when the issue occurs?
>
> --
> Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada
>
> La perfection est atteinte                   Perfection is achieved
> non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
> mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
>                                  -- Antoine de Saint-Exupéry



-- 
鈴木 雄太
立教大学 理学部数学科 助教
Yuta Suzuki
Department of Mathematics, Rikkyo University
suzuyu1729@gmail.com

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

end of thread, other threads:[~2023-04-05 20:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-04 15:13 Mintty terminal crashes after changing the default home via nsswitch.conf and launch in a new profile in Windows 11 Yuta SUZUKI
2023-04-04 19:46 ` Brian Inglis
2023-04-05  2:56   ` Yuta SUZUKI
2023-04-05 19:55     ` Brian Inglis
2023-04-05 20:29       ` Yuta SUZUKI
2023-04-05 18:44 ` Thomas Wolff

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).