From: Peter Maydell <peter.maydell@linaro.org>
To: Bug 1647683 <1647683@bugs.launchpad.net>
Cc: "QEMU Developers" <qemu-devel@nongnu.org>,
"Fedorov Sergey" <serge.fdrv@gmail.com>,
"Richard Henderson" <rth@twiddle.net>,
"Paolo Bonzini" <bonzini@gnu.org>,
"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [Qemu-devel] [Bug 1647683] [NEW] Bad interaction between tb flushing & gdb stub
Date: Tue, 6 Dec 2016 12:34:47 +0000 [thread overview]
Message-ID: <CAFEAcA-Uc_g0NP78oEwg3u1cCmGPCxruMptt_OOAhhLiGfd4QQ@mail.gmail.com> (raw)
In-Reply-To: <20161206113915.26308.72810.malonedeb@wampee.canonical.com>
On 6 December 2016 at 11:39, Julian Brown <1647683@bugs.launchpad.net> wrote:
> Running QEMU under GDB in the test harness via Valgrind, using something
> akin to:
>
> (gdb) target remote | valgrind --tool=memcheck qemu-arm-system [...]
>
> leads to intermittent (and quite hard-to-reproduce) segfaults in QEMU of
> the form:
>
> ==52333== Process terminating with default action of signal 11 (SIGSEGV)
> ==52333== Access not within mapped region at address 0x24
> ==52333== at 0x1D55F2: tb_page_remove (translate-all.c:1026)
> ==52333== by 0x1D58B4: tb_phys_invalidate (translate-all.c:1119)
> ==52333== by 0x1D63AA: tb_invalidate_phys_page_range (translate-all.c:1519)
> ==52333== by 0x1D66D7: tb_invalidate_phys_addr (translate-all.c:1714)
> ==52333== by 0x1CBA7F: breakpoint_invalidate (exec.c:704)
> ==52333== by 0x1CC01F: cpu_breakpoint_remove_by_ref (exec.c:869)
> ==52333== by 0x1CBF97: cpu_breakpoint_remove (exec.c:857)
> ==52333== by 0x218FAA: gdb_breakpoint_remove (gdbstub.c:717)
> ==52333== by 0x219E35: gdb_handle_packet (gdbstub.c:1035)
> ==52333== by 0x21AF62: gdb_read_byte (gdbstub.c:1459)
> ==52333== by 0x21B096: gdb_chr_receive (gdbstub.c:1672)
> ==52333== by 0x3AF2BC: qemu_chr_be_write_impl (qemu-char.c:419)
>
> These crashes didn't happen on a 2.6-era QEMU, so I bisected and
> discovered the commit 3359baad36889b83df40b637ed993a4b816c4906 ("tcg:
> Make tb_flush() thread safe") appears to be the thing that triggers this
> intermittent failure. Reverting the patch on the branch tip makes the
> crashes go away.
I saw something similar the other day as well, not involving valgrind,
just a simple gdb connected to the gdbstub.
thanks
-- PMM
next prev parent reply other threads:[~2016-12-06 12:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 11:39 [Qemu-devel] [Bug 1647683] [NEW] Bad interaction between tb flushing & gdb stub Julian Brown
2016-12-06 11:46 ` [Qemu-devel] [Bug 1647683] " Julian Brown
2016-12-06 14:51 ` Alex Bennée
2016-12-06 12:34 ` Peter Maydell [this message]
2016-12-06 14:09 ` [Qemu-devel] [Bug 1647683] [NEW] " Peter Maydell
2016-12-06 14:51 ` [Qemu-devel] [PATCH] exec.c: simplify the breakpoint invalidation logic Alex Bennée
2016-12-06 14:54 ` Peter Maydell
2016-12-06 15:14 ` Alex Bennée
2016-12-06 16:09 ` Peter Maydell
2016-12-07 11:32 ` Paolo Bonzini
2016-12-06 15:43 ` [Qemu-devel] [Bug 1647683] Re: Bad interaction between tb flushing & gdb stub Julian Brown
2016-12-06 16:05 ` Julian Brown
2020-11-08 9:39 ` Thomas Huth
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=CAFEAcA-Uc_g0NP78oEwg3u1cCmGPCxruMptt_OOAhhLiGfd4QQ@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=1647683@bugs.launchpad.net \
--cc=alex.bennee@linaro.org \
--cc=bonzini@gnu.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=serge.fdrv@gmail.com \
/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).