qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] rcu kicking CPU threads before they're set up...
Date: Wed, 11 Mar 2015 15:06:44 +0100	[thread overview]
Message-ID: <55004BF4.7090608@redhat.com> (raw)
In-Reply-To: <CAFEAcA88pnEAye8yMOk0E5du_2xwidibO8ynF=QH3dmTkYyw+w@mail.gmail.com>



On 11/03/2015 11:23, Peter Maydell wrote:
> I noticed this while I was trying to debug something and so was
> single stepping through the CPU realize function.
> 
> The rcu thread seems to get set up and try to start working too
> early in QEMU's initialization process. Specifically, it can try
> to do things before we've completed the creation and init of all
> the CPUs: I'm seeing call_rcu_thread() calling qemu_mutex_lock_iothread()
> calling  qemu_cpu_kick_thread() before we've even finished actually
> creating and realizing the CPU objects. This segfaults because
> cpu->thread isn't set yet.

Should be fixed by now:

commit 6b49809c597331803ea941eadda813e5bb4e8fe2
Author: Paolo Bonzini <pbonzini@redhat.com>
Date:   Fri Feb 27 19:58:23 2015 +0100

    cpus: fix deadlock and segfault in qemu_mutex_lock_iothread

commit 21618b3e55ad2c6fede0bffcaea466091811ce59
Author: Paolo Bonzini <pbonzini@redhat.com>
Date:   Fri Feb 27 20:01:03 2015 +0100

    cpus: be more paranoid in avoiding deadlocks


Paolo

      reply	other threads:[~2015-03-11 14:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-11 10:23 [Qemu-devel] rcu kicking CPU threads before they're set up Peter Maydell
2015-03-11 14:06 ` Paolo Bonzini [this message]

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=55004BF4.7090608@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=peter.maydell@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).