public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [GDBserver] Block and unblock SIGIO
@ 2016-01-26 14:13 sergiodj+buildbot
  2016-01-26 14:13 ` Failures on RHEL-s390x-m64, branch master sergiodj+buildbot
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: sergiodj+buildbot @ 2016-01-26 14:13 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 8b2073398477b33d425b0570236fe4e4222fe2c4 ***

Author: Yao Qi <yao.qi@linaro.org>
Branch: master
Commit: 8b2073398477b33d425b0570236fe4e4222fe2c4

[GDBserver] Block and unblock SIGIO

Nowadays, GDBserver disables async io (by ignoring SIGIO) when process
a serial event, and enables async io (by installing signal handler) when
resume the inferior and wait.  GDBserver may miss SIGIO (by interrupt)
and doesn't process SIGIO in time, which is shown by
gdb.base/interrupt-noterm.exp.  In the test, GDB sends "continue &" and
then "interrupt".  if '\003' arrives at a period between GDBserver
receives vCont;c and enables async io, SIGIO is ignored because signal
handler isn't installed.  GDBserver waits for the inferior and can not
notice '\003' until it returns from wait.

This patch changes the code to install SIGIO handler early, but block
and unblock SIGIO as needed.  In this way, we don't remove SIGIO
handler, so SIGIO can't be ignored.  However, GDBserver needs to
remove the signal handler when connection is closed.

gdb/gdbserver:

2016-01-26  Yao Qi  <yao.qi@linaro.org>

	* remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
	(unblock_async_io): Rename to ...
	(block_unblock_async_io): ... it.  New function.
	(enable_async_io): Don't install SIGIO handler.  Unblock it
	instead.
	(disable_async_io): Don't ignore SIGIO.  Block it instead.
	(initialize_async_io): Install SIGIO handler.  Don't call
	unblock_async_io.


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

end of thread, other threads:[~2016-01-26 16:38 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-26 14:13 [binutils-gdb] [GDBserver] Block and unblock SIGIO sergiodj+buildbot
2016-01-26 14:13 ` Failures on RHEL-s390x-m64, branch master sergiodj+buildbot
2016-01-26 14:37 ` Failures on Fedora-x86_64-cc-with-index, " sergiodj+buildbot
2016-01-26 14:49 ` Failures on Fedora-s390x-m64, " sergiodj+buildbot
2016-01-26 14:49 ` Failures on Fedora-x86_64-native-gdbserver-m64, " sergiodj+buildbot
2016-01-26 14:50 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot
2016-01-26 14:52 ` Failures on Fedora-x86_64-native-gdbserver-m32, " sergiodj+buildbot
2016-01-26 14:55 ` Failures on Debian-s390x-native-gdbserver-m64, " sergiodj+buildbot
2016-01-26 14:57 ` Failures on AIX-POWER7-plain, " sergiodj+buildbot
2016-01-26 15:21 ` Failures on Debian-i686, " sergiodj+buildbot
2016-01-26 15:35 ` Failures on Debian-s390x-m64, " sergiodj+buildbot
2016-01-26 15:42 ` Failures on Debian-i686-native-gdbserver, " sergiodj+buildbot
2016-01-26 15:51 ` Failures on Fedora-ppc64be-m64, " sergiodj+buildbot
2016-01-26 16:07 ` Failures on Debian-i686-native-extended-gdbserver, " sergiodj+buildbot
2016-01-26 16:09 ` Failures on Debian-s390x-native-extended-gdbserver-m64, " sergiodj+buildbot
2016-01-26 16:19 ` Failures on Fedora-ppc64le-native-extended-gdbserver-m64, " sergiodj+buildbot
2016-01-26 16:28 ` Failures on Fedora-ppc64be-native-extended-gdbserver-m64, " sergiodj+buildbot
2016-01-26 16:38 ` Failures on Fedora-ppc64le-cc-with-index, " sergiodj+buildbot

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