public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	Andy Lutomirski <luto@amacapital.net>
Cc: okhalzov@team.vestbery.com, Marcelo Tosatti <mtosatti@redhat.com>,
	the arch/x86 maintainers <x86@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Taloth Saldono <talothsaldono@gmail.com>
Subject: Re: Please review arch/x86/kernel/pvclock.c to fix Docker/Mono crashes in new Kernels
Date: Tue, 17 May 2016 13:06:20 +0200	[thread overview]
Message-ID: <573AFB2C.5040203@redhat.com> (raw)
In-Reply-To: <CA+55aFx+qKm8iOK+b_KoPPUvtP42XrkFD8pH4MWuiY6vkXvBxg@mail.gmail.com>



On 16/05/2016 20:56, Linus Torvalds wrote:
> On Mon, May 16, 2016 at 11:37 AM, Andy Lutomirski <luto@amacapital.net> wrote:
>>
>> All of those fixes were intended to fix incorrect times being
>> reported, not segfaults.  Weird.
> 
> I'm assuming it's "time going backwards". I can easily see that
> causing segfaults.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1450584 says the
crashes occurs "more frequently on a vbox vm with multiple CPUs
configured".  If vbox tells the VM to use the vdso when it shouldn't
(because the TSC is not stable on the host), bad things could happen.

However, based on the Xamarin bug comments and
http://lists.ximian.com/pipermail/mono-devel-list/2015-August/043181.html,
it looks like vbox after all doesn't use pvclock and the trigger seems
to be https://github.com/torvalds/linux/commit/c70e1b475f37:

   With __always_inline on vread_pvclock, mono crashed. With noinline on
   vread_pvclock, mono doesn't crash. Weirdest part is that the pvclock
   isn't even used during my tests.

Oleg, what is your environment exactly?  You mentioned Docker, but are
you also virtualizing and if so what is your hypervisor?

Taloth, do you know if it can it be reproduced under Xen or KVM or
bare-metal?  I'd trust them more than VirtualBox regarding timekeeping.
 I saw Amazon Linux mentioned in the mono mailing list archives which
would point to Xen.  Xen doesn't use the pvclock vdso code either, though.

Thanks,

Paolo

      reply	other threads:[~2016-05-17 11:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-16 18:10 Please review arch/x86/kernel/pvclock.c to fix Docker/Mono crashes in new Kernels Linus Torvalds
2016-05-16 18:37 ` Andy Lutomirski
2016-05-16 18:56   ` Linus Torvalds
2016-05-17 11: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=573AFB2C.5040203@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mtosatti@redhat.com \
    --cc=okhalzov@team.vestbery.com \
    --cc=talothsaldono@gmail.com \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.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