public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* kvm-85 sometimes not starting on 2.6.30-rc5
@ 2009-05-13 19:22 Nikola Ciprich
  2009-05-17 20:27 ` Avi Kivity
  0 siblings, 1 reply; 5+ messages in thread
From: Nikola Ciprich @ 2009-05-13 19:22 UTC (permalink / raw)
  To: KVM list; +Cc: nikola.ciprich

Hi,
sometimes trying to start kvm on 2.6.30-rc5 (with kvm module v85, userspace v85) fails with:
kvm_create_vm: Interrupted system call
Could not create KVM context

and following backtrace appears in dmesg:
[  309.546138] BUG: MAX_LOCK_DEPTH too low!
[  309.549964] turning off the locking correctness validator.
[  309.549964] Pid: 2833, comm: qemu-kvm Not tainted 2.6.30lb.00_01_PRE08 #1
[  309.549964] Call Trace:
[  309.549964]  [<ffffffff80269aa9>] __lock_acquire+0x4a9/0xb70
[  309.549964]  [<ffffffff802c54ef>] ? mm_take_all_locks+0x2f/0x130
[  309.549964]  [<ffffffff8026b825>] lock_acquire+0xa5/0x150
[  309.549964]  [<ffffffff802c55ac>] ? mm_take_all_locks+0xec/0x130
[  309.549964]  [<ffffffff80505c96>] _spin_lock_nest_lock+0x36/0x50
[  309.549964]  [<ffffffff802c55ac>] ? mm_take_all_locks+0xec/0x130
[  309.549964]  [<ffffffff802c55ac>] mm_take_all_locks+0xec/0x130
[  309.549964]  [<ffffffff802d43ab>] do_mmu_notifier_register+0x7b/0x1d0
[  309.549964]  [<ffffffff802d451e>] mmu_notifier_register+0xe/0x10
[  309.549964]  [<ffffffffa02a8dd9>] kvm_dev_ioctl+0x189/0x2f0 [kvm]
[  309.549964]  [<ffffffff802f0171>] vfs_ioctl+0x31/0x90
[  309.549964]  [<ffffffff802f03fb>] do_vfs_ioctl+0x22b/0x550
[  309.549964]  [<ffffffff802f07a2>] sys_ioctl+0x82/0xa0
[  309.549964]  [<ffffffff8020b442>] system_call_fastpath+0x16/0x1b

It happened to me when I didn't have storage with kernel mounted.
Further attempts are usually successfull.
BR
nik


-- 
-------------------------------------
Nikola CIPRICH
LinuxBox.cz, s.r.o.
28. rijna 168, 709 01 Ostrava

tel.:   +420 596 603 142
fax:    +420 596 621 273
mobil:  +420 777 093 799

www.linuxbox.cz

mobil servis: +420 737 238 656
email servis: servis@linuxbox.cz
-------------------------------------

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: kvm-85 sometimes not starting on 2.6.30-rc5
  2009-05-13 19:22 kvm-85 sometimes not starting on 2.6.30-rc5 Nikola Ciprich
@ 2009-05-17 20:27 ` Avi Kivity
  2009-05-23 17:20   ` Andrea Arcangeli
  0 siblings, 1 reply; 5+ messages in thread
From: Avi Kivity @ 2009-05-17 20:27 UTC (permalink / raw)
  To: Andrea Arcangeli; +Cc: Nikola Ciprich, KVM list, nikola.ciprich

Andrea, looks like the mother of all locks below.

Nikola Ciprich wrote:
> Hi,
> sometimes trying to start kvm on 2.6.30-rc5 (with kvm module v85, userspace v85) fails with:
> kvm_create_vm: Interrupted system call
> Could not create KVM context
>
> and following backtrace appears in dmesg:
> [  309.546138] BUG: MAX_LOCK_DEPTH too low!
> [  309.549964] turning off the locking correctness validator.
> [  309.549964] Pid: 2833, comm: qemu-kvm Not tainted 2.6.30lb.00_01_PRE08 #1
> [  309.549964] Call Trace:
> [  309.549964]  [<ffffffff80269aa9>] __lock_acquire+0x4a9/0xb70
> [  309.549964]  [<ffffffff802c54ef>] ? mm_take_all_locks+0x2f/0x130
> [  309.549964]  [<ffffffff8026b825>] lock_acquire+0xa5/0x150
> [  309.549964]  [<ffffffff802c55ac>] ? mm_take_all_locks+0xec/0x130
> [  309.549964]  [<ffffffff80505c96>] _spin_lock_nest_lock+0x36/0x50
> [  309.549964]  [<ffffffff802c55ac>] ? mm_take_all_locks+0xec/0x130
> [  309.549964]  [<ffffffff802c55ac>] mm_take_all_locks+0xec/0x130
> [  309.549964]  [<ffffffff802d43ab>] do_mmu_notifier_register+0x7b/0x1d0
> [  309.549964]  [<ffffffff802d451e>] mmu_notifier_register+0xe/0x10
> [  309.549964]  [<ffffffffa02a8dd9>] kvm_dev_ioctl+0x189/0x2f0 [kvm]
> [  309.549964]  [<ffffffff802f0171>] vfs_ioctl+0x31/0x90
> [  309.549964]  [<ffffffff802f03fb>] do_vfs_ioctl+0x22b/0x550
> [  309.549964]  [<ffffffff802f07a2>] sys_ioctl+0x82/0xa0
> [  309.549964]  [<ffffffff8020b442>] system_call_fastpath+0x16/0x1b
>
> It happened to me when I didn't have storage with kernel mounted.
> Further attempts are usually successfull.
> BR
> nik
>
>
>   


-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: kvm-85 sometimes not starting on 2.6.30-rc5
  2009-05-17 20:27 ` Avi Kivity
@ 2009-05-23 17:20   ` Andrea Arcangeli
  2009-05-24  9:47     ` Avi Kivity
  0 siblings, 1 reply; 5+ messages in thread
From: Andrea Arcangeli @ 2009-05-23 17:20 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Nikola Ciprich, KVM list, nikola.ciprich

On Sun, May 17, 2009 at 11:27:42PM +0300, Avi Kivity wrote:
> Andrea, looks like the mother of all locks below.

eheh yes that really is the mother of all locks ;).

So the thing is, like BUG says MAX_LOCK_DEPTH is too low, to fix you
should rebuild after increasing it in include/linux/sched.h to say 96.

Likely somebody changed qemu-kvm over time in a way that allocates
more vmas than before.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: kvm-85 sometimes not starting on 2.6.30-rc5
  2009-05-23 17:20   ` Andrea Arcangeli
@ 2009-05-24  9:47     ` Avi Kivity
  2009-09-03  8:04       ` Nikola Ciprich
  0 siblings, 1 reply; 5+ messages in thread
From: Avi Kivity @ 2009-05-24  9:47 UTC (permalink / raw)
  To: Andrea Arcangeli; +Cc: Nikola Ciprich, KVM list, nikola.ciprich

Andrea Arcangeli wrote:
> On Sun, May 17, 2009 at 11:27:42PM +0300, Avi Kivity wrote:
>   
>> Andrea, looks like the mother of all locks below.
>>     
>
> eheh yes that really is the mother of all locks ;).
>
> So the thing is, like BUG says MAX_LOCK_DEPTH is too low, to fix you
> should rebuild after increasing it in include/linux/sched.h to say 96.
>
> Likely somebody changed qemu-kvm over time in a way that allocates
> more vmas than before.
>   

It does, we now have a vma for each discontiguous memory region (640K, 
vga bios, bios, 1M+ memory, framebuffer, 4G+ memory).

Still, we have a lot more vmas in qemu for the various dynamic 
libraries, etc.  I'm surprised it made such a difference.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: kvm-85 sometimes not starting on 2.6.30-rc5
  2009-05-24  9:47     ` Avi Kivity
@ 2009-09-03  8:04       ` Nikola Ciprich
  0 siblings, 0 replies; 5+ messages in thread
From: Nikola Ciprich @ 2009-09-03  8:04 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Andrea Arcangeli, KVM list, nikola.ciprich


Hi,
somehow this thread ended without any conclusion. Today I noticed
that 
BUG: MAX_LOCK_DEPTH too low! 
still shows up when starting kvm on 2.6.31-rc8

So is increasing MAX_LOCK_DEPTH to say 96 good way to go?
If yes, shouldn't we set this for upstream kernel?
thanks
nik


On Sun, May 24, 2009 at 12:47:49PM +0300, Avi Kivity wrote:
> Andrea Arcangeli wrote:
>> On Sun, May 17, 2009 at 11:27:42PM +0300, Avi Kivity wrote:
>>   
>>> Andrea, looks like the mother of all locks below.
>>>     
>>
>> eheh yes that really is the mother of all locks ;).
>>
>> So the thing is, like BUG says MAX_LOCK_DEPTH is too low, to fix you
>> should rebuild after increasing it in include/linux/sched.h to say 96.
>>
>> Likely somebody changed qemu-kvm over time in a way that allocates
>> more vmas than before.
>>   
>
> It does, we now have a vma for each discontiguous memory region (640K,  
> vga bios, bios, 1M+ memory, framebuffer, 4G+ memory).
>
> Still, we have a lot more vmas in qemu for the various dynamic  
> libraries, etc.  I'm surprised it made such a difference.
>
> -- 
> error compiling committee.c: too many arguments to function
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

-- 
-------------------------------------
Nikola CIPRICH
LinuxBox.cz, s.r.o.
28. rijna 168, 709 01 Ostrava

tel.:   +420 596 603 142
fax:    +420 596 621 273
mobil:  +420 777 093 799
www.linuxbox.cz

mobil servis: +420 737 238 656
email servis: servis@linuxbox.cz
-------------------------------------

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-09-03  8:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-13 19:22 kvm-85 sometimes not starting on 2.6.30-rc5 Nikola Ciprich
2009-05-17 20:27 ` Avi Kivity
2009-05-23 17:20   ` Andrea Arcangeli
2009-05-24  9:47     ` Avi Kivity
2009-09-03  8:04       ` Nikola Ciprich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox