qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: alex.bennee@linaro.org
Subject: [PATCH 0/3] tests: Fix some deadlocks
Date: Mon, 16 Jan 2023 17:56:58 -1000	[thread overview]
Message-ID: <20230117035701.168514-1-richard.henderson@linaro.org> (raw)

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



             reply	other threads:[~2023-01-17  3:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-17  3:56 Richard Henderson [this message]
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

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=20230117035701.168514-1-richard.henderson@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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 NNTP newsgroup(s).