Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Sep 2006 17:16:29 +0300
From:      Vyacheslav Vovk <vovk@km.ua>
To:        freebsd-stable@freebsd.org
Cc:        freebsd-threads@freebsd.org
Subject:   panic: vm_thread_new: kstack allocation failed
Message-ID:  <200609011716.30749.vovk@km.ua>

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

Search on conferences has not given the answer, only the reference to
similar problems
(http://lists.freebsd.org/pipermail/freebsd-stable/2006-June/026010.html),
therefore I shall ask here.

As well as in the above-stated reference there is highly loaded
machine, which periodically panic since 5.4-RELEASE.

#kgdb kernel.debug /var/crash/vmcore.4
[GDB will not be able to debug user-mode threads:
/usr/lib/libthread_db.so: Undef
ined symbol "ps_pglobal_lookup"]
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-marcel-freebsd".

Unread portion of the kernel message buffer:
panic: vm_thread_new: kstack allocation failed
cpuid = 3
Uptime: 7d4h30m58s
Dumping 2046 MB (2 chunks)
  chunk 0: 1MB (158 pages) ... ok
  chunk 1: 2046MB (523744 pages) 2030 2014 1998 1982 1966 1950 1934
1918 1902 188
6 1870 1854 1838 1822 1806 1790 1774 1758 1742 1726 1710 1694 1678 1662
1646 1630
 1614 1598 1582 1566 1550 1534 1518 1502 1486 1470 1454 1438 1422 1406
1390 1374
1358 1342 1326 1310 1294 1278 1262 1246 1230 1214 1198 1182 1166 1150
1134 1118 1
102 1086 1070 1054 1038 1022 1006 990 974 958 942 926 910 894 878 862
846 830 814
 798 782 766 750 734 718 702 686 670 654 638 622 606 590 574 558 542
526 510 494
478 462 446 430 414 398 382 366 350 334 318 302 286 270 254 238 222 206
190 174 1
58 142 126 110 94 78 62 46 30 14
0  doadump () at pcpu.h:165
165             __asm __volatile("movl %%fs:0,%0" : "=r" (td));
(kgdb) bt
#0  doadump () at pcpu.h:165
#1  0xc04e533d in boot (howto=260) at
/usr/src/sys/kern/kern_shutdown.c:409
#2  0xc04e5665 in panic (
    fmt=0xc0679bd6 "vm_thread_new: kstack allocation failed")
    at /usr/src/sys/kern/kern_shutdown.c:565
#3  0xc05f26bb in vm_thread_new (td=0xd2221780, pages=2)
    at /usr/src/sys/vm/vm_glue.c:347
#4  0xc04ef7c7 in thread_init (mem=0xd2221780, size=372, flags=259)
    at /usr/src/sys/kern/kern_thread.c:185
#5  0xc05eb29e in slab_zalloc (zone=0xc0c511e0, wait=259)
    at /usr/src/sys/vm/uma_core.c:861
#6  0xc05ec890 in uma_zone_slab (zone=0xc0c511e0, flags=3)
    at /usr/src/sys/vm/uma_core.c:2025
#7  0xc05ecac0 in uma_zalloc_bucket (zone=0xc0c511e0, flags=3)
    at /usr/src/sys/vm/uma_core.c:2134
#8  0xc05ec722 in uma_zalloc_arg (zone=0xc0c511e0, udata=0x0, flags=2)
    at /usr/src/sys/vm/uma_core.c:1942
#9  0xc04efcb7 in thread_alloc () at uma.h:275
#10 0xc04d3596 in thread_alloc_spare (td=0xd2252d80)
    at /usr/src/sys/kern/kern_kse.c:1046
#11 0xc04d40e6 in thread_userret (td=0xd2252d80, frame=0xffab5d38)
    at /usr/src/sys/kern/kern_kse.c:1437
#12 0xc05061da in userret (td=0xd2252d80, frame=0xffab5d38, oticks=0)
    at /usr/src/sys/kern/subr_trap.c:120
#13 0xc04cecfa in fork_return (td=0xd2252d80, frame=0xffab5d38)
    at /usr/src/sys/kern/kern_fork.c:834
#14 0xc04cec21 in fork_exit (callout=0xc04cece8 <fork_return>,
arg=0xd2252d80,
    frame=0xffab5d38) at /usr/src/sys/kern/kern_fork.c:805
#15 0xc062909c in fork_trampoline () at
/usr/src/sys/i386/i386/exception.s:208
(kgdb) f 3
#3  0xc05f26bb in vm_thread_new (td=0xd2221780, pages=2)
    at /usr/src/sys/vm/vm_glue.c:347
347                     panic("vm_thread_new: kstack allocation
failed");
(kgdb) l
342              * Get a kernel virtual address for this thread's
kstack.
343              */
344             ks = kmem_alloc_nofault(kernel_map,
345                (pages + KSTACK_GUARD_PAGES) * PAGE_SIZE);
346             if (ks == 0)
347                     panic("vm_thread_new: kstack allocation
failed");
348             if (KSTACK_GUARD_PAGES != 0) {
349                     pmap_qremove(ks, KSTACK_GUARD_PAGES);
350                     ks += KSTACK_GUARD_PAGES * PAGE_SIZE;
351             }
(kgdb) i loc
ksobj = 0xd1b25a50
ks = 0
m = 0x0
ma = {0xc1abe450, 0xc26e8498, 0xd201ce20, 0xffab5b90, 0xc05eca91,
0xc0c61d20,
  0xd201ce20, 0x102, 0x80, 0x0, 0xc0c61db0, 0xc0c61d20, 0x0,
0xd0d038c0,
  0xc05ec539, 0xffab5bac, 0xffab5bac, 0xc04da4b3, 0x40, 0x2,
0xffab5bd0,
  0xc04da579, 0xc0699c00, 0x40, 0x2, 0xc0c6caa0, 0xd2221600, 0x0,
0xc04f800a,
  0xd2221754, 0x20, 0xd2221600}
i = -769517696
(kgdb)

#dmesg
Copyright (c) 1992-2006 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD 6.1-STABLE #5: Sat Jul 29 19:57:16 EEST 2006
    vovk@ic.km.ua:/usr/obj/usr/src/sys/stella
acpi_alloc_wakeup_handler: can't alloc wake memory
ACPI APIC Table: <IntelR AWRDACPI>
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Xeon(TM) CPU 2.80GHz (2793.01-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf29  Stepping = 9 
Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CM
OV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x4400<CNTX-ID,<b14>>
  Logical CPUs per core: 2
real memory  = 2146304000 (2046 MB)
avail memory = 2096357376 (1999 MB)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
 cpu2 (AP): APIC ID:  6
 cpu3 (AP): APIC ID:  7
ioapic0: Changing APIC ID to 4
ioapic0 <Version 2.0> irqs 0-23 on motherboard
ioapic1 <Version 2.0> irqs 24-47 on motherboard
acpi0: <IntelR AWRDACPI> on motherboard
acpi0: Power Button (fixed)
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
cpu2: <ACPI CPU> on acpi0
cpu3: <ACPI CPU> on acpi0
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
agp0: <Intel 82875P host to AGP bridge> mem 0xe8000000-0xefffffff at device 
0.0 o
n pci0
pcib1: <PCI-PCI bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
pci1: <display, VGA> at device 0.0 (no driver attached)
pcib2: <ACPI PCI-PCI bridge> at device 3.0 on pci0
pci2: <ACPI PCI bus> on pcib2
em0: <Intel(R) PRO/1000 Network Connection Version - 3.2.18> port 
0x9000-0x901f m
em 0xf7020000-0xf703ffff,0xf7000000-0xf701ffff irq 18 at device 1.0 on pci2
em0: Ethernet address: 00:11:2f:10:3e:14
pcib3: <ACPI PCI-PCI bridge> at device 28.0 on pci0
pci3: <ACPI PCI bus> on pcib3
aac0: <Adaptec SCSI RAID 2200S> mem 0xf0000000-0xf3ffffff irq 25 at device 3.0 
on
 pci3
aac0: New comm. interface enabled
aac0: Adaptec Raid Controller 2.0.0-1
aacp0: <SCSI Passthrough Bus> on aac0
aacp1: <SCSI Passthrough Bus> on aac0
pci0: <serial bus, USB> at device 29.0 (no driver attached)
pci0: <serial bus, USB> at device 29.1 (no driver attached)
pci0: <base peripheral> at device 29.4 (no driver attached)
pci0: <base peripheral, interrupt controller> at device 29.5 (no driver 
attached)
pci0: <serial bus, USB> at device 29.7 (no driver attached)
pcib4: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci4: <ACPI PCI bus> on pcib4
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel 6300ESB UDMA100 controller> port 
0x1f0-0x1f7,0x3f6,0x170-0x177,0x
376,0xf000-0xf00f at device 31.1 on pci0
ata0: <ATA channel 0> on atapci0
ata1: <ATA channel 1> on atapci0
ichsmb0: <Intel 6300ESB (ICH) SMBus controller> port 0x500-0x51f irq 17 at 
device
 31.3 on pci0
ichsmb0: [GIANT-LOCKED]
smbus0: <System Management Bus> on ichsmb0
acpi_tz0: <Thermal Zone> on acpi0
fdc0: <floppy drive controller> port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0
fdc0: [FAST]
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
sio0: type 16550A
sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0
sio1: type 16550A
ppc0: <Standard parallel printer port> port 0x378-0x37f,0x778-0x77b irq 7 on 
acpi
0
ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
ppbus0: <Parallel port bus> on ppc0
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
pmtimer0 on isa0
orm0: <ISA Option ROMs> at iomem 0xc0000-0xca7ff,0xcc000-0xd07ff on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: model Generic PS/2 mouse, device ID 0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounters tick every 1.000 msec
ipfw2 (+ipv6) initialized, divert loadable, rule-based forwarding disabled, 
defau
lt to deny, logging disabled
aacd0: <RAID 1 (Mirror)> on aac0
aacd0: 69974MB (143307008 sectors)
pass0 at aacp0 bus 0 target 0 lun 0
pass0: <SEAGATE ST373307LW 0007> Fixed unknown SCSI-3 device
pass0: 3.300MB/s transfers
pass1 at aacp0 bus 0 target 1 lun 0
pass1: <SEAGATE ST373207LW 0003> Fixed unknown SCSI-3 device
pass1: 3.300MB/s transfers
SMP: AP CPU #2 Launched!
SMP: AP CPU #1 Launched!
SMP: AP CPU #3 Launched!
Trying to mount root from ufs:/dev/aacd0s1a
WARNING: / was not properly dismounted


Periodically I update system up to -STABLE, in hope for correction of
the problem, however no changes are present.

Any ideas for a work around?

-- 
wbr, slava [vovk-uanic]



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