public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* gdb hangs when it calls tcsetpgrp.
@ 2013-06-27 17:46 jojelino
  2013-06-27 17:52 ` Christopher Faylor
  0 siblings, 1 reply; 2+ messages in thread
From: jojelino @ 2013-06-27 17:46 UTC (permalink / raw)
  To: cygwin

I was using gdb for debugging ffmpeg raising SIGFPE. but gdb hangs after 
entering command among of s,n,si,ni.
gdb has same pgrp over pgrp of debuggee. when tcsetpgrp is called in 
gdb, you already know it sends __SIGSETPGRP signal to suspended 
debuggee. but the debugger already suspended all thread of debuggee 
without distinguishing whether the victim thread is wait_sig or not. so 
the suspend process doesn't wake up until debugger handles debug event. 
which is the cause of hang.
Although it seems that cygwin developers have already aware of sort of 
this issue according to fhandler_termios.cc:85, so, it would be good if 
cygwin can defer sending signal that would block for sure.

-- 
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] 2+ messages in thread

* Re: gdb hangs when it calls tcsetpgrp.
  2013-06-27 17:46 gdb hangs when it calls tcsetpgrp jojelino
@ 2013-06-27 17:52 ` Christopher Faylor
  0 siblings, 0 replies; 2+ messages in thread
From: Christopher Faylor @ 2013-06-27 17:52 UTC (permalink / raw)
  To: cygwin

On Fri, Jun 28, 2013 at 02:30:42AM +0900, jojelino wrote:
>I was using gdb for debugging ffmpeg raising SIGFPE. but gdb hangs after 
>entering command among of s,n,si,ni.
>gdb has same pgrp over pgrp of debuggee. when tcsetpgrp is called in 
>gdb, you already know it sends __SIGSETPGRP signal to suspended 
>debuggee. but the debugger already suspended all thread of debuggee 
>without distinguishing whether the victim thread is wait_sig or not. so 
>the suspend process doesn't wake up until debugger handles debug event. 
>which is the cause of hang.
>Although it seems that cygwin developers have already aware of sort of 
>this issue according to fhandler_termios.cc:85, so, it would be good if 
>cygwin can defer sending signal that would block for sure.

Yep.  I've mentioned this issue here several times.  You should use
mintty for debugging.  It does not have this problem.

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] 2+ messages in thread

end of thread, other threads:[~2013-06-27 17:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-27 17:46 gdb hangs when it calls tcsetpgrp jojelino
2013-06-27 17:52 ` Christopher Faylor

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