X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 47CA3384AB4D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1715804717; bh=nyY94nwF9Qfsv4iCXutUwwVh56MeNucyADLdlU4lb9g=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=GWQoP4SxhXzxRT78KapkBY54oDuHmZQXbayNofFyEMs1MJyZsHSuCo8FzNRqsELrR uf5a6zkjnIBU/DU7cDRKQpblTe2HLUAJbRjARtKWJgCN8MoeHlpRA19T+6491xhnKl sd8r94CbjsGsiQwxp1X0beMGKZT3+tGuCfc34EZw= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7CFC53858D20 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7CFC53858D20 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715804665; cv=none; b=waVbDrPZW742luSeB+bVjLzIb5NRnP2+Em60y0z/GlcoMbWfQEyCA3Ty1zfcEiah+DEKmPp0PW77N54QhHUUlXPHX3h7IB27YRqQc3XNUYoMVn0U/gVE02KFSRDVN9oT4jIOao/neavmy8+A7rkjuQBTeYvL9uRSGX5B5Jo05UQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715804665; c=relaxed/simple; bh=PoDwn0H9/DbDcnT6twyf0+ZJa/6OmLp1kvVczyjD65Q=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=d3bKWaL6hBSv4OEUXrxmG54LYUReTvD9v2sdWkeZNUTlxRCdDSnVQKOgL9s7kQQsAZsqx1FK+/apDPoot8yP8Z+uPr5m82ZpoB87czrTWS+Qk+hpMpFCgI5KO2eexNOxJgc3RSKDQ2zg2yVDtc92b4K8rkUuPxWg37r1y+VB6QM= ARC-Authentication-Results: i=1; server2.sourceware.org Message-ID: Date: Wed, 15 May 2024 14:24:19 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: cygwin application hangs on closing console Content-Language: en-CA To: cygwin AT cygwin DOT com References: <20240423035104 DOT 85352f8a8d821c0f4d569d18 AT nifty DOT ne DOT jp> <20240423192606 DOT 7b4aa04685afca2525eb5ed3 AT nifty DOT ne DOT jp> <6dd8a568-88c0-42d5-aa46-b09247cdecec AT johannesthoma DOT com> Organization: Systematic Software In-Reply-To: X-Rspamd-Queue-Id: 771CB2F X-Stat-Signature: mtyeucuipk8ew8i7onptec5qa1hhz6j5 X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00, BODY_8BITS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY, URIBL_SBL_A, WEIRD_PORT autolearn=no autolearn_force=no version=3.4.6 X-Rspamd-Server: rspamout07 X-Session-Marker: 427269616E2E496E676C69734053797374656D6174696353572E61622E6361 X-Session-ID: U2FsdGVkX1+lloDyPaWGqNCYJRVoSB2GMApcNlBaCG0= X-HE-Tag: 1715804660-768929 X-HE-Meta: U2FsdGVkX189Y5xdqxWuSNKhr79wYH9A1N5ZFULeq0pe3iOZ/5NMM1WBR5J6FLJZkJ4Dl8j9T2HRkgTniyP2ICutWQg+I/9+MnGh031ZxGB4oPS3NKAsajqgl46+HASN5/KY3i3RChIm8xqIdB0xUJUSHXzTJINA43QLAjztjEFjgABKsirVpUJ0WMXyWLPHq9w3GC1+faPj3/wKQercvfOSM+SFkwPKLUcAHQV9Trg3uL60MVVUE+amgD89qo5TFdDwKO/Z+SlnQsy7L+341Fjz+je/MVu1XuCHCf53rQNENSJxMH1WBCwpGdt2Qay0ziywR5qFtWmtZNKKNnAYOflq2Z0KEq7/ X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Brian Inglis via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Brian Inglis Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 44FKPJ7d2095241 On 2024-05-15 09:48, Johannes Khoshnazar-Thoma via Cygwin wrote: > Hi again, > > Am 15.05.24 um 17:37 schrieb Johannes Khoshnazar-Thoma: >> Hi again, >> >> Am 23.04.24 um 12:26 schrieb Takashi Yano: >>>>> Thanks for the report. Could you please test cygwin1.dll 3.5.3-1 >>>>> wihch is the latest cygwin release? >>>>> >> >> We retried the tests with cygwin1.dll 3.5.3-1 and it looks like >> the issue is still there. Here's an excerpt from the gdb debug >> session: >> > Sorry somehow the formatting got messed up I try again: > > (gdb) info thread >   Id   Target Id         Frame > * 1    Thread 0x11cc     0x00007ffe579d5ea4 in ntdll!ZwWaitForSingleObject () > from C:\src\dlls-syms\ntdll.dll\6502806A1cf000\ntdll.dll >   2    Thread 0x8ec      0x00007ffe579d5ee4 in ntdll!ZwReadFile () from > C:\src\dlls-syms\ntdll.dll\6502806A1cf000\ntdll.dll >   3    Thread 0x55c      0x00007ffe579d5ea4 in ntdll!ZwWaitForSingleObject () > from C:\src\dlls-syms\ntdll.dll\6502806A1cf000\ntdll.dll >   4    Thread 0x131c     0x00007ffe579d95f4 in > ntdll!ZwWaitForWorkViaWorkerFactory () from > C:\src\dlls-syms\ntdll.dll\6502806A1cf000\ntdll.dll >   5    Thread 0x9b8      0x00007ffe579d95f4 in > ntdll!ZwWaitForWorkViaWorkerFactory () from > C:\src\dlls-syms\ntdll.dll\6502806A1cf000\ntdll.dll > (gdb) thread 1 > [Switching to thread 1 (Thread 0x11cc)] > #0  0x00007ffe579d5ea4 in ntdll!ZwWaitForSingleObject () from > C:\src\dlls-syms\ntdll.dll\6502806A1cf000\ntdll.dll > (gdb) bt > #0  0x00007ffe579d5ea4 in ntdll!ZwWaitForSingleObject () from > C:\src\dlls-syms\ntdll.dll\6502806A1cf000\ntdll.dll > #1  0x00007ffe54156d1f in WaitForSingleObjectEx () from > C:\src\dlls-syms\KERNELBASE.dll\660F5EEC21e000\KERNELBASE.dll > #2  0x00007ffe4a2033a0 in fhandler_console::close (this=0x800009030) at > /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/fhandler/console.cc:1914 > #3  0x00007ffe4a1f6ce7 in fhandler_base::close_with_arch (this=0x800009030) at > /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/fhandler/base.cc:1288 > #4  0x00007ffe4a26a4cd in init_cygheap::close_ctty (this=0x800000000) at > /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/mm/cygheap.cc:135 > #5  0x00007ffe4a1c7c4e in close_all_files (norelease=norelease AT entry=false) at > /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/syscalls.cc:81 > #6  0x00007ffe4a146840 in do_exit (status=0) at > /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/dcrt0.cc:1128 > #7  0x00007ffe4a1469f7 in _exit (n=) at > /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/dcrt0.cc:1243 > #8  0x00007ffe4a2a4bb9 in exit (code=0) at > /usr/src/debug/cygwin-3.5.3-1/newlib/libc/stdlib/exit.c:65 > #9  0x00007ffe4a1469e7 in cygwin_exit (n=5392) at > /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/dcrt0.cc:1237 > #10 0x00007ffe4a14809a in dll_crt0_1 () at > /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/dcrt0.cc:1002 > #11 0x00007ffe4a145e08 in _cygtls::call2 (this=0x7ffffce00, func=0x7ffe4a146fb8 > , arg=0x0, buf=buf AT entry=0x7ffffcdf0) at > /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/cygtls.cc:41 > #12 0x00007ffe4a145e86 in _cygtls::call (func=, arg= out>) at /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/cygtls.cc:28 > #13 0x0000000000000000 in ?? () > (gdb) thread 2 > [Switching to thread 2 (Thread 0x8ec)] > #0  0x00007ffe579d5ee4 in ntdll!ZwReadFile () from > C:\src\dlls-syms\ntdll.dll\6502806A1cf000\ntdll.dll > (gdb) bt > #0  0x00007ffe579d5ee4 in ntdll!ZwReadFile () from > C:\src\dlls-syms\ntdll.dll\6502806A1cf000\ntdll.dll > #1  0x00007ffe5415e704 in ReadFile () from > C:\src\dlls-syms\KERNELBASE.dll\660F5EEC21e000\KERNELBASE.dll > #2  0x00007ffe4a1bada6 in wait_sig () at > /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/sigproc.cc:1324 > #3  0x00007ffe4a144d5f in cygthread::callfunc (this=this AT entry=0x7ffe4a335560 > , issimplestub=issimplestub AT entry=false) at > /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/cygthread.cc:48 > #4  0x00007ffe4a145270 in cygthread::stub (arg=arg AT entry=0x7ffe4a335560 > ) at /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/cygthread.cc:91 > #5  0x00007ffe4a145e08 in _cygtls::call2 (this=0xdbce00, func=0x7ffe4a1451ea > , arg=0x7ffe4a335560 , buf=buf AT entry=0xdbcd50) > at /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/cygtls.cc:41 > #6  0x00007ffe4a145e86 in _cygtls::call (func=, arg= out>) at /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/cygtls.cc:28 > #7  0x00007ffe555584d4 in KERNEL32!BaseThreadInitThunk () from > C:\src\dlls-syms\kernel32.dll\640993B0ad000\kernel32.dll > #8  0x00007ffe57981791 in ntdll!RtlUserThreadStart () from > C:\src\dlls-syms\ntdll.dll\6502806A1cf000\ntdll.dll > #9  0x0000000000000000 in ?? () > (gdb) thread 3 > [Switching to thread 3 (Thread 0x55c)] > #0  0x00007ffe579d5ea4 in ntdll!ZwWaitForSingleObject () from > C:\src\dlls-syms\ntdll.dll\6502806A1cf000\ntdll.dll > (gdb) bt > #0  0x00007ffe579d5ea4 in ntdll!ZwWaitForSingleObject () from > C:\src\dlls-syms\ntdll.dll\6502806A1cf000\ntdll.dll > #1  0x00007ffe54156d1f in WaitForSingleObjectEx () from > C:\src\dlls-syms\KERNELBASE.dll\660F5EEC21e000\KERNELBASE.dll > #2  0x00007ffe4a1452ab in cygthread::stub (arg=arg AT entry=0x7ffe4a3355b8 > ) at /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/cygthread.cc:112 > #3  0x00007ffe4a145e08 in _cygtls::call2 (this=0x2aece00, func=0x7ffe4a1451ea > , arg=0x7ffe4a3355b8 , > buf=buf AT entry=0x2aecd50) at > /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/cygtls.cc:41 > #4  0x00007ffe4a145e86 in _cygtls::call (func=, arg= out>) at /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/cygtls.cc:28 > #5  0x00007ffe555584d4 in KERNEL32!BaseThreadInitThunk () from > C:\src\dlls-syms\kernel32.dll\640993B0ad000\kernel32.dll > #6  0x00007ffe57981791 in ntdll!RtlUserThreadStart () from > C:\src\dlls-syms\ntdll.dll\6502806A1cf000\ntdll.dll > #7  0x0000000000000000 in ?? () > (gdb) thread 4 > [Switching to thread 4 (Thread 0x131c)] > #0  0x00007ffe579d95f4 in ntdll!ZwWaitForWorkViaWorkerFactory () from > C:\src\dlls-syms\ntdll.dll\6502806A1cf000\ntdll.dll > (gdb) bt > #0  0x00007ffe579d95f4 in ntdll!ZwWaitForWorkViaWorkerFactory () from > C:\src\dlls-syms\ntdll.dll\6502806A1cf000\ntdll.dll > #1  0x00007ffe5794eb5e in ntdll!RtlReleaseSRWLockExclusive () from > C:\src\dlls-syms\ntdll.dll\6502806A1cf000\ntdll.dll > #2  0x00007ffe4a145e08 in _cygtls::call2 (this=0x323ce00, func=0x7ffe5794e3f0 > , arg=0xc0b60, buf=buf AT entry=0x323cd50) > at /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/cygtls.cc:41 > #3  0x00007ffe4a145e86 in _cygtls::call (func=, arg= out>) at /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/cygtls.cc:28 > #4  0x00007ffe555584d4 in KERNEL32!BaseThreadInitThunk () from > C:\src\dlls-syms\kernel32.dll\640993B0ad000\kernel32.dll > #5  0x00007ffe57981791 in ntdll!RtlUserThreadStart () from > C:\src\dlls-syms\ntdll.dll\6502806A1cf000\ntdll.dll > #6  0x0000000000000000 in ?? () > (gdb) thread 5 > [Switching to thread 5 (Thread 0x9b8)] > #0  0x00007ffe579d95f4 in ntdll!ZwWaitForWorkViaWorkerFactory () from > C:\src\dlls-syms\ntdll.dll\6502806A1cf000\ntdll.dll > (gdb) bt > #0  0x00007ffe579d95f4 in ntdll!ZwWaitForWorkViaWorkerFactory () from > C:\src\dlls-syms\ntdll.dll\6502806A1cf000\ntdll.dll > #1  0x00007ffe5794eb5e in ntdll!RtlReleaseSRWLockExclusive () from > C:\src\dlls-syms\ntdll.dll\6502806A1cf000\ntdll.dll > #2  0x00007ffe4a145e08 in _cygtls::call2 (this=0x343ce00, func=0x7ffe5794e3f0 > , arg=0xc0b60, buf=buf AT entry=0x343cd50) > at /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/cygtls.cc:41 > #3  0x00007ffe4a145e86 in _cygtls::call (func=, arg= out>) at /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/cygtls.cc:28 > #4  0x00007ffe555584d4 in KERNEL32!BaseThreadInitThunk () from > C:\src\dlls-syms\kernel32.dll\640993B0ad000\kernel32.dll > #5  0x00007ffe57981791 in ntdll!RtlUserThreadStart () from > C:\src\dlls-syms\ntdll.dll\6502806A1cf000\ntdll.dll > #6  0x0000000000000000 in ?? () > (gdb) thread 6 > Unknown thread 6. > (gdb) thread 1 > [Switching to thread 1 (Thread 0x11cc)] > #0  0x00007ffe579d5ea4 in ntdll!ZwWaitForSingleObject () from > C:\src\dlls-syms\ntdll.dll\6502806A1cf000\ntdll.dll > (gdb) up > #1  0x00007ffe54156d1f in WaitForSingleObjectEx () from > C:\src\dlls-syms\KERNELBASE.dll\660F5EEC21e000\KERNELBASE.dll > (gdb) > #2  0x00007ffe4a2033a0 in fhandler_console::close (this=0x800009030) at > /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/fhandler/console.cc:1914 > 1914    in /usr/src/debug/cygwin-3.5.3-1/winsup/cygwin/fhandler/console.cc > (gdb) p thread_sync_event > $6 = (HANDLE) 0x1510 > (gdb) p name > $7 = "cygcons.thread_sync.0", '\000' , "r", '\000' 183 times>... > (gdb) p con.owner > No symbol "con" in current context. > (gdb) p master_thread_started > $8 = true > (gdb) p unit > $9 = 0 > (gdb) p shared_console_info > $10 = {0x1a0030000, 0x0 } > (gdb) Sometimes a Cygwin strace can be helpful, for example: $ strace -o drbdadm.strace drbdadm or equivalent however you execute the program. Attach the strace output as text if possible, otherwise if too big, xz, bz2, lz, zstd, gz. -- 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 -- 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