Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Mar 2006 13:23:48 -0700
From:      Robert Isaac <risaac@where.org>
To:        freebsd-questions@freebsd.org
Subject:   FreeBSD 5.4-P12 Panic "vm_thread_new: kstack allocation failed" under load
Message-ID:  <441B1AD4.8090107@where.org>

next in thread | raw e-mail | index | archive | help
Hi Everyone,

I hope this is the proper list for this post.  If not, please let me
know and I will post elsewhere!

I have a FreeBSD server running under high load that has been
experiencing kernel panics.  I have read some documents on kernel
debugging and I believe I have found the problem, but am clueless as to
how to solve it.  Any assistance that can be provided would be
appreciated.  I still have the dump so if I ran the debugger wrong
please let me know and I will differently as directed.

#0  doadump () at pcpu.h:159
159             __asm __volatile("movl %%fs:0,%0" : "=r" (td));
(kgdb) bt
#0  doadump () at pcpu.h:159
#1  0xc04c38d7 in boot (howto=260) at ../../../kern/kern_shutdown.c:410
#2  0xc04c3bfd in panic (fmt=0xc063af71 "vm_thread_new: kstack
allocation failed") at ../../../kern/kern_shutdown.c:566
#3  0xc05b81a3 in vm_thread_new (td=0xd8265900, pages=2) at
../../../vm/vm_glue.c:271
<SNIP>
(kgdb) f 3
#3  0xc05b81a3 in vm_thread_new (td=0xd8265900, pages=2) at
../../../vm/vm_glue.c:271
271                     panic("vm_thread_new: kstack allocation failed");
(kgdb) l
266              * Get a kernel virtual address for this thread's kstack.
267              */
268             ks = kmem_alloc_nofault(kernel_map,
269                (pages + KSTACK_GUARD_PAGES) * PAGE_SIZE);
270             if (ks == 0)
271                     panic("vm_thread_new: kstack allocation failed");
272             if (KSTACK_GUARD_PAGES != 0) {
273                     pmap_qremove(ks, KSTACK_GUARD_PAGES);
274                     ks += KSTACK_GUARD_PAGES * PAGE_SIZE;
275             }
(kgdb) i loc
ksobj = 0xd03f0dec
ks = 0
m = 0x0
ma = {0xc37f2b70, 0xc465b0b8, 0xc068d380, 0x18366, 0x0, 0xc31f1dc0, 0x4,
0x0, 0xfe473ae4, 0xc05f9803, 0xc06a6640, 0xd8265000, 0x3, 0xc05c9b77,
  0xc5834d40, 0x40, 0xc5834d40, 0x30, 0x40, 0x2, 0xfe473b0c, 0xc04b9699,
0xc065a660, 0x40, 0x2, 0xc0c64a00, 0xc501c090, 0xd8265780, 0xc04d4b32,
  0xd82658d0, 0x30, 0xc501c090}
i = -668575488

I have a few custom kernel tweaks for memory problems (the machine has
4GB RAM)

options         KVA_PAGES=256
options         VM_KMEM_SIZE_MAX=(512*1024*1024)


If there is other information I can provide please let me know.

Thanks

Robert








Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?441B1AD4.8090107>