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]

Re: livelock on sigfe


On 2013-03-17 AM 1:44, Christopher Faylor wrote:
No, not really.  The caller in this case isn't interesting.  The number
of threads executing is interesting.

cgf

there is another debug session. I was trying to CTRL+C to mintty session in which make process was running. process hanged with livelock.

After inspecting cygtls content, i found that the two thread have empty cygtls stack. so i couldn't figure out caller of _sigfe barrier, there is no opportunity to pop stack of thread 1(which is main thread trapped in sigfe wait loop), wait_sig thread or CTRL+C handler should have caused bizzare.

GNU gdb (GDB) 7.5.50.20130309-cvs (cygwin-special)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-cygwin".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.

warning: the current range check setting does not match the language.

Whether backtraces should continue past the entry point of a program is off.
Attaching to process 4516
[New Thread 4516.0x1e88]
[New Thread 4516.0x1310]
[New Thread 4516.0xf74]
Reading symbols from /usr/bin/clang.exe...(no debugging symbols found)...done.
(gdb) i thr
  Id   Target Id         Frame
* 3    Thread 4516.0xf74 0x7c95a22a in ntdll!DbgBreakPoint ()
   from /cygdrive/c/WINDOWS/system32/ntdll.dll
  2    Thread 4516.0x1310 0x7c96845c in ntdll!KiFastSystemCallRet ()
   from /cygdrive/c/WINDOWS/system32/ntdll.dll
  1    Thread 4516.0x1e88 0x7c96845c in ntdll!KiFastSystemCallRet ()
   from /cygdrive/c/WINDOWS/system32/ntdll.dll
(gdb) i thr
  Id   Target Id         Frame
* 3    Thread 4516.0xf74 0x7c95a22a in ntdll!DbgBreakPoint ()
   from /cygdrive/c/WINDOWS/system32/ntdll.dll
  2    Thread 4516.0x1310 0x7c96845c in ntdll!KiFastSystemCallRet ()
   from /cygdrive/c/WINDOWS/system32/ntdll.dll
  1    Thread 4516.0x1e88 0x7c96845c in ntdll!KiFastSystemCallRet ()
   from /cygdrive/c/WINDOWS/system32/ntdll.dll
(gdb) thr 2
[Switching to thread 2 (Thread 4516.0x1310)]
#0  0x7c96845c in ntdll!KiFastSystemCallRet ()
   from /cygdrive/c/WINDOWS/system32/ntdll.dll
(gdb) bt
#0  0x7c96845c in ntdll!KiFastSystemCallRet ()
   from /cygdrive/c/WINDOWS/system32/ntdll.dll
#1  0x7c967409 in ntdll!ZwQueryInformationThread ()
   from /cygdrive/c/WINDOWS/system32/ntdll.dll
#2  0x7c8325db in KERNEL32!GetThreadPriority ()
   from /cygdrive/c/WINDOWS/system32/kernel32.dll
#3  0x610878b1 in yield ()
at /netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/miscfuncs.cc:243
#4  0x610d7354 in _cygtls::lock() () from /usr/bin/cygwin1.dll
#5  0x6103096e in sigpacket::setup_handler (this=0x355ac34,
handler=0x6102fe00 <signal_exit(int, siginfo_t*)>, siga=..., tls=0x22ce64) at /netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/exceptions.cc:796
#6  0x610318ff in sigpacket::process (this=0x355ac34)
at /netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/exceptions.cc:1245
#7  0x610dd74c in wait_sig ()
    at /netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/sigproc.cc:1389
#8  0x61003ea5 in cygthread::callfunc (this=0x6118b420 <threads>,
    issimplestub=<optimized out>)
    at /netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/cygthread.cc:51
#9  0x6100442f in cygthread::stub (arg=0x6118b420 <threads>)
    at /netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/cygthread.cc:93
#10 0x6100537d in _cygtls::call2 (this=<optimized out>,
    func=0x610043e0 <cygthread::stub(void*)>, arg=0x6118b420 <threads>,
buf=0x6100551b <_cygtls::call(unsigned long (*)(void*, void*), void*)+91>)
---Type <return> to continue, or q <return> to quit---
    at /netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/cygtls.cc:99
#11 0x0355ffb8 in ?? ()
#12 0x7c82484f in KERNEL32!GetModuleHandleA ()
   from /cygdrive/c/WINDOWS/system32/kernel32.dll
#13 0x00000000 in ?? ()
(gdb) thr 1
[Switching to thread 1 (Thread 4516.0x1e88)]
#0  0x7c96845c in ntdll!KiFastSystemCallRet ()
   from /cygdrive/c/WINDOWS/system32/ntdll.dll
(gdb) bt
#0  0x7c96845c in ntdll!KiFastSystemCallRet ()
   from /cygdrive/c/WINDOWS/system32/ntdll.dll
#1  0x7c9678c9 in ntdll!ZwSetInformationThread ()
   from /cygdrive/c/WINDOWS/system32/ntdll.dll
#2  0x7c8324f9 in SetThreadPriority ()
   from /cygdrive/c/WINDOWS/system32/kernel32.dll
#3  0x610878cb in yield ()
at /netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/miscfuncs.cc:244
#4  0x610d723c in _sigfe () from /usr/bin/cygwin1.dll
#5  0x61083420 in lfind () from /usr/bin/cygwin1.dll
#6  0x61006cf5 in dll_crt0_1 ()
    at /netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/dcrt0.cc:861
#7  0x6100537d in _cygtls::call2 (this=<optimized out>,
    func=0x61006c50 <dll_crt0_1(void*)>, arg=0x0,
buf=0x6100551b <_cygtls::call(unsigned long (*)(void*, void*), void*)+91>)
    at /netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/cygtls.cc:99
#8  0x0022ff78 in ?? ()
#9  0x01040752 in ?? ()
#10 0x00401015 in ?? ()
#11 0x7c82f243 in ProcessIdToSessionId ()
   from /cygdrive/c/WINDOWS/system32/kernel32.dll
#12 0x00000000 in ?? ()
(gdb)
(gdb) i thr
  Id   Target Id         Frame
  3    Thread 4516.0xf74 0x7c95a22a in ntdll!DbgBreakPoint ()
   from /cygdrive/c/WINDOWS/system32/ntdll.dll
  2    Thread 4516.0x1310 0x7c96845c in ntdll!KiFastSystemCallRet ()
   from /cygdrive/c/WINDOWS/system32/ntdll.dll
* 1    Thread 4516.0x1e88 0x7c96845c in ntdll!KiFastSystemCallRet ()
   from /cygdrive/c/WINDOWS/system32/ntdll.dll
(gdb) i w32 thread-information-block
Thread Information Block Thread 4516.0x1e88 at 0x7ffde000
(gdb) p ((_cygtls*)(((int)((TEB *)7ffde000)->Tib.StackBase)-319c))
$24 = (_cygtls *) 0x22ce64
(gdb) p $24->stackptr
$25 = (__stack_t *) 0x22da30
(gdb) p &$24->stack
$27 = (unsigned int (*)[256]) 0x22da30
(gdb) p $24->stack
$33 = {0x0 <repeats 256 times>}
(gdb) thr 2
[Switching to thread 2 (Thread 4516.0x1310)]
#0  0x7c96845c in ntdll!KiFastSystemCallRet ()
   from /cygdrive/c/WINDOWS/system32/ntdll.dll
(gdb) i w32 thread-information-block
Thread Information Block Thread 4516.0x1310 at 0x7ffdd000
(gdb) p ((_cygtls*)(((int)((TEB *)7ffdd000)->Tib.StackBase)-319c))
$28 = (_cygtls *) 0x355ce64
(gdb) p $28->stackptr
$29 = (__stack_t *) 0x355da30
(gdb) p &$28->stack
$30 = (unsigned int (*)[256]) 0x355da30
(gdb) p $28->stack
$34 = {0x0 <repeats 256 times>}

--
Regards.


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


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