public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* deadlock with busy waiting on sigfe
@ 2013-01-15  2:00 jojelino
  2013-01-16  1:47 ` Christopher Faylor
  0 siblings, 1 reply; 17+ messages in thread
From: jojelino @ 2013-01-15  2:00 UTC (permalink / raw)
  To: cygwin

Caused by executing following command and ctrl+c to interrupt in bash shell.
sh -c "cd /tmp/openjpeg/src/bin/jp2 && /usr/bin/i686-pc-mingw32-gcc.exe 
  -DOPJ_EXPORTS -ffast-math -O3 -DNDEBUG 
@CMakeFiles/opj_compress.dir/includes_C.rsp   -o 
CMakeFiles/opj_compress.dir/convert.c.obj   -c 
/tmp/openjpeg/src/bin/jp2/convert.c"

SleepEx is being spammed across threads. some thread got tls lock but 
didn't released it.
how can i fix the problem?
(gdb) thread apply all bt
Thread 3 (Thread 8576.0x1b30):
#0  0x571ec771 in filename_completion_function ()
    from /usr/bin/cygreadline7.dll
#1  0x7c958f81 in ntdll!LdrShutdownThread ()
    from /cygdrive/c/WINDOWS/system32/ntdll.dll
#2  0x571ec3c0 in filename_completion_function ()
    from /usr/bin/cygreadline7.dll
#3  0x7c97fc9b in ntdll!RtlExitUserThread ()
    from /cygdrive/c/WINDOWS/system32/ntdll.dll
#4  0x7c97fc73 in ntdll!DbgUiRemoteBreakin ()
    from /cygdrive/c/WINDOWS/system32/ntdll.dll
#5  0x00000000 in ?? ()

Thread 2 (Thread 8576.0xe38):
#0  0x7c801e8c in SleepEx () from /cygdrive/c/WINDOWS/system32/kernel32.dll
#1  0x610873f2 in yield ()
     at 
/netrel/src/cygwin-snapshot-20130107-1/winsup/cygwin/miscfuncs.cc:251
#2  0x610d6da4 in _cygtls::lock() () from /usr/bin/cygwin1.dll
#3  0x6103035e in sigpacket::setup_handler (this=0xc3ac34,
     handler=0x6102fdb0 <signal_exit(int, siginfo_t*)>, siga=..., 
tls=0x22ce64)
     at 
/netrel/src/cygwin-snapshot-20130107-1/winsup/cygwin/exceptions.cc:797
#4  0x610319bb in sigpacket::process (this=0xc3ac34)
     at 
/netrel/src/cygwin-snapshot-20130107-1/winsup/cygwin/exceptions.cc:1278
---Type <return> to continue, or q <return> to quit---
#5  0x610dd38c in wait_sig ()
     at /netrel/src/cygwin-snapshot-20130107-1/winsup/cygwin/sigproc.cc:1415
#6  0x61003ea5 in cygthread::callfunc (this=0x6118b400 <threads>,
     issimplestub=<optimized out>)
     at /netrel/src/cygwin-snapshot-20130107-1/winsup/cygwin/cygthread.cc:51
#7  0x6100442f in cygthread::stub (arg=0x6118b400 <threads>)
     at /netrel/src/cygwin-snapshot-20130107-1/winsup/cygwin/cygthread.cc:93
#8  0x6100538d in _cygtls::call2 (this=<optimized out>,
     func=0x610043e0 <_ZN9cygthread4stubEPv@4>, arg=0x6118b400 <threads>,
     buf=0x6100551b <_cygtls::call(unsigned long (*)(void*, void*), 
void*)+91>)
     at /netrel/src/cygwin-snapshot-20130107-1/winsup/cygwin/cygtls.cc:99
#9  0x00c3ffb8 in ?? ()
#10 0x7c82484f in KERNEL32!GetModuleHandleA ()
    from /cygdrive/c/WINDOWS/system32/kernel32.dll
#11 0x00000000 in ?? ()

Thread 1 (Thread 8576.0x27b8):
#0  0x7c801e8d in SleepEx () from /cygdrive/c/WINDOWS/system32/kernel32.dll
#1  0x610873f2 in yield ()
     at 
/netrel/src/cygwin-snapshot-20130107-1/winsup/cygwin/miscfuncs.cc:251
#2  0x610d6c8c in _sigfe () from /usr/bin/cygwin1.dll
#3  0x61103990 in pthread_kill ()
     at /netrel/src/cygwin-snapshot-20130107-1/winsup/cygwin/thread.cc:3024
#4  0x610075fa in _cygwin_exit_return ()
---Type <return> to continue, or q <return> to quit---
     at /netrel/src/cygwin-snapshot-20130107-1/winsup/cygwin/dcrt0.cc:978
#5  0x6100538d in _cygtls::call2 (this=<optimized out>,
     func=0x61006bf0 <dll_crt0_1(void*)>, arg=0x0,
     buf=0x6100551b <_cygtls::call(unsigned long (*)(void*, void*), 
void*)+91>)
     at /netrel/src/cygwin-snapshot-20130107-1/winsup/cygwin/cygtls.cc:99
#6  0x0022ff78 in ?? ()
#7  0x00465672 in ?? ()
#8  0x00401033 in ?? ()
#9  0x7c82f243 in ProcessIdToSessionId ()
    from /cygdrive/c/WINDOWS/system32/kernel32.dll
#10 0x00000000 in ?? ()
-- 
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: deadlock with busy waiting on sigfe
  2013-01-15  2:00 deadlock with busy waiting on sigfe jojelino
@ 2013-01-16  1:47 ` Christopher Faylor
  2013-01-16  2:14   ` Christopher Faylor
  0 siblings, 1 reply; 17+ messages in thread
From: Christopher Faylor @ 2013-01-16  1:47 UTC (permalink / raw)
  To: cygwin

On Tue, Jan 15, 2013 at 11:00:16AM +0900, jojelino wrote:
>Caused by executing following command and ctrl+c to interrupt in bash shell.
>sh -c "cd /tmp/openjpeg/src/bin/jp2 && /usr/bin/i686-pc-mingw32-gcc.exe 
>  -DOPJ_EXPORTS -ffast-math -O3 -DNDEBUG 
>@CMakeFiles/opj_compress.dir/includes_C.rsp   -o 
>CMakeFiles/opj_compress.dir/convert.c.obj   -c 
>/tmp/openjpeg/src/bin/jp2/convert.c"
>
>SleepEx is being spammed across threads. some thread got tls lock but 
>didn't released it.
>how can i fix the problem?

Sorry but there is no useful information here.

How about providing some basic details like:

1) What version of Cygwin you're running.

2) A reproducer that doesn't involve downloading a large package and
(apparently) running configure.

?

You can also forgo the gdb backtraces.  It is almost never useful to
include those in a bug report.

cgf

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: deadlock with busy waiting on sigfe
  2013-01-16  1:47 ` Christopher Faylor
@ 2013-01-16  2:14   ` Christopher Faylor
  2013-01-20  5:23     ` jojelino
  0 siblings, 1 reply; 17+ messages in thread
From: Christopher Faylor @ 2013-01-16  2:14 UTC (permalink / raw)
  To: cygwin

On Tue, Jan 15, 2013 at 08:46:46PM -0500, Christopher Faylor wrote:
>On Tue, Jan 15, 2013 at 11:00:16AM +0900, jojelino wrote:
>>Caused by executing following command and ctrl+c to interrupt in bash shell.
>>sh -c "cd /tmp/openjpeg/src/bin/jp2 && /usr/bin/i686-pc-mingw32-gcc.exe 
>>  -DOPJ_EXPORTS -ffast-math -O3 -DNDEBUG 
>>@CMakeFiles/opj_compress.dir/includes_C.rsp   -o 
>>CMakeFiles/opj_compress.dir/convert.c.obj   -c 
>>/tmp/openjpeg/src/bin/jp2/convert.c"
>>
>>SleepEx is being spammed across threads. some thread got tls lock but 
>>didn't released it.
>>how can i fix the problem?
>
>Sorry but there is no useful information here.
>
>How about providing some basic details like:
>
>1) What version of Cygwin you're running.
>
>2) A reproducer that doesn't involve downloading a large package and
>(apparently) running configure.
>
>?
>
>You can also forgo the gdb backtraces.  It is almost never useful to
>include those in a bug report.

Sorry, the backtraces were actually useful because they show that you
are apparently running cygwin-snapshot-20130107.  Apparently you haven't
been watching the discussion about this issue in the Cygwin list.  The
problem of a Cygwin process hanging after a single CTRL-C should be
fixed in later snapshots although there is another reported CTRL-C
issue.

cgf

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: deadlock with busy waiting on sigfe
  2013-01-16  2:14   ` Christopher Faylor
@ 2013-01-20  5:23     ` jojelino
  2013-01-20  6:55       ` Christopher Faylor
  0 siblings, 1 reply; 17+ messages in thread
From: jojelino @ 2013-01-20  5:23 UTC (permalink / raw)
  To: cygwin

On 2013-01-16 AM 11:14, Christopher Faylor wrote:
> On Tue, Jan 15, 2013 at 08:46:46PM -0500, Christopher Faylor wrote:
> Sorry, the backtraces were actually useful because they show that you
> are apparently running cygwin-snapshot-20130107.  Apparently you haven't
> been watching the discussion about this issue in the Cygwin list.  The
> problem of a Cygwin process hanging after a single CTRL-C should be
> fixed in later snapshots although there is another reported CTRL-C
> issue.
>
> cgf
>
now i found hang where the argument of program was sed 
s/^\(.*\)-\([^-]*-[^-]*\)$/\2/ with newer cygwin snapshot.


(gdb) thread apply all bt

Thread 4 (Thread 12972.0x382c):
#0  0x7c95a22a in ntdll!DbgBreakPoint ()
    from /cygdrive/c/WINDOWS/system32/ntdll.dll
#1  0x7c97fc68 in ntdll!DbgUiRemoteBreakin ()
    from /cygdrive/c/WINDOWS/system32/ntdll.dll
#2  0x00000005 in ?? ()
#3  0x00000001 in ?? ()
#4  0x003effd0 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 2 (Thread 12972.0x32c8):
#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  0x6108760b in yield ()
     at 
/netrel/src/cygwin-snapshot-20130118-1/winsup/cygwin/miscfuncs.cc:244
#4  0x610d6ee4 in _cygtls::lock() () from /usr/bin/cygwin1.dll
#5  0x6103035e in sigpacket::setup_handler (this=0x6cac34,
     handler=0x6102fe30 <signal_exit(int, siginfo_t*)>, siga=..., 
tls=0x22ce64)
---Type <return> to continue, or q <return> to quit---
     at 
/netrel/src/cygwin-snapshot-20130118-1/winsup/cygwin/exceptions.cc:796
#6  0x61031a48 in sigpacket::process (this=0x6cac34)
     at 
/netrel/src/cygwin-snapshot-20130118-1/winsup/cygwin/exceptions.cc:1274
#7  0x610dd2dc in wait_sig ()
     at /netrel/src/cygwin-snapshot-20130118-1/winsup/cygwin/sigproc.cc:1389
#8  0x61003ea5 in cygthread::callfunc (this=0x6118b400 <threads>,
     issimplestub=<optimized out>)
     at /netrel/src/cygwin-snapshot-20130118-1/winsup/cygwin/cygthread.cc:51
#9  0x6100442f in cygthread::stub (arg=0x6118b400 <threads>)
     at /netrel/src/cygwin-snapshot-20130118-1/winsup/cygwin/cygthread.cc:93
#10 0x6100538d in _cygtls::call2 (this=<optimized out>,
     func=0x610043e0 <_ZN9cygthread4stubEPv@4>, arg=0x6118b400 <threads>,
     buf=0x6100551b <_cygtls::call(unsigned long (*)(void*, void*), 
void*)+91>)
     at /netrel/src/cygwin-snapshot-20130118-1/winsup/cygwin/cygtls.cc:99
#11 0x006cffb8 in ?? ()
#12 0x7c82484f in KERNEL32!GetModuleHandleA ()
    from /cygdrive/c/WINDOWS/system32/kernel32.dll
#13 0x00000000 in ?? ()

Thread 1 (Thread 12972.0x2f38):
#0  0x7c96845c in ntdll!KiFastSystemCallRet ()
    from /cygdrive/c/WINDOWS/system32/ntdll.dll
#1  0x7c9678c9 in ntdll!ZwSetInformationThread ()
---Type <return> to continue, or q <return> to quit---
    from /cygdrive/c/WINDOWS/system32/ntdll.dll
#2  0x7c8324f9 in SetThreadPriority ()
    from /cygdrive/c/WINDOWS/system32/kernel32.dll
#3  0x6108764d in yield ()
     at 
/netrel/src/cygwin-snapshot-20130118-1/winsup/cygwin/miscfuncs.cc:253
#4  0x610d6dcc in _sigfe () from /usr/bin/cygwin1.dll
#5  0x61083a40 in mallinfo ()
     at 
/netrel/src/cygwin-snapshot-20130118-1/winsup/cygwin/malloc_wrapper.cc:2
6
#6  0x6123e9a0 in saved_categories () from /usr/bin/cygwin1.dll
#7  0x00000000 in ?? ()
(gdb)

(gdb) x 7ffdd000+4
0x7ffdd004:     0x00230000
(gdb) x ((_cygtls*)(0x00230000-319c))->stackptr
0x22da30:       0x61083ac9
(gdb) i line *0x61083ac9
Line 290 of 
"/netrel/src/cygwin-snapshot-20130118-1/winsup/cygwin/malloc_wrapper
.cc" starts at address 0x61083ac9 <malloc_init()+57>
    and ends at 0x61083ad3 <malloc_init()+67>.

It seems that malloc_init called sigfe-annotated malloc or free during 
wait_sig thread tried to process exit signal.


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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: deadlock with busy waiting on sigfe
  2013-01-20  5:23     ` jojelino
@ 2013-01-20  6:55       ` Christopher Faylor
  2013-03-11  8:54         ` jojelino
  0 siblings, 1 reply; 17+ messages in thread
From: Christopher Faylor @ 2013-01-20  6:55 UTC (permalink / raw)
  To: cygwin

On Sun, Jan 20, 2013 at 02:23:23PM +0900, jojelino wrote:
>On 2013-01-16 AM 11:14, Christopher Faylor wrote:
>> On Tue, Jan 15, 2013 at 08:46:46PM -0500, Christopher Faylor wrote:
>> Sorry, the backtraces were actually useful because they show that you
>> are apparently running cygwin-snapshot-20130107.  Apparently you haven't
>> been watching the discussion about this issue in the Cygwin list.  The
>> problem of a Cygwin process hanging after a single CTRL-C should be
>> fixed in later snapshots although there is another reported CTRL-C
>> issue.
>
>now i found hang where the argument of program was sed 
>s/^\(.*\)-\([^-]*-[^-]*\)$/\2/ with newer cygwin snapshot.

Once again: don't care about your backtraces.  Submit a proper bug report.

cgf

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: deadlock with busy waiting on sigfe
  2013-01-20  6:55       ` Christopher Faylor
@ 2013-03-11  8:54         ` jojelino
  2013-03-11 14:36           ` Christopher Faylor
  0 siblings, 1 reply; 17+ messages in thread
From: jojelino @ 2013-03-11  8:54 UTC (permalink / raw)
  To: cygwin

On 2013-01-20 PM 3:54, Christopher Faylor wrote:
> On Sun, Jan 20, 2013 at 02:23:23PM +0900, jojelino wrote:
> Once again: don't care about your backtraces.  Submit a proper bug report.
>
> cgf
>
And found another livelock with CYGWIN_NT-5.2 F8G6S6D42HGDY4 
1.7.18s(0.263/5/3) 20130309 21:57:01 i686 Cygwin provided in 
http://cygwin.org/snapshots/cygwin1-20130309.dll.bz2
I can't submit proper bug report. it just hangs during CTRL+C for 
arbitrary cygwin executable and there is nothing i can do except dumping 
backtrace. If you don't care about it, it's ok to ignore this. please 
pass by.
Thread 2 (Thread 7596.0x104):
#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  0x6108790d in yield ()
     at 
/netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/miscfuncs.cc:253
#4  0x610d7354 in _cygtls::lock() () from /usr/bin/cygwin1.dll
#5  0x6103096e in sigpacket::setup_handler (this=0x6aac34,
     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=0x6aac34)
     at 
/netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/exceptions.cc:1245
---Type <return> to continue, or q <return> to quit---
#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>)
     at /netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/cygtls.cc:99
#11 0x006affb8 in ?? ()
#12 0x7c82484f in KERNEL32!GetModuleHandleA ()
    from /cygdrive/c/WINDOWS/system32/kernel32.dll
#13 0x00000000 in ?? ()

Thread 1 (Thread 7596.0x190):
#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 ()
---Type <return> to continue, or q <return> to quit---
     at 
/netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/miscfuncs.cc:244
#4  0x610d7354 in _cygtls::lock() () from /usr/bin/cygwin1.dll
#5  0x61031297 in _cygtls::call_signal_handler (
     this=0x610d7354 <_cygtls::lock()+23>)
     at 
/netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/exceptions.cc:1265
#6  0x61007689 in _cygwin_exit_return ()
     at /netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/dcrt0.cc:1012
#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  0x004011d2 in ?? ()
#10 0x00401015 in ?? ()
#11 0x7c82f243 in ProcessIdToSessionId ()
    from /cygdrive/c/WINDOWS/system32/kernel32.dll

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: deadlock with busy waiting on sigfe
  2013-03-11  8:54         ` jojelino
@ 2013-03-11 14:36           ` Christopher Faylor
  2013-03-11 19:36             ` jojelino
  0 siblings, 1 reply; 17+ messages in thread
From: Christopher Faylor @ 2013-03-11 14:36 UTC (permalink / raw)
  To: cygwin

On Mon, Mar 11, 2013 at 05:53:50PM +0900, jojelino wrote:
>On 2013-01-20 PM 3:54, Christopher Faylor wrote:
>> On Sun, Jan 20, 2013 at 02:23:23PM +0900, jojelino wrote:
>> Once again: don't care about your backtraces.  Submit a proper bug report.
>>
>> cgf
>>
>And found another livelock with CYGWIN_NT-5.2 F8G6S6D42HGDY4 
>1.7.18s(0.263/5/3) 20130309 21:57:01 i686 Cygwin provided in 
>http://cygwin.org/snapshots/cygwin1-20130309.dll.bz2
>I can't submit proper bug report. it just hangs during CTRL+C for 
>arbitrary cygwin executable and there is nothing i can do except dumping 
>backtrace. If you don't care about it, it's ok to ignore this. please 
>pass by.

A "proper bug report" would at least include what you were actually doing
to trigger this problem.

Are you sure that there are only two threads executing here?  It seems like
this is a symptom of another thread holding the lock.

cgf

>Thread 2 (Thread 7596.0x104):
>#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  0x6108790d in yield ()
>     at 
>/netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/miscfuncs.cc:253
>#4  0x610d7354 in _cygtls::lock() () from /usr/bin/cygwin1.dll
>#5  0x6103096e in sigpacket::setup_handler (this=0x6aac34,
>     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=0x6aac34)
>     at 
>/netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/exceptions.cc:1245
>---Type <return> to continue, or q <return> to quit---
>#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>)
>     at /netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/cygtls.cc:99
>#11 0x006affb8 in ?? ()
>#12 0x7c82484f in KERNEL32!GetModuleHandleA ()
>    from /cygdrive/c/WINDOWS/system32/kernel32.dll
>#13 0x00000000 in ?? ()
>
>Thread 1 (Thread 7596.0x190):
>#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 ()
>---Type <return> to continue, or q <return> to quit---
>     at 
>/netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/miscfuncs.cc:244
>#4  0x610d7354 in _cygtls::lock() () from /usr/bin/cygwin1.dll
>#5  0x61031297 in _cygtls::call_signal_handler (
>     this=0x610d7354 <_cygtls::lock()+23>)
>     at 
>/netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/exceptions.cc:1265
>#6  0x61007689 in _cygwin_exit_return ()
>     at /netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/dcrt0.cc:1012
>#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  0x004011d2 in ?? ()
>#10 0x00401015 in ?? ()
>#11 0x7c82f243 in ProcessIdToSessionId ()
>    from /cygdrive/c/WINDOWS/system32/kernel32.dll
>
>-- 
>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
>
>

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: deadlock with busy waiting on sigfe
  2013-03-11 14:36           ` Christopher Faylor
@ 2013-03-11 19:36             ` jojelino
  2013-03-11 19:50               ` jojelino
  2013-03-11 20:46               ` Christopher Faylor
  0 siblings, 2 replies; 17+ messages in thread
From: jojelino @ 2013-03-11 19:36 UTC (permalink / raw)
  To: cygwin

On 2013-03-11 PM 11:36, Christopher Faylor wrote:
> A "proper bug report" would at least include what you were actually doing
> to trigger this problem.
>
I was trying to CTRL+C cygwin python process that is executing some 
operation and fell asleep for 60 seconds repeatedly. I'm pretty sure 
that the process was sleeping as i tried interrupt it.

> Are you sure that there are only two threads executing here?  It seems like
> this is a symptom of another thread holding the lock.
>
It's unlikely the case because there was two thread running when 
livelock observed.
> cgf
>
>> Thread 2 (Thread 7596.0x104):
>> #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  0x6108790d in yield ()
>>      at
>> /netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/miscfuncs.cc:253
>> #4  0x610d7354 in _cygtls::lock() () from /usr/bin/cygwin1.dll
>> #5  0x6103096e in sigpacket::setup_handler (this=0x6aac34,
>>      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=0x6aac34)
>>      at
>> /netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/exceptions.cc:1245
>> ---Type <return> to continue, or q <return> to quit---
>> #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>)
>>      at /netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/cygtls.cc:99
>> #11 0x006affb8 in ?? ()
>> #12 0x7c82484f in KERNEL32!GetModuleHandleA ()
>>     from /cygdrive/c/WINDOWS/system32/kernel32.dll
>> #13 0x00000000 in ?? ()
>>
>> Thread 1 (Thread 7596.0x190):
>> #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 ()
>> ---Type <return> to continue, or q <return> to quit---
>>      at
>> /netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/miscfuncs.cc:244
>> #4  0x610d7354 in _cygtls::lock() () from /usr/bin/cygwin1.dll
>> #5  0x61031297 in _cygtls::call_signal_handler (
>>      this=0x610d7354 <_cygtls::lock()+23>)
>>      at
>> /netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/exceptions.cc:1265
>> #6  0x61007689 in _cygwin_exit_return ()
>>      at /netrel/src/cygwin-snapshot-20130309-1/winsup/cygwin/dcrt0.cc:1012
>> #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  0x004011d2 in ?? ()
>> #10 0x00401015 in ?? ()
>> #11 0x7c82f243 in ProcessIdToSessionId ()
>>     from /cygdrive/c/WINDOWS/system32/kernel32.dll
>>
>> --
>> 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
>>
>>
>


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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: deadlock with busy waiting on sigfe
  2013-03-11 19:36             ` jojelino
@ 2013-03-11 19:50               ` jojelino
  2013-03-11 20:46               ` Christopher Faylor
  1 sibling, 0 replies; 17+ messages in thread
From: jojelino @ 2013-03-11 19:50 UTC (permalink / raw)
  To: cygwin

On 2013-03-12 AM 4:35, jojelino wrote:
> I was trying to CTRL+C cygwin python process that is executing some
> operation and fell asleep for 60 seconds repeatedly. I'm pretty sure
> that the process was sleeping as i tried interrupt it.
And some operation includes making connection to localhost tcp server 
and sending some command to that. so another thread would be 
mswsock!SockAsyncThread.
this case was very rare and i rarely saw the livelock except this time.
#! /usr/bin/python
from telnetlib import *
import re,sys,time,datetime
t=Telnet()
t.open('127.0.0.1','9051')
def burst(inp):
  for e in inp.split('\n'):
   prep=e
   print prep
   t.write (e+'\n')
   ds=t.expect([re.compile('\n')])
   print ds[2].strip()
#login for tor control protocol
burstcommand=""
burst(burstcommand)
if len(sys.argv)>1:
  f=open(sys.argv[1],'r')
  good=f.readline().split(',')
  others=f.readline().split(',')
  good=filter(lambda x:x not in others,good)
  exclude=f.readline().split(',')
  others=filter(lambda x:x not in exclude,others);
  assert(len(good)>0)
  assert(len(others)>0)
  f.close()
else: raise Exception("list needed")
import random

cont=True
while cont:
  for j in range(10):
   if cont:
    s=list()
    if len(others)>1:
     xx=good[random.randint(0,len(good)-1)]
     s.append(xx)
     s.append(others.pop(random.randint(0,len(others)-1)))
    else:
     print 'others insufficient'
     cont=False
     break
    if cont==True:
     #print "extendcircuit 0", ",".join(s)
     burst("extendcircuit 0 {0}".format(",".join(s)))
   else:
    break
  print "====================================================="
  time.sleep(60)
t.close()
-- 
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: deadlock with busy waiting on sigfe
  2013-03-11 19:36             ` jojelino
  2013-03-11 19:50               ` jojelino
@ 2013-03-11 20:46               ` Christopher Faylor
  2013-03-15 19:41                 ` Christopher Faylor
  1 sibling, 1 reply; 17+ messages in thread
From: Christopher Faylor @ 2013-03-11 20:46 UTC (permalink / raw)
  To: cygwin

On Tue, Mar 12, 2013 at 04:35:41AM +0900, jojelino wrote:
>On 2013-03-11 PM 11:36, Christopher Faylor wrote:
>> A "proper bug report" would at least include what you were actually doing
>> to trigger this problem.
>>
>I was trying to CTRL+C cygwin python process that is executing some 
>operation and fell asleep for 60 seconds repeatedly. I'm pretty sure 
>that the process was sleeping as i tried interrupt it.
>
>> Are you sure that there are only two threads executing here?  It seems like
>> this is a symptom of another thread holding the lock.
>>
>It's unlikely the case because there was two thread running when 
>livelock observed.

How about if you humor me and do a "show threads" rather than just
asserting that it was unlikely?

cgf

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: deadlock with busy waiting on sigfe
  2013-03-11 20:46               ` Christopher Faylor
@ 2013-03-15 19:41                 ` Christopher Faylor
  2013-03-16  1:46                   ` jojelino
  0 siblings, 1 reply; 17+ messages in thread
From: Christopher Faylor @ 2013-03-15 19:41 UTC (permalink / raw)
  To: cygwin

On Mon, Mar 11, 2013 at 04:45:54PM -0400, Christopher Faylor wrote:
>On Tue, Mar 12, 2013 at 04:35:41AM +0900, jojelino wrote:
>>On 2013-03-11 PM 11:36, Christopher Faylor wrote:
>>> A "proper bug report" would at least include what you were actually doing
>>> to trigger this problem.
>>>
>>I was trying to CTRL+C cygwin python process that is executing some 
>>operation and fell asleep for 60 seconds repeatedly. I'm pretty sure 
>>that the process was sleeping as i tried interrupt it.
>>
>>> Are you sure that there are only two threads executing here?  It seems like
>>> this is a symptom of another thread holding the lock.
>>>
>>It's unlikely the case because there was two thread running when 
>>livelock observed.
>
>How about if you humor me and do a "show threads" rather than just
>asserting that it was unlikely?

Actually, if you are running this on a DOS console, and you hit CTRL-C,
you will have at least one other thread executing.

Were you running this under mintty (aka a pty) or in a Windows cmd
shell?

cgf

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: deadlock with busy waiting on sigfe
  2013-03-15 19:41                 ` Christopher Faylor
@ 2013-03-16  1:46                   ` jojelino
  2013-03-16  2:00                     ` jojelino
  0 siblings, 1 reply; 17+ messages in thread
From: jojelino @ 2013-03-16  1:46 UTC (permalink / raw)
  To: cygwin

On 2013-03-16 AM 4:41, Christopher Faylor wrote:
> On Mon, Mar 11, 2013 at 04:45:54PM -0400, Christopher Faylor wrote:
> Actually, if you are running this on a DOS console, and you hit CTRL-C,
> you will have at least one other thread executing.
>
> Were you running this under mintty (aka a pty) or in a Windows cmd
> shell?
>
> cgf
>
It was mintty i was running. and shell command was
for i in `seq 10000`;do ./hop.py list.txt ;done
-- 
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: deadlock with busy waiting on sigfe
  2013-03-16  1:46                   ` jojelino
@ 2013-03-16  2:00                     ` jojelino
  2013-03-16 16:44                       ` Christopher Faylor
  0 siblings, 1 reply; 17+ messages in thread
From: jojelino @ 2013-03-16  2:00 UTC (permalink / raw)
  To: cygwin

On 2013-03-16 AM 10:46, jojelino wrote:
> On 2013-03-16 AM 4:41, Christopher Faylor wrote:
>> On Mon, Mar 11, 2013 at 04:45:54PM -0400, Christopher Faylor wrote:
>> Actually, if you are running this on a DOS console, and you hit CTRL-C,
>> you will have at least one other thread executing.
>>
>> Were you running this under mintty (aka a pty) or in a Windows cmd
>> shell?
>>
>> cgf
>>
> It was mintty i was running. and shell command was
> for i in `seq 10000`;do ./hop.py list.txt ;done
And it would take at least another month to reproduce the busy wait.
I forgot to print cygtls::stackptr[-1] at that time. which would be key 
to identify the cause of the problem.

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: deadlock with busy waiting on sigfe
  2013-03-16  2:00                     ` jojelino
@ 2013-03-16 16:44                       ` Christopher Faylor
  2013-04-01  2:54                         ` livelock " jojelino
  0 siblings, 1 reply; 17+ messages in thread
From: Christopher Faylor @ 2013-03-16 16:44 UTC (permalink / raw)
  To: cygwin

On Sat, Mar 16, 2013 at 11:00:49AM +0900, jojelino wrote:
>On 2013-03-16 AM 10:46, jojelino wrote:
>> On 2013-03-16 AM 4:41, Christopher Faylor wrote:
>>> On Mon, Mar 11, 2013 at 04:45:54PM -0400, Christopher Faylor wrote:
>>> Actually, if you are running this on a DOS console, and you hit CTRL-C,
>>> you will have at least one other thread executing.
>>>
>>> Were you running this under mintty (aka a pty) or in a Windows cmd
>>> shell?
>>>
>> It was mintty i was running. and shell command was
>> for i in `seq 10000`;do ./hop.py list.txt ;done
>And it would take at least another month to reproduce the busy wait.
>I forgot to print cygtls::stackptr[-1] at that time. which would be key 
>to identify the cause of the problem.

No, not really.  The caller in this case isn't interesting.  The number
of threads executing is interesting.

cgf

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: livelock on sigfe
  2013-03-16 16:44                       ` Christopher Faylor
@ 2013-04-01  2:54                         ` jojelino
  2013-04-01  5:03                           ` Hang on CTRL-C (was Re: livelock on sigfe) Christopher Faylor
  0 siblings, 1 reply; 17+ messages in thread
From: jojelino @ 2013-04-01  2:54 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Hang on CTRL-C (was Re: livelock on sigfe)
  2013-04-01  2:54                         ` livelock " jojelino
@ 2013-04-01  5:03                           ` Christopher Faylor
  2013-04-01 18:23                             ` jojelino
  0 siblings, 1 reply; 17+ messages in thread
From: Christopher Faylor @ 2013-04-01  5:03 UTC (permalink / raw)
  To: cygwin

On Mon, Apr 01, 2013 at 11:53:38AM +0900, jojelino wrote:
>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

Sorry for being so precise in my request that you provide information
on threads. It sure would be nice to see what thread 3 was doing via
a backtrace.

cgf

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Hang on CTRL-C (was Re: livelock on sigfe)
  2013-04-01  5:03                           ` Hang on CTRL-C (was Re: livelock on sigfe) Christopher Faylor
@ 2013-04-01 18:23                             ` jojelino
  0 siblings, 0 replies; 17+ messages in thread
From: jojelino @ 2013-04-01 18:23 UTC (permalink / raw)
  To: cygwin

On 2013-04-01 PM 2:03, Christopher Faylor wrote:
> On Mon, Apr 01, 2013 at 11:53:38AM +0900, jojelino wrote:
>> 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.
>>

make process got CTRL+C, and the hanged was clang.exe. and these two was 
on mintty session.

> Sorry for being so precise in my request that you provide information
> on threads. It sure would be nice to see what thread 3 was doing via
> a backtrace.
>
> cgf
>

Here it is. this was created when gdb attached the process.
(gdb) i threads
   Id   Target Id         Frame
* 3    Thread 4516.0xc78 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) bt
#0  0x7c95a22a in ntdll!DbgBreakPoint ()
    from /cygdrive/c/WINDOWS/system32/ntdll.dll
#1  0x7c97fc68 in ntdll!DbgUiRemoteBreakin ()
    from /cygdrive/c/WINDOWS/system32/ntdll.dll
#2  0x00000005 in ?? ()
#3  0x88617518 in ?? ()
#4  0xffffffff in ?? ()
#5  0x7c9680e0 in ntdll!_CIpow () from 
/cygdrive/c/WINDOWS/system32/ntdll.dll
#6  0x7c97fc80 in ntdll!DbgUiRemoteBreakin ()
    from /cygdrive/c/WINDOWS/system32/ntdll.dll
#7  0x00000000 in ?? ()
(gdb)

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2013-04-01 18:23 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-15  2:00 deadlock with busy waiting on sigfe jojelino
2013-01-16  1:47 ` Christopher Faylor
2013-01-16  2:14   ` Christopher Faylor
2013-01-20  5:23     ` jojelino
2013-01-20  6:55       ` Christopher Faylor
2013-03-11  8:54         ` jojelino
2013-03-11 14:36           ` Christopher Faylor
2013-03-11 19:36             ` jojelino
2013-03-11 19:50               ` jojelino
2013-03-11 20:46               ` Christopher Faylor
2013-03-15 19:41                 ` Christopher Faylor
2013-03-16  1:46                   ` jojelino
2013-03-16  2:00                     ` jojelino
2013-03-16 16:44                       ` Christopher Faylor
2013-04-01  2:54                         ` livelock " jojelino
2013-04-01  5:03                           ` Hang on CTRL-C (was Re: livelock on sigfe) Christopher Faylor
2013-04-01 18:23                             ` jojelino

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).