public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: jojelino <jojelino@gmail.com>
To: cygwin@cygwin.com
Subject: Re: deadlock with busy waiting on sigfe
Date: Sun, 20 Jan 2013 05:23:00 -0000	[thread overview]
Message-ID: <kdfuvh$a93$1@ger.gmane.org> (raw)
In-Reply-To: <20130116021414.GA14341@ednor.casa.cgf.cx>

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

  reply	other threads:[~2013-01-20  5:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-15  2:00 jojelino
2013-01-16  1:47 ` Christopher Faylor
2013-01-16  2:14   ` Christopher Faylor
2013-01-20  5:23     ` jojelino [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='kdfuvh$a93$1@ger.gmane.org' \
    --to=jojelino@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).