From: Paolo Bonzini <pbonzini@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Cc: alex.bennee@linaro.org, armbru@redhat.com, f4bug@amsat.org
Subject: Re: [PATCH] monitor: Fix order in monitor_cleanup()
Date: Mon, 15 Feb 2021 16:08:38 +0100 [thread overview]
Message-ID: <12ad27f6-99f7-5c0f-c24a-f6784da67683@redhat.com> (raw)
In-Reply-To: <20201013125027.41003-1-kwolf@redhat.com>
On 13/10/20 14:50, Kevin Wolf wrote:
> We can only destroy Monitor objects after we're sure that they are not
> in use by the dispatcher coroutine any more. This fixes crashes like the
> following where we tried to destroy a monitor mutex while the dispatcher
> coroutine still holds it:
>
> (gdb) bt
> #0 0x00007fe541cf4bc5 in raise () at /lib64/libc.so.6
> #1 0x00007fe541cdd8a4 in abort () at /lib64/libc.so.6
> #2 0x000055c24e965327 in error_exit (err=16, msg=0x55c24eead3a0 <__func__.33> "qemu_mutex_destroy") at ../util/qemu-thread-posix.c:37
> #3 0x000055c24e9654c3 in qemu_mutex_destroy (mutex=0x55c25133e0f0) at ../util/qemu-thread-posix.c:70
> #4 0x000055c24e7cfaf1 in monitor_data_destroy_qmp (mon=0x55c25133dfd0) at ../monitor/qmp.c:439
> #5 0x000055c24e7d23bc in monitor_data_destroy (mon=0x55c25133dfd0) at ../monitor/monitor.c:615
> #6 0x000055c24e7d253a in monitor_cleanup () at ../monitor/monitor.c:644
> #7 0x000055c24e6cb002 in qemu_cleanup () at ../softmmu/vl.c:4549
> #8 0x000055c24e0d259b in main (argc=24, argv=0x7ffff66b0d58, envp=0x7ffff66b0e20) at ../softmmu/main.c:51
>
> Reported-by: Alex Bennée<alex.bennee@linaro.org>
> Signed-off-by: Kevin Wolf<kwolf@redhat.com>
Is this a race, or is there a chance of adding a reliable reproducer to
qtest?
Paolo
next prev parent reply other threads:[~2021-02-15 15:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-13 12:50 [PATCH] monitor: Fix order in monitor_cleanup() Kevin Wolf
2020-10-13 13:32 ` Ben Widawsky
2020-10-14 17:20 ` Alex Bennée
2020-10-15 7:46 ` Kevin Wolf
2020-10-19 9:19 ` Markus Armbruster
2021-01-29 12:53 ` Markus Armbruster
2021-02-12 14:22 ` Kevin Wolf
2021-02-15 12:17 ` Markus Armbruster
2021-02-15 15:08 ` Paolo Bonzini [this message]
2021-02-15 15:28 ` Kevin Wolf
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=12ad27f6-99f7-5c0f-c24a-f6784da67683@redhat.com \
--to=pbonzini@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=f4bug@amsat.org \
--cc=kwolf@redhat.com \
--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).