Re: 2.6.{26.2,27-rc} oops on virtualbox

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Luiz Fernando N. Capitulino
Date: Tuesday, August 26, 2008 - 9:09 am

Em Tue, 26 Aug 2008 10:53:38 -0400
Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> escreveu:

| * Gerhard Brauer (gerhard.brauer@web.de) wrote:
| > On Fri, Aug 22, 2008 at 02:08:13PM -0700, H. Peter Anvin wrote:
| > > Luiz Fernando N. Capitulino wrote:
| > >>
| > >>  I have asked Mandriva and Ubuntu users to test this and all of
| > >> them so far are saying that noreplace-paravirt works.
| > >>
| > >>  It makes the system slower, but it works.
| > >>
| > >
| > > Yes, the big issue is exactly what VirtualBox screws up in this matter,  
| > > how to detect it, and how to work around it.
| > >
| > > It's pretty clear it's a VirtualBox f*ckup at this point, but the failure 
| > > mechanism isn't at all obvious and so far the workaround is elusive.
| > >
| > > I'm strongly suspect this is a VirtualBox tcache management failure, but  
| > > that doesn't help the situation without knowing how it happens.
| > 
| > On Archlinux we have the same problem. We have a bugreport here:
| > http://bugs.archlinux.org/task/11141
| > 
| > Myself test it with a LiveCD/Install-ISO which has 2.6.26 as install
| > kernel. We have the guest oops on virtualbox-ose, virtualbox-sun and both on
| > i686 or x86_64 hosts.
| > 
| > Some things i noticed:
| > - The system boots always when i either enable VT-x in guest settings or
| >   disable acpi and run the guest with acpi=off.
| > - The oops occurs always on (disk)-io, no matter which file system i
| >   use.
| > - When the oops has occured and the guest has to close and restart then,
| >   if i don't use VT-x or acpi=off, i always get an oops directly when
| >   initrd/kernel is starting. Last screen message before the oops then is
| >   "Freeing SMP alternatives".
| > 
| > Here is also an archive with guest dmesg and messages.log from such an
| > oops when heavy disk io leads to the oops:
| > http://bugs.archlinux.org/task/11141?getfile=2445
| > 
| 
| Hrm, can you try this ?
| 
| 1 - Make sure you kernel is not CONFIG_DEBUG_RODATA

"""
$ grep CONFIG_DEBUG_RODATA .config
# CONFIG_DEBUG_RODATA is not set
$
"""

| 2 - Change the whole text_poke implementation in
| arch/x86/kernel/alternative.c to this :
| 
| void *__kprobes text_poke(void *addr, const void *opcode, size_t len)
| {
|   return text_poke_early(addr, opcode, len);
| }
| 
| If this works, I suspect that the problem comes from a vmap/vunmap
| problem. If it still fails, the problem would likely come from a race
| with interrupt disabling probably due to missing data/instruction cache
| flush.

 I still get the oops with this change. :((

| Then, after having tested (2), try this on top of it :
| 
| In arch/x86/kernel/alternative.c, alternatives_smp_switch()
| 
| Add   unsigned long flags;
| Change 
| spin_lock -> spin_lock_irqsave(&smp_alt, flags);
| spin_unlock(&smp_alt); -> spin_unlock_irqrestore(&smp_alt, flags);
| 
| This will help testing if there is a problem with interrupts coming
| shortly after the modification. If it fixes the problem, my guess is
| that we should flush the instruction cache (and maybe the data cache ?)
| in text_poke and text_poke early when interrupts are off.

 By 'on top of it' you mean I should make these changes with the
text_poke() version above right?

 By the way, I have added a comment in the virtualbox's bugzilla
pointing out this thread but no feedback from them so far.

-- 
Luiz Fernando N. Capitulino
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.{26.2,27-rc} oops on virtualbox, Luiz Fernando N. Cap ..., (Wed Aug 20, 12:29 pm)
Re: 2.6.{26.2,27-rc} oops on virtualbox, H. Peter Anvin, (Thu Aug 21, 2:34 pm)
Re: 2.6.{26.2,27-rc} oops on virtualbox, H. Peter Anvin, (Thu Aug 21, 11:42 pm)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Ingo Molnar, (Thu Aug 21, 11:50 pm)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Luiz Fernando N. Cap ..., (Fri Aug 22, 7:28 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Luiz Fernando N. Cap ..., (Fri Aug 22, 7:39 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Mathieu Desnoyers, (Fri Aug 22, 8:34 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Luiz Fernando N. Cap ..., (Fri Aug 22, 9:29 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Mathieu Desnoyers, (Fri Aug 22, 9:35 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, H. Peter Anvin, (Fri Aug 22, 10:16 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Luiz Fernando N. Cap ..., (Fri Aug 22, 10:20 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Mathieu Desnoyers, (Fri Aug 22, 10:45 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, H. Peter Anvin, (Fri Aug 22, 10:57 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, H. Peter Anvin, (Fri Aug 22, 11:11 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Luiz Fernando N. Cap ..., (Fri Aug 22, 12:10 pm)
Re: 2.6.{26.2,27-rc} oops on virtualbox, H. Peter Anvin, (Fri Aug 22, 12:14 pm)
Re: 2.6.{26.2,27-rc} oops on virtualbox, H. Peter Anvin, (Fri Aug 22, 12:18 pm)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Luiz Fernando N. Cap ..., (Fri Aug 22, 12:40 pm)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Luiz Fernando N. Cap ..., (Fri Aug 22, 12:42 pm)
Re: 2.6.{26.2,27-rc} oops on virtualbox, H. Peter Anvin, (Fri Aug 22, 1:31 pm)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Luiz Fernando N. Cap ..., (Fri Aug 22, 1:55 pm)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Luiz Fernando N. Cap ..., (Fri Aug 22, 1:57 pm)
Re: 2.6.{26.2,27-rc} oops on virtualbox, H. Peter Anvin, (Fri Aug 22, 2:08 pm)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Gerhard Brauer, (Tue Aug 26, 7:18 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Mathieu Desnoyers, (Tue Aug 26, 7:53 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Luiz Fernando N. Cap ..., (Tue Aug 26, 9:02 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Luiz Fernando N. Cap ..., (Tue Aug 26, 9:09 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Luiz Fernando N. Cap ..., (Tue Aug 26, 9:13 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Gerhard Brauer, (Tue Aug 26, 9:40 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Mathieu Desnoyers, (Tue Aug 26, 10:18 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, H. Peter Anvin, (Tue Aug 26, 10:32 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Luiz Fernando N. Cap ..., (Tue Aug 26, 11:02 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Mathieu Desnoyers, (Tue Aug 26, 11:15 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Gerhard Brauer, (Tue Aug 26, 12:27 pm)
Re: 2.6.{26.2,27-rc} oops on virtualbox, H. Peter Anvin, (Tue Aug 26, 12:52 pm)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Gerhard Brauer, (Tue Aug 26, 1:34 pm)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Mathieu Desnoyers, (Tue Aug 26, 1:48 pm)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Gerhard Brauer, (Tue Aug 26, 2:25 pm)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Mathieu Desnoyers, (Tue Aug 26, 2:35 pm)
Re: 2.6.{26.2,27-rc} oops on virtualbox, H. Peter Anvin, (Tue Aug 26, 2:51 pm)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Gerhard Brauer, (Tue Aug 26, 5:13 pm)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Luiz Fernando N. Cap ..., (Wed Aug 27, 12:13 pm)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Mathieu Desnoyers, (Wed Aug 27, 4:33 pm)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Luiz Fernando N. Cap ..., (Thu Aug 28, 6:30 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Gerhard Brauer, (Thu Aug 28, 6:50 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Gerhard Brauer, (Sun Aug 31, 2:29 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Stefan Lippers-Hollmann, (Sun Aug 31, 6:28 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Gerhard Brauer, (Sun Aug 31, 7:03 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Luiz Fernando N. Cap ..., (Sun Aug 31, 7:09 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Gerhard Brauer, (Sun Sep 21, 6:41 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Ingo Molnar, (Mon Sep 22, 2:51 am)
Re: 2.6.{26.2,27-rc} oops on virtualbox, Luiz Fernando N. Cap ..., (Wed Sep 24, 6:24 am)