Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1402288

Re: Please review arch/x86/kernel/pvclock.c to fix Docker/Mono crashes in new Kernels

From Paolo Bonzini <pbonzini@redhat.com>
Newsgroups linux.kernel
Subject Re: Please review arch/x86/kernel/pvclock.c to fix Docker/Mono crashes in new Kernels
Date 2016-05-17 13:10 +0200
Message-ID <rzL2W-3NJ-15@gated-at.bofh.it> (permalink)
References <rzvhw-1ZO-3@gated-at.bofh.it> <rzvAS-28G-27@gated-at.bofh.it> <rzvUe-2fp-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: Please review arch/x86/kernel/pvclock.c to fix Docker/Mono  crashes in new Kernels Linus Torvalds <torvalds@linux-foundation.org> - 2016-05-16 20:20 +0200
  Re: Please review arch/x86/kernel/pvclock.c to fix Docker/Mono  crashes in new Kernels Andy Lutomirski <luto@amacapital.net> - 2016-05-16 20:40 +0200
    Re: Please review arch/x86/kernel/pvclock.c to fix Docker/Mono  crashes in new Kernels Linus Torvalds <torvalds@linux-foundation.org> - 2016-05-16 21:00 +0200
      Re: Please review arch/x86/kernel/pvclock.c to fix Docker/Mono  crashes in new Kernels Paolo Bonzini <pbonzini@redhat.com> - 2016-05-17 13:10 +0200

csiph-web