Hi,

Running `mintty ./bash` crashes on Windows 7 on cygwin-3_3-branch.

Tested in MSYS2 on merge-3.3 branch from
https://github.com/orgads/msys2-runtime-1. It includes the tip of
cygwin-3_3-branch as of today (05827d2df8).

Steps to reproduce:
1. Start cmd.exe
2. cd <msys-directory>\usr\bin
3. mintty ./bash

GDB trace attached. Simplified form:

1  ntdll!KiRaiseUserExceptionDispatcher                       0x7791b5ba
2  KERNELBASE!CloseHandle                                     0x7feffb31863
3  KERNEL32!CloseHandle                                       0x776b14f1
4  fhandler_base::close                 fhandler.cc      1217 0x1800682db
5  fhandler_pipe::close                 fhandler_pipe.cc 685  0x18009069a
6  fhandler_base::close_with_arch       fhandler.cc      1193 0x18006c7d5
7  close_all_files                      syscalls.cc      102  0x18014548f
8  do_exit                              dcrt0.cc         1200 0x180048213
9  _exit                                dcrt0.cc         1317 0x1800483ef
10 exit                                 exit.c           64   0x1801b3bdd
11 cygwin_exit                          dcrt0.cc         1311 0x1800483d3
12 _sigfe                               sigfe.s          35   0x18019593b
13 ??
Thread 5 (Thread 6896.0x1eb8 "waitproc"):
#0  0x000000007791980a in ntdll!ZwReadFile () from C:\Windows\SYSTEM32\ntdll.dll
No symbol table info available.
#1  0x000007feffb31a6a in ReadFile () from C:\Windows\system32\KernelBase.dll
No symbol table info available.
#2  0x00000000776a0599 in ReadFile () from C:\Windows\system32\kernel32.dll
No symbol table info available.
#3  0x000000018010ca04 in proc_waiter (arg=<optimized out>) at 
../../../../winsup/cygwin/pinfo.cc:1214
        nb = 0
        buf = 0 '\000'
        vchild = {<pinfo_minimal> = {h = 0x228, hProcess = 0x22c, rd_proc_pipe 
= 0x220}, destroy = false, winpid_hdl = 0x0, procinfo = 0x3a0000, waiter_ready 
= false, wait_thread = 0x180238898 <threads+88>}
        si = {si_signo = 20, si_code = 28, si_pid = 502, si_uid = 0, si_errno = 
0, {__pad = {0 <repeats 32 times>}, _si_commune = {_si_code = 0, 
_si_read_handle = 0x0, _si_write_handle = 0x0, _si_process_handle = 0x0, 
{{_si_fd = 0, _si_flags = 0}, _si_pipe_unique_id = 0, _si_str = 0x0}}, 
{{si_sigval = {sival_int = 0, sival_ptr = 0x0}, si_value = {sival_int = 0, 
sival_ptr = 0x0}}, {si_tid = 0, si_overrun = 0}}, {si_status = 0, si_utime = 0, 
si_stime = 0}, si_addr = 0x0, {__pad2 = {0 <repeats 30 times>}, si_cyg = 0x0}}}
        pid = 502
        its_me = false
        __PRETTY_FUNCTION__ = "DWORD proc_waiter(void*)"
#4  0x0000000180046583 in cygthread::callfunc (this=this@entry=0x180238898 
<threads+88>, issimplestub=issimplestub@entry=false) at 
../../../../winsup/cygwin/cygthread.cc:48
        pass_arg = <optimized out>
#5  0x0000000180046b46 in cygthread::stub (arg=arg@entry=0x180238898 
<threads+88>) at ../../../../winsup/cygwin/cygthread.cc:91
        notify = <optimized out>
        info = 0x180238898 <threads+88>
        __PRETTY_FUNCTION__ = "static DWORD cygthread::stub(void*)"
#6  0x0000000180047716 in _cygtls::call2 (this=0x24ace00, func=0x180046ac0 
<cygthread::stub(void*)>, arg=0x180238898 <threads+88>, 
buf=buf@entry=0x24acd50) at ../../../../winsup/cygwin/cygtls.cc:40
        res = <optimized out>
#7  0x00000001800477c4 in _cygtls::call (func=<optimized out>, arg=<optimized 
out>) at ../../../../winsup/cygwin/cygtls.cc:27
        buf = '\000' <repeats 2360 times>, 
"?M#\200\001\000\000\000\220N#\200\001\000\000\000HO#\200\001", '\000' <repeats 
51 times>, "\377\377\377\377\000\000\000\000\220Y\033\200\001", '\000' <repeats 
139 times>, 
"\001\000\000\000\000\000\000\000\016\063\315?4\022m?\336?\005\000\v", '\000' 
<repeats 1067 times>, "\003\000\000\000\000\000\000\000?M#\200\001", '\000' 
<repeats 587 times>, "\200\326?J\002", '\000' <repeats 28 times>, "\002", 
'\000' <repeats 1343 times>, "?\036", '\000' <repeats 158 times>, 
"\230\210#\200\001", '\000' <repeats 75 times>, "X?J\002", '\000' <repeats 2052 
times>, "?\027c\307", '\000' <repeats 92 times>, "\nTjw", '\000' <repeats 1388 
times>, 
"\037\000\004\033\000\000\000\000\020\004\000\000\000\000\000\000\210\371?<\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000;\000\000\000\000\000k\001,P\000\000\000\000??\230w\000\000\000\000\212?<\000\000\000\000\000??<\000\000\000\000\000\200\371?<",
 '\000' <repeats 13 times>, 
"\001\000\000\000\000\000\000\000D\000\000\000\000\000\000\000 #", '\000' 
<repeats 30 times>, 
"\004\000\000\000\003\300\002\005\000\000\000\000\000\000\000\000\200\371?<\000\000\000\000\000\220?<\000\000\000\000\000\177\000\000\000\000\000\000\000\220?<",
 '\000' <repeats 13 times>, "D", '\000' <repeats 11 times>, "\177\000\000\000 
#", '\000' <repeats 14 times>, "D", '\000' <repeats 15 times>, "\020\004", 
'\000' <repeats 14 times>, 
"\220?<\000\000\000\000\000\060\000\000\000\000\000\000\000\060\002;", '\000' 
<repeats 13 times>, " 6\002", '\000' <repeats 13 times>, 
"t\002;\000\000\000\000\000\060\002;\000\000\000\000\000\177", '\000' <repeats 
39 times>, "\060\002;", '\000' <repeats 45 times>, "d#\004C", '\000' <repeats 
28 times>, "\002\000\004\006", '\000' <repeats 28 times>, "(1?w", '\000' 
<repeats 22 times>, 
";\000\000\000\000\000\000\000;\000\000\000\000\000\020\004", '\000' <repeats 
14 times>, 
"\234{\215w\000\000\000\000\000\000;\000\000\000\000\000k\001,P\000\000\000\000\020\004\000\000\000\000\000\000@\004",
 '\000' <repeats 14 times>...
        protect = <optimized out>
#8  0x00000000776a556d in KERNEL32!BaseThreadInitThunk () from 
C:\Windows\system32\kernel32.dll
No symbol table info available.
#9  0x000000007790372d in ntdll!RtlUserThreadStart () from 
C:\Windows\SYSTEM32\ntdll.dll
No symbol table info available.
#10 0x0000000000000000 in ?? ()
No symbol table info available.
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 4 (Thread 6896.0x187c):
#0  0x000000007791b0aa in ntdll!ZwWaitForWorkViaWorkerFactory () from 
C:\Windows\SYSTEM32\ntdll.dll
No symbol table info available.
#1  0x00000000779a97c4 in ntdll!DbgUiRemoteBreakin () from 
C:\Windows\SYSTEM32\ntdll.dll
No symbol table info available.
#2  0x0000000180047716 in _cygtls::call2 (this=0x22ace00, func=0x779a94c0 
<ntdll!DbgUiRemoteBreakin+80>, arg=0x3c8d00, buf=buf@entry=0x22acd50) at 
../../../../winsup/cygwin/cygtls.cc:40
        res = <optimized out>
#3  0x00000001800477c4 in _cygtls::call (func=<optimized out>, arg=<optimized 
out>) at ../../../../winsup/cygwin/cygtls.cc:27
        buf = '\000' <repeats 2360 times>, 
"?M#\200\001\000\000\000\220N#\200\001\000\000\000HO#\200\001", '\000' <repeats 
203 times>, 
"\001\000\000\000\000\000\000\000\016\063\315?4\022m?\336?\005\000\v", '\000' 
<repeats 1067 times>, "\003\000\000\000\000\000\000\000?M#\200\001", '\000' 
<repeats 587 times>, "\200\326?*\002", '\000' <repeats 28 times>, "\002", 
'\000' <repeats 1343 times>, "|\030", '\000' <repeats 238 times>, "X?*\002", 
'\000' <repeats 2052 times>, "?\027c\307", '\000' <repeats 92 times>, "\nTjw", 
'\000' <repeats 1108 times>, "?o_\000\000\000\000\000?\214?w", '\000' <repeats 
12 times>, "?o_\000\000\000\000\000\300__", '\000' <repeats 29 times>, 
"X\001_\000\000\000\000\000?\214?w\000\000\000\000\300o_", '\000' <repeats 45 
times>, 
"x?*\002\000\000\000\000\004\000\001\005\000\000\000\000\000\000_\000\000\000\000\000?__\000\000\000\000\000\001\000\000\000\000\000\000\000?\002\000\000\000\000\000\000k\001\000P\000\000\000\000\061\000\000\000\000\000\000\000?\\_\000\000\000\000\000\020\003\000\000\000\000\000\000k\001\000P\000\000\000\000\063\020\230w\000\000\000\000\000\000_\000\000\000\000\000X\001_\000\000\000\000\000\000?*\002\000\000\000\000/\001",
 '\000' <repeats 30 times>, 
"\004\000\004\000\000\000\000\000\020\004\000\000\000\000\000\000X\303<\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000;\000\000\000\000\000k\001,P\000\000\000\000??\230w\000\000\000\000Z\303<\000\000\000\000\000[\303<\000\000\000\000\000P\303<",
 '\000' <repeats 13 times>, 
"\001\000\000\000\000\000\000\000D\000\000\000\000\000\000\000?", '\000' 
<repeats 31 times>, 
"\004\000\000\000\003\300\002\005\000\000\000\000\000\000\000\000P\303<\000\000\000\000\000`\303<\000\000\000\000\000\177\000\000\000\000\000\000\000`\303<",
 '\000' <repeats 13 times>, 
"D\000\000\000\000\000\000\000\177\000\000\000\177\000\000\000?", '\000' 
<repeats 15 times>, "D", '\000' <repeats 15 times>, 
"\020\004\000\000\000\000\000\000\004\000\000\000\003\000\000\005`\303<\000\000\000\000\000\060\000\000\000\000\000\000\000\060\002;\000\000\000\000\000\177\000\000\000\000\000\000\000P\f",
 '\000' <repeats 14 times>, 
"t\002;\000\000\000\000\000\060\002;\000\000\000\000\000\177", '\000' <repeats 
15 times>, "\006", '\000' <repeats 15 times>, 
"\060\002_\000\000\000\000\000\060\002;\000\000\000\000\000`\303<\000\000\000\000\000\070\000\000\000\000\000\000\000\060\002;",
 '\000' <repeats 13 times>, 
"@\000\000\000\000\000\000\000\307\000\004\303\000\000\000\000h\002;\000\000\000\000\000\060\002;\000\000\000\000\000\006\000\000\000\000\000\000\000\002\000\004\006",
 '\000' <repeats 28 times>, "(1?w", '\000' <repeats 22 times>, 
";\000\000\000\000\000\000\000;\000\000\000\000\000\020\004", '\000' <repeats 
14 times>, 
"\234{\215w\000\000\000\000\000\000;\000\000\000\000\000k\001,P\000\000\000\000\020\004\000\000\000\000\000\000@\004",
 '\000' <repeats 14 times>...
        protect = <optimized out>
#4  0x00000000776a556d in KERNEL32!BaseThreadInitThunk () from 
C:\Windows\system32\kernel32.dll
No symbol table info available.
#5  0x000000007790372d in ntdll!RtlUserThreadStart () from 
C:\Windows\SYSTEM32\ntdll.dll
No symbol table info available.
#6  0x0000000000000000 in ?? ()
No symbol table info available.
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 3 (Thread 6896.0xef0):
#0  0x0000000077919d5a in ntdll!ZwWaitForMultipleObjects () from 
C:\Windows\SYSTEM32\ntdll.dll
No symbol table info available.
#1  0x00000000778c332d in ntdll!RtlIsCriticalSectionLockedByThread () from 
C:\Windows\SYSTEM32\ntdll.dll
No symbol table info available.
#2  0x00000000776a556d in KERNEL32!BaseThreadInitThunk () from 
C:\Windows\system32\kernel32.dll
No symbol table info available.
#3  0x000000007790372d in ntdll!RtlUserThreadStart () from 
C:\Windows\SYSTEM32\ntdll.dll
No symbol table info available.
#4  0x0000000000000000 in ?? ()
No symbol table info available.
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 2 (Thread 6896.0x80c "sig"):
#0  0x000000007791980a in ntdll!ZwReadFile () from C:\Windows\SYSTEM32\ntdll.dll
No symbol table info available.
#1  0x000007feffb31a6a in ReadFile () from C:\Windows\system32\KernelBase.dll
No symbol table info available.
#2  0x00000000776a0599 in ReadFile () from C:\Windows\system32\kernel32.dll
No symbol table info available.
#3  0x00000001801356c1 in wait_sig () at 
../../../../winsup/cygwin/sigproc.cc:1359
        nb = 0
        q = <optimized out>
        pack = {si = {si_signo = 0, si_code = 0, si_pid = 0, si_uid = 0, 
si_errno = 0, {__pad = {0 <repeats 32 times>}, _si_commune = {_si_code = 0, 
_si_read_handle = 0x0, _si_write_handle = 0x0, _si_process_handle = 0x0, 
{{_si_fd = 0, _si_flags = 0}, _si_pipe_unique_id = 0, _si_str = 0x0}}, 
{{si_sigval = {sival_int = 0, sival_ptr = 0x0}, si_value = {sival_int = 0, 
sival_ptr = 0x0}}, {si_tid = 0, si_overrun = 0}}, {si_status = 0, si_utime = 0, 
si_stime = 0}, si_addr = 0x0, {__pad2 = {0 <repeats 30 times>}, si_cyg = 
0x0}}}, pid = 0, sigtls = 0x0, mask = 0x0, {wakeup = 0x0, thread_handle = 0x0, 
next = 0x0}}
        dummy_mask = 0
        tl_entry = <optimized out>
        clearwait = <optimized out>
        sig_held = false
        __PRETTY_FUNCTION__ = "void wait_sig(void*)"
#4  0x0000000180046583 in cygthread::callfunc (this=this@entry=0x180238840 
<threads>, issimplestub=issimplestub@entry=false) at 
../../../../winsup/cygwin/cygthread.cc:48
        pass_arg = <optimized out>
#5  0x0000000180046b46 in cygthread::stub (arg=arg@entry=0x180238840 <threads>) 
at ../../../../winsup/cygwin/cygthread.cc:91
        notify = <optimized out>
        info = 0x180238840 <threads>
        __PRETTY_FUNCTION__ = "static DWORD cygthread::stub(void*)"
#6  0x0000000180047716 in _cygtls::call2 (this=0x20ace00, func=0x180046ac0 
<cygthread::stub(void*)>, arg=0x180238840 <threads>, buf=buf@entry=0x20acd50) 
at ../../../../winsup/cygwin/cygtls.cc:40
        res = <optimized out>
#7  0x00000001800477c4 in _cygtls::call (func=<optimized out>, arg=<optimized 
out>) at ../../../../winsup/cygwin/cygtls.cc:27
        buf = '\000' <repeats 2360 times>, 
"?M#\200\001\000\000\000\220N#\200\001\000\000\000HO#\200\001", '\000' <repeats 
203 times>, 
"\001\000\000\000\000\000\000\000\016\063\315?4\022m?\336?\005\000\v", '\000' 
<repeats 1067 times>, "\003\000\000\000\000\000\000\000?M#\200\001", '\000' 
<repeats 587 times>, "\200\326?\n\002", '\000' <repeats 28 times>, "\002", 
'\000' <repeats 1343 times>, "\f\b", '\000' <repeats 158 times>, 
"@\210#\200\001", '\000' <repeats 75 times>, "X?\n\002", '\000' <repeats 2052 
times>, "?\027c\307", '\000' <repeats 92 times>, "\nTjw", '\000' <repeats 1108 
times>, "?_<\000\000\000\000\000?\214?w", '\000' <repeats 12 times>, 
"?_<\000\000\000\000\000\300O<", '\000' <repeats 29 times>, 
"X\001;\000\000\000\000\000?\214?w\000\000\000\000\a\000\004\003", '\000' 
<repeats 44 times>, 
"x?\n\002\000\000\000\000\004\000\001\005\000\000\000\000\000\000;\000\000\000\000\000?O<\000\000\000\000\000\001\000\000\000\000\000\000\000\020\004\000\000\000\000\000\000k\001,P\000\000\000\000D\000\000\000\000\000\000\000\220M<\000\000\000\000\000@\004\000\000\000\000\000\000k\001,P\000\000\000\000\063\020\230w\000\000\000\000\000\000;\000\000\000\000\000X\001;\000\000\000\000\000\000?\n\002\000\000\000\000#\001",
 '\000' <repeats 30 times>, 
"\a\000\004\003\000\000\000\000\020\004\000\000\000\000\000\000\230M<\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000;\000\000\000\000\000k\001,P\000\000\000\000??\230w\000\000\000\000\232M<\000\000\000\000\000?M<\000\000\000\000\000\220M<",
 '\000' <repeats 13 times>, 
"\001\000\000\000\000\000\000\000D\000\000\000\000\000\000\000\337", '\000' 
<repeats 31 times>, 
"\004\000\000\000\003\300\002\005\000\000\000\000\000\000\000\000\220M<\000\000\000\000\000X\001;",
 '\000' <repeats 13 times>, "?M<", '\000' <repeats 13 times>, 
"D\000\000\000\000\000\000\000\177\000\000\000\177\000\000\000\337", '\000' 
<repeats 15 times>, "D", '\000' <repeats 15 times>, "\020\004", '\000' <repeats 
14 times>, 
"?M<\000\000\000\000\000\060\000\000\000\000\000\000\000\060\002;\000\000\000\000\000\177\000\000\000\000\000\000\000\020\022",
 '\000' <repeats 22 times>, "\060\002;\000\000\000\000\000\177", '\000' 
<repeats 31 times>, "\060\002;\000\000\000\000\000\060\002_", '\000' <repeats 
45 times>, "#\000\004'", '\000' <repeats 28 times>, "?\000\004?", '\000' 
<repeats 28 times>, "(1?w", '\000' <repeats 22 times>, 
";\000\000\000\000\000\000\000;\000\000\000\000\000\020\004", '\000' <repeats 
14 times>, 
"\234{\215w\000\000\000\000\000\000;\000\000\000\000\000k\001,P\000\000\000\000\020\004\000\000\000\000\000\000@\004",
 '\000' <repeats 14 times>...
        protect = <optimized out>
#8  0x00000000776a556d in KERNEL32!BaseThreadInitThunk () from 
C:\Windows\system32\kernel32.dll
No symbol table info available.
#9  0x000000007790372d in ntdll!RtlUserThreadStart () from 
C:\Windows\SYSTEM32\ntdll.dll
No symbol table info available.
#10 0x0000000000000000 in ?? ()
No symbol table info available.
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 1 (Thread 6896.0x12f0 "mintty"):
#0  0x000000007791b5ba in ntdll!KiRaiseUserExceptionDispatcher () from 
C:\Windows\SYSTEM32\ntdll.dll
No symbol table info available.
#1  0x000007feffb31863 in KERNELBASE!CloseHandle () from 
C:\Windows\system32\KernelBase.dll
No symbol table info available.
#2  0x00000000776b14f1 in KERNEL32!CloseHandle () from 
C:\Windows\system32\kernel32.dll
No symbol table info available.
#3  0x00000001800682db in fhandler_base::close (this=this@entry=0x180353e80) at 
../../../../winsup/cygwin/fhandler.cc:1217
        res = -1
        __PRETTY_FUNCTION__ = "virtual int fhandler_base::close()"
#4  0x000000018009069a in fhandler_pipe::close (this=0x180353e80) at 
../../../../winsup/cygwin/fhandler_pipe.cc:685
        ret = <optimized out>
#5  0x000000018006c7d5 in fhandler_base::close_with_arch (this=0x180353e80) at 
../../../../winsup/cygwin/fhandler.cc:1193
        res = <optimized out>
        fh = 0x180353e80
        __PRETTY_FUNCTION__ = "int fhandler_base::close_with_arch()"
#6  0x000000018014548f in close_all_files (norelease=norelease@entry=false) at 
../../../../winsup/cygwin/syscalls.cc:102
        cfd = {<cygheap_fdmanip> = {_vptr.cygheap_fdmanip = <optimized out>, fd 
= 1, locked = false}, fh = 0x180353e80}
        i = 1
        h = 0x0
#7  0x0000000180048213 in do_exit (status=0) at 
../../../../winsup/cygwin/dcrt0.cc:1200
        __PRETTY_FUNCTION__ = "void do_exit(int)"
        until_exit = {skip_unlock = true, static locker = {name = 0x1802714f6 
<msg1+4086> "lock_process", sync = 1, waiters = 0, bruteforce = 0x20, visits = 
2, tls = 0xffffce00}}
        n = <optimized out>
#8  0x00000001800483ef in _exit (n=<optimized out>) at 
../../../../winsup/cygwin/dcrt0.cc:1317
No locals.
#9  0x00000001801b3bdd in exit (code=0) at 
../../../../../newlib/libc/stdlib/exit.c:64
No locals.
#10 0x00000001800483d3 in cygwin_exit (n=-17808) at 
../../../../winsup/cygwin/dcrt0.cc:1311
No locals.
#11 0x000000018019593b in _sigfe () at sigfe.s:35
No locals.
#12 0x0000000000000000 in ?? ()
No symbol table info available.
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
-- 
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