This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cygtls crash causing twisted 13.2 app to livelock?

Hi folks,
I've had a buildbot worker running on cygwin for the last few
years.  The python program occasionally appears to busy-hang
after forking a git, regardless of version of windows or
up-to-dateness or 32/64 bitness of cygwin.
More details at
Today it happened at the same time on both win7 and win10,
so I'm starting to get motivated to understand it.
Chances are it's just a bug in twisted 13.2 (which is
pretty old), but I did see something interesting:

strace of the livelocked python shows the following output repeatedly:

-- Process 8232, exception c0000005 at 0000000180042C51
   55 2120509 [flasio] python 9276 exception::handle: In
cygwin_except_handler exception 0xC0000005 at 0x180042C51 sp 0x275CB60
   32 2120541 [flasio] python 9276 exception::handle: In
cygwin_except_handler signal 11 at 0x180042C51
   72 2120613 [flasio] python 9276 _cygtls::inside_kernel: pc
0x180042C51, h 0x180040000, inside_kernel 0
   40 2120653 [flasio] python 9276 seterrno_from_nt_status:
status 0xC0000034 -> windows error 2
   30 2120683 [flasio] python 9276 geterrno_from_win_error: windows
error 2 == errno 2
   30 2120713 [flasio] python 9276 sig_send: sendsig 0xC4, pid 9276,
signal 11, its_me 1
   28 2120741 [flasio] python 9276 sig_send: wakeup 0x42C
   32 2120773 [sig] python 9276 sigpacket::process: signal 11 processing
   19 2120792 [sig] python 9276 sigpacket::process: signal 11 blocked
   18 2120810 [sig] python 9276 sigpacket::process: returning -1
   22 2120832 [sig] python 9276 wait_sig: signalling pack.wakeup 0x42C
   24 2120856 [flasio] python 9276 sig_send: Waiting for pack.wakeup 0x42C
   30 2120886 [flasio] python 9276 sig_send: returning 0x0 from
sending signal 11

Attaching with gdb and doing 'info threads' and 'bt N' on each thread
until I found a related-looking thread showed:

#0  0x00007ffbd845386a in ntdll!ZwWaitForSingleObject ()
   from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
#1  0x00007ffbd51e415f in WaitForSingleObjectEx ()
   from /cygdrive/c/Windows/system32/KERNELBASE.dll
#2  0x000000018011f027 in sig_send(_pinfo*, siginfo_t&, _cygtls*) ()
from /usr/bin/cygwin1.dll
#3  0x000000018005c7c1 in exception::handle(_EXCEPTION_RECORD*, void*,
_CONTEXT*, _DISPATCHER_CONTEXT*) () from /usr/bin/cygwin1.dll
#4  0x00007ffbd845666d in ntdll!.chkstk () from
#5  0x00007ffbd83d3c00 in ntdll!RtlWalkFrameChain () from
#6  0x00007ffbd845577a in ntdll!KiUserExceptionDispatcher ()
   from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
#7  0x0000000180042c51 in _cfree () from /usr/bin/cygwin1.dll
#8  0x00000001801deab3 in fhandler_pipe::~fhandler_pipe() () from
#9  0x00000001800621f5 in flush_async_io(void*) () from /usr/bin/cygwin1.dll
#10 0x0000000180044753 in cygthread::callfunc(bool) () from /usr/bin/cygwin1.dll
#11 0x0000000180044cea in cygthread::stub(void*) () from /usr/bin/cygwin1.dll
#12 0x0000000180045733 in _cygtls::call2(unsigned int (*)(void*,
void*), void*, void*) ()
   from /usr/bin/cygwin1.dll
#13 0x00000001800457e4 in _cygtls::call(unsigned int (*)(void*,
void*), void*) ()
   from /usr/bin/cygwin1.dll
#14 0x00007ffbd5e52d92 in KERNEL32!BaseThreadInitThunk ()
   from /cygdrive/c/Windows/system32/KERNEL32.DLL
#15 0x00007ffbd83c9f64 in ntdll!RtlUserThreadStart ()
   from /cygdrive/c/Windows/SYSTEM32/ntdll.dll

An exception in chkstk in a thread that looks like it's cygwin's baby
seemed interesting enough to report.

I'll attach the output of cygcheck and gdb.

Attachment: btall.txt
Description: Text document

Attachment: cygcheck.out
Description: Binary data

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]