Re: deadlock with busy waiting on sigfe

2013-03-16 Thread Christopher Faylor
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 1`;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



Re: deadlock with busy waiting on sigfe

2013-03-15 Thread Christopher Faylor
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



Re: deadlock with busy waiting on sigfe

2013-03-15 Thread jojelino

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 1`;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



Re: deadlock with busy waiting on sigfe

2013-03-15 Thread jojelino

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 1`;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



Re: deadlock with busy waiting on sigfe

2013-03-11 Thread jojelino

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



Re: deadlock with busy waiting on sigfe

2013-03-11 Thread Christopher Faylor
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 0x 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



Re: deadlock with busy waiting on sigfe

2013-03-11 Thread jojelino

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



Re: deadlock with busy waiting on sigfe

2013-03-11 Thread jojelino

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



Re: deadlock with busy waiting on sigfe

2013-03-11 Thread Christopher Faylor
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



Re: deadlock with busy waiting on sigfe

2013-01-19 Thread jojelino

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  0x0005 in ?? ()
#3  0x0001 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 0x 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  0x in ?? ()
(gdb)

(gdb) x 7ffdd000+4
0x7ffdd004: 0x0023
(gdb) x ((_cygtls*)(0x0023-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



Re: deadlock with busy waiting on sigfe

2013-01-19 Thread Christopher Faylor
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



Re: deadlock with busy waiting on sigfe

2013-01-15 Thread Christopher Faylor
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




Re: deadlock with busy waiting on sigfe

2013-01-15 Thread Christopher Faylor
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



deadlock with busy waiting on sigfe

2013-01-14 Thread jojelino

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