Mail Archives: cygwin/2013/01/20/17:09:23
X-Recipient: | archive-cygwin AT delorie DOT com
|
X-SWARE-Spam-Status: | No, hits=-3.4 required=5.0 tests=AWL,BAYES_50,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RCVD_IN_HOSTKARMA_YE
|
X-Spam-Check-By: | sourceware.org
|
X-Forefront-Antispam-Report: | CIP:157.56.242.197;KIP:(null);UIP:(null);IPV:NLI;H:BL2PRD0512HT003.namprd05.prod.outlook.com;RD:none;EFVD:NLI
|
X-SpamScore: | 2
|
X-BigFish: | PS2(zzbb2dI98dI9371I1432Izz1ee6h1de0h1202h1e76h1d1ah1d2ahzzb412mz32i2a8h668h839h947hd25he5bhf0ah1288h12a5h12a9h12bdh137ah13b6h1441h1504h1537h153bh162dh1631h1758h1765h1155h)
|
Message-ID: | <50FC6AF2.7070501@coverity.com>
|
Date: | Sun, 20 Jan 2013 17:08:50 -0500
|
From: | Tom Honermann <thonermann AT coverity DOT com>
|
User-Agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0
|
MIME-Version: | 1.0
|
To: | <cygwin AT cygwin DOT com>
|
Subject: | Re: Intermittent failures with ctrl-c
|
References: | <20130116020420 DOT GA13284 AT ednor DOT casa DOT cgf DOT cx> <50F6D757 DOT 3000005 AT coverity DOT com> <50F6DB0F DOT 2020602 AT gmail DOT com> <50F6E695 DOT 20302 AT coverity DOT com> <CA+sc5mng_tHVwtzrPBexggCRzTWanNWEHBY0mfP43KhXZgrA=A AT mail DOT gmail DOT com> <50F6F69F DOT 3040000 AT coverity DOT com> <20130116185908 DOT GA17801 AT ednor DOT casa DOT cgf DOT cx> <50F70B27 DOT 8000904 AT coverity DOT com> <20130116222305 DOT GA24529 AT ednor DOT casa DOT cgf DOT cx> <50F9AC57 DOT 5020309 AT coverity DOT com> <20130119055833 DOT GA23653 AT ednor DOT casa DOT cgf DOT cx>
|
In-Reply-To: | <20130119055833.GA23653@ednor.casa.cgf.cx>
|
X-OriginatorOrg: | coverity.com
|
X-IsSubscribed: | yes
|
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm
|
List-Id: | <cygwin.cygwin.com>
|
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com>
|
List-Archive: | <http://sourceware.org/ml/cygwin/>
|
List-Post: | <mailto:cygwin AT cygwin DOT com>
|
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
|
Sender: | cygwin-owner AT cygwin DOT com
|
Mail-Followup-To: | cygwin AT cygwin DOT com
|
Delivered-To: | mailing list cygwin AT cygwin DOT com
|
On 01/19/2013 12:58 AM, Christopher Faylor wrote:
> On Fri, Jan 18, 2013 at 03:11:03PM -0500, Tom Honermann wrote:
>> On 01/16/2013 05:23 PM, Christopher Faylor wrote:
>>> On Wed, Jan 16, 2013 at 03:18:47PM -0500, Tom Honermann wrote:
>>> I managed to duplicate a hang by changing your .bat file to use "sleep
>>> 2" rather than false. I'm investigating now.
>>
>> I noticed that you checked in some additional changes on the 16th that
>> look related to this, so I tested again with today's snapshot (20130118).
>
> I thought I sent a "try a snapshot" but I must have been hallucinating
> again.
>
>> I was still able to produce hangs using the same test case. The
>> symptoms are slightly different than I had seen previously. bash hung 2
>> out of the ~60 times I interrupted the test. No error messages were
>> displayed this time. Upon pressing ctrl-c, bash hung for 60 seconds. I
>> was then greeted with the "Terminate batch job" prompt and responding
>> 'Y' terminated the process tree as expected. Pressing ctrl-c while bash
>> was hung for that 60 seconds appeared to have no affect.
>
> The hang should be fixed in the upcoming snapshot.
Snapshot 20130119 appears to have addressed most of the cases I've
witnessed.
However, I was still able to reproduce another case. As before, one of
the processes is being left running when the rest are terminated. The
"abandoned" process appears to be in a live-lock state with two threads
(threads 1 and 2) running at 100%. Of particular interest is that each
time I press ctrl-c in the cmd.exe console this process was spawned
from, a new thread appears in the process even though this program is no
longer a foreground process and all other Cygwin processes have
terminated. The new threads never exit.
Same test case as before. However, since reproducing this may be
challenging, I dug in to try and get some details that might help with
reproducing it.
It looks like thread 1 was interrupted while in a call to free(). Both
thread 1 and 2 appear to be stuck looping on calls to yield(). Thread 3
appears to be stuck in a call to WriteFile. I suspect thread 3 was
created by the initial ctrl-c event, but I'm not able to get an accurate
stack trace for this thread to prove that. Threads 4 and up correspond
to new threads created for new ctrl-c events.
The following stack traces correspond to the above mentioned snapshot
with cygwin1.dbg (from cygwin1-20130119.dbg.bz2) in place.
(gdb) thread 1
[Switching to thread 1 (Thread 5344.0x1878)]
#0 0x7767fbfa in ntdll!RtlUpdateClonedSRWLock () from
/cygdrive/c/Windows/SysWOW64/ntdll.dll
(gdb) bt
#0 0x7767fbfa in ntdll!RtlUpdateClonedSRWLock () from
/cygdrive/c/Windows/SysWOW64/ntdll.dll
#1 0x7767fbfa in ntdll!RtlUpdateClonedSRWLock () from
/cygdrive/c/Windows/SysWOW64/ntdll.dll
#2 0x76792ed6 in KERNELBASE!GetThreadUILanguage ()
from /cygdrive/c/Windows/syswow64/KERNELBASE.dll
#3 0x61087581 in yield ()
at
/netrel/src/cygwin-snapshot-20130119-1/winsup/cygwin/miscfuncs.cc:243
#4 0x610d6d9c in _sigfe () from
/home/thonermann/cygwin/snapshot/usr/bin/cygwin1.dll
#5 0x61083180 in free ()
at
/netrel/src/cygwin-snapshot-20130119-1/winsup/cygwin/malloc_wrapper.cc:43
#6 0x00000010 in ?? ()
#7 0x00000000 in ?? ()
(gdb) thread 2
[Switching to thread 2 (Thread 5344.0x1ac8)]
#0 0x7767f99e in ntdll!RtlUpdateClonedSRWLock () from
/cygdrive/c/Windows/SysWOW64/ntdll.dll
(gdb) bt
#0 0x7767f99e in ntdll!RtlUpdateClonedSRWLock () from
/cygdrive/c/Windows/SysWOW64/ntdll.dll
#1 0x7767f99e in ntdll!RtlUpdateClonedSRWLock () from
/cygdrive/c/Windows/SysWOW64/ntdll.dll
#2 0x76793a5e in SetThreadPriority () from
/cygdrive/c/Windows/syswow64/KERNELBASE.dll
#3 0x6108759b in yield ()
at
/netrel/src/cygwin-snapshot-20130119-1/winsup/cygwin/miscfuncs.cc:244
#4 0x610d6eb4 in _cygtls::lock() () from
/home/thonermann/cygwin/snapshot/usr/bin/cygwin1.dll
#5 0x610302ee in sigpacket::setup_handler (this=0x95ac04,
handler=0x6102fdc0 <signal_exit(int, siginfo_t*)>, siga=...,
tls=0x28ce64)
at
/netrel/src/cygwin-snapshot-20130119-1/winsup/cygwin/exceptions.cc:796
#6 0x610319d8 in sigpacket::process (this=0x95ac04)
at
/netrel/src/cygwin-snapshot-20130119-1/winsup/cygwin/exceptions.cc:1266
#7 0x610dd2ac in wait_sig ()
at /netrel/src/cygwin-snapshot-20130119-1/winsup/cygwin/sigproc.cc:1389
#8 0x61003ea5 in cygthread::callfunc (this=0x6118b400,
issimplestub=<optimized out>)
at /netrel/src/cygwin-snapshot-20130119-1/winsup/cygwin/cygthread.cc:51
#9 0x6100442f in cygthread::stub (arg=0x6118b400)
at /netrel/src/cygwin-snapshot-20130119-1/winsup/cygwin/cygthread.cc:93
#10 0x6100538d in _cygtls::call2 (this=<optimized out>,
func=0x610043e0 <cygthread::stub(void*)>, arg=0x6118b400,
buf=0x6100551b <_cygtls::call(unsigned long (*)(void*, void*),
void*)+91>)
at /netrel/src/cygwin-snapshot-20130119-1/winsup/cygwin/cygtls.cc:99
#11 0x0095ff88 in ?? ()
#12 0x76a8339a in KERNEL32!BaseCleanupAppcompatCacheSupport ()
from /cygdrive/c/Windows/syswow64/kernel32.dll
#13 0x6118b400 in cygthread::exiting ()
from /home/thonermann/cygwin/snapshot/usr/bin/cygwin1.dll
#14 0x0095ffd4 in ?? ()
#15 0x77699ef2 in ntdll!RtlpNtSetValueKey () from
/cygdrive/c/Windows/SysWOW64/ntdll.dll
#16 0x6118b400 in cygthread::exiting ()
from /home/thonermann/cygwin/snapshot/usr/bin/cygwin1.dll
#17 0x4449ca2d in ?? ()
#18 0x00000000 in ?? ()
(gdb) thread 3
[Switching to thread 3 (Thread 5344.0x1c2c)]
#0 0x7767f91d in ntdll!RtlUpdateClonedSRWLock () from
/cygdrive/c/Windows/SysWOW64/ntdll.dll
(gdb) bt
#0 0x7767f91d in ntdll!RtlUpdateClonedSRWLock () from
/cygdrive/c/Windows/SysWOW64/ntdll.dll
#1 0x7767f91d in ntdll!RtlUpdateClonedSRWLock () from
/cygdrive/c/Windows/SysWOW64/ntdll.dll
#2 0x7678d4b5 in WriteFile () from
/cygdrive/c/Windows/syswow64/KERNELBASE.dll
#3 0x0000009c in ?? ()
#4 0x00000000 in ?? ()
(gdb) thread 4
[Switching to thread 4 (Thread 5344.0x718)]
#0 0x7767f8b1 in ntdll!RtlUpdateClonedSRWLock () from
/cygdrive/c/Windows/SysWOW64/ntdll.dll
(gdb) bt
#0 0x7767f8b1 in ntdll!RtlUpdateClonedSRWLock () from
/cygdrive/c/Windows/SysWOW64/ntdll.dll
#1 0x7767f8b1 in ntdll!RtlUpdateClonedSRWLock () from
/cygdrive/c/Windows/SysWOW64/ntdll.dll
#2 0x76790a91 in WaitForSingleObjectEx () from
/cygdrive/c/Windows/syswow64/KERNELBASE.dll
#3 0x00000034 in ?? ()
#4 0x00000000 in ?? ()
Tom.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -