qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] tests: Fix some deadlocks
@ 2023-01-17  3:56 Richard Henderson
  2023-01-17  3:56 ` [PATCH 1/3] tests/tcg: Use SIGKILL for timeout Richard Henderson
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Richard Henderson @ 2023-01-17  3:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: alex.bennee

The first patch addresses the fact that linux-user blocks all signals
while attempting to handle guest signals (e.g. ABRT), which means that
the default TERM sent by timeout has no effect -- KILL instead.

When a guest aborts (possible nios2 guest bug), sending SIGABRT to
itself, I have caught one thread waiting in start_exclusive, and all
of the others blocked in exclusive_idle.  I look at that and think
there's a bug in our start_exclusive locking, but I can't prove it.

I also wonder whether qemu_plugin_user_exit really needs it, and since
that's the only place that seems to have issues at present, whether
it is in fact using it incorrectly.

Finally, I think we're missing at least a few early tests for
"no plugins registered", like this one, which ought to be fast path,
where the function need do no work whatsoever -- possibly including
taking the plugin lock, but I can't prove that either.

Anyway, this has improved make check-tcg -jX, for large X, which
appears to aggravate things.


r~


Richard Henderson (3):
  tests/tcg: Use SIGKILL for timeout
  plugins: Avoid deadlock in qemu_plugin_user_exit
  plugins: Iterate on cb_lists in qemu_plugin_user_exit

 plugins/core.c            | 13 +++++++------
 tests/tcg/Makefile.target |  4 ++--
 2 files changed, 9 insertions(+), 8 deletions(-)

-- 
2.34.1



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

end of thread, other threads:[~2023-01-20 17:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-17  3:56 [PATCH 0/3] tests: Fix some deadlocks Richard Henderson
2023-01-17  3:56 ` [PATCH 1/3] tests/tcg: Use SIGKILL for timeout Richard Henderson
2023-01-17  9:36   ` Alex Bennée
2023-01-17 15:28     ` Richard Henderson
2023-01-17  3:57 ` [PATCH 2/3] plugins: Avoid deadlock in qemu_plugin_user_exit Richard Henderson
2023-01-20 17:35   ` Alex Bennée
2023-01-17  3:57 ` [PATCH 3/3] plugins: Iterate on cb_lists " Richard Henderson
2023-01-20 17:39   ` Alex Bennée

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 NNTP newsgroup(s).