[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pfctl: Cannot allocate memory



Cedric Berger ([email protected]) wrote:
> Now maybee you could succeed reloading your table with
> the command: "pfctl -t ban -Tr -f /etc/ban", because this
> command is more optimized and will allocate less kernel
> memory. It will run faster too.
> 
> Hope that helps, and let us know if you find something with
> "vmstat -m" output. If it is PF that leaks kernel memory, we
> need to fix that!
Hi again, and thanks for responding earlier.  Today is the first time I've
seen the problem happen again.  This is probably due to several reboots
which have occurred since I originally reported the problem (some planned
and some unplanned).
During that time, I also updated to a snapshot, and then to 3.4-current
by source.  I'm currently running 3.4-current from Feb 23.
pegasus:~$ sudo vi /etc/ban
Password:
pegasus:~$ sudo pfctl -t ban -Tr -f /etc/ban
pfctl: Cannot allocate memory.
Here's what vmstat -m says:
============================================================================
Memory statistics by bucket size
    Size   In Use   Free           Requests  HighWater  Couldfree
      16     3682   2718           25800286    1280        385
      32   140478    322          184590948     640        186
      64      878    402            6055064     320         42
     128      523    405            4530248     160       2247
     256   140012     36            4789478      80          0
     512      150    466            1226607      40     313971
    1024      235     53           98404630      20    8119873
    2048      555     43              83129      10       6913
    4096       22     13          204964161       5  203007437
    8192       39     10           10232481       5    9845770
   16384        8      0              21261       5          0
   32768        6      0               4012       5          0
   65536        2      0                124       5          0
  131072        4      0                 24       5          0
  262144        5      0                214       5          0
Memory usage type by bucket size
    Size  Type(s)
      16  devbuf, pcb, routetbl, ifaddr, namei, vnodes, namecache, sem, dirhash,
	  file desc, proc, in_multi, exec, xform_data, VM swap, UVM amap,
	  UVM aobj, USB, packet tags, temp
      32  devbuf, pcb, routetbl, fragtbl, ifaddr, namei, vnodes, UFS mount, sem,
	  dirhash, VFS cluster, NFS daemon, ether_multi, xform_data, VM swap,
	  UVM amap, USB, packet tags, temp
      64  devbuf, pcb, routetbl, namei, UFS mount, sem, dirhash, VFS cluster,
	  in_multi, pfkey data, UVM amap, USB, NDP, temp
     128  devbuf, routetbl, ifaddr, namei, vnodes, dirhash, ttys, exec,
	  UVM amap, USB, USB device, NDP, temp
     256  devbuf, routetbl, ifaddr, namei, ioctlops, vnodes, shm, VM map,
	  dirhash, file, file desc, proc, Export Host, NFS srvsock, NFS daemon,
	  ttys, newblk, UVM amap, USB, temp
     512  devbuf, pcb, ifaddr, ioctlops, mount, UFS mount, shm, dirhash,
	  file desc, NFS daemon, exec, UVM amap, USB device, temp
    1024  devbuf, namei, ioctlops, UFS mount, dirhash, file, file desc, proc,
	  ttys, exec, UVM amap, UVM aobj, crypto data, temp
    2048  devbuf, ifaddr, UFS mount, file desc, pagedep, VM swap, UVM amap,
	  temp
    4096  devbuf, file, file desc, MSDOSFS mount, UVM amap, memdesc, temp
    8192  NFS node, namecache, UFS quota, UFS mount, file desc, ISOFS mount,
	  inodedep, UVM amap, temp
   16384  devbuf, UFS mount, VM swap, UVM amap
   32768  devbuf, namecache, VM swap, UVM amap
   65536  devbuf, UVM amap
  131072  UVM amap
  262144  UFS mount, UVM amap
Memory statistics by type                           Type  Kern
          Type InUse MemUse HighUse  Limit Requests Limit Limit Size(s)
        devbuf  1028  1431K   1431K 39322K     1091    0     0  16,32,64,128,256,512,1024,2048,4096,16384,32768,65536
           pcb    66     6K      7K 39322K    15838    0     0  16,32,64,512
      routetbl279631 39322K  39322K 39322K  1148926    0     0  16,32,64,128,256
       fragtbl     0     0K      1K 39322K    79574    0     0  32
        ifaddr    93    16K     17K 39322K       94    0     0  16,32,128,256,512,2048
         namei     0     0K     17K 39322K 98157204    0     0  16,32,64,128,256,1024
      ioctlops     0     0K      1K 39322K      117    0     0  256,512,1024
         mount     6     3K      4K 39322K        8    0     0  512
      NFS node     1     8K      8K 39322K        1    0     0  8192
        vnodes    71     9K     45K 39322K    70050    0     0  16,32,128,256
     namecache     3    41K     41K 39322K        3    0     0  16,8192,32768
     UFS quota     1     8K      8K 39322K        1    0     0  8192
     UFS mount    25   235K    235K 39322K       25    0     0  32,64,512,1024,2048,8192,16384,262144
           shm     2     1K      1K 39322K        2    0     0  256,512
        VM map     4     1K      1K 39322K        4    0     0  256
           sem     2     1K      1K 39322K        4    0     0  16,32,64
       dirhash   225    42K    293K 39322K    85464    0     0  16,32,64,128,256,512,1024
          file     0     0K      4K 39322K      810    0     0  256,1024,4096
     file desc    29    16K     21K 39322K     5293    0     0  16,256,512,1024,2048,4096,8192
          proc    19     3K      3K 39322K    11586    0     0  16,256,1024
   VFS cluster     0     0K     10K 39322K   732566    0     0  32,64
   Export Host     2     1K      1K 39322K       22    0     0  256
   NFS srvsock     2     1K      1K 39322K        2    0     0  256
    NFS daemon    69     5K      5K 39322K       69    0     0  32,256,512
      in_multi    31     2K      2K 39322K       37    0     0  16,64
   ether_multi     7     1K      1K 39322K        7    0     0  32
   ISOFS mount     1     8K      8K 39322K        1    0     0  8192
 MSDOSFS mount     1     4K      4K 39322K        1    0     0  4096
          ttys   336   196K    196K 39322K      336    0     0  128,256,1024
          exec     0     0K      3K 39322K   826761    0     0  16,128,512,1024
    pfkey data     1     1K      1K 39322K        2    0     0  64
    xform_data     0     0K      1K 39322K      290    0     0  16,32
       pagedep     1     2K      2K 39322K        1    0     0  2048
      inodedep     1     8K      8K 39322K        1    0     0  8192
        newblk     1     1K      1K 39322K        1    0     0  256
       VM swap     7    39K     39K 39322K        7    0     0  16,32,2048,16384,32768
      UVM amap  4846  1753K   2975K 39322K 36573250    0     0  16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,131072,262144
      UVM aobj     2     2K      2K 39322K        2    0     0  16,1024
           USB    29     3K      3K 39322K       29    0     0  16,32,64,128,256
    USB device     8     4K      4K 39322K        8    0     0  128,512
       memdesc     1     4K      4K 39322K        1    0     0  4096
   crypto data     1     1K      1K 39322K        1    0     0  1024
   packet tags    16     1K      8K 39322K181221739    0     0  16,32
           NDP    10     1K      1K 39322K       13    0     0  64,128
          temp    20    10K     23K 39322K221771425    0     0  16,32,64,128,256,512,1024,2048,4096,8192
Memory Totals:  In Use    Free    Requests
                43175K    642K    540702667
Memory resource pool statistics
Name        Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
extentpl      20      218    0      195     1     0     1     1     0   inf    0
phpool        40     1322    0        0    14     0    14    14     0   inf    0
pmappl        72   575985    0   575893     4     0     4     4     0   inf    2
vmsppl       212   575985    0   575893    11     0    11    11     0   inf    6
vmmpepl       88 24645691    0 24642033   131     0   131   131     0   inf   49
vmmpekpl      88  1719518    0  1719167    10     0    10    10     0   inf    0
aobjpl        52        1    0        0     1     0     1     1     0   inf    0
amappl        40 10668556    0 10666976    27     0    27    27     0   inf   10
bufpl        116       12    0       12     1     0     1     1     0   inf    1
mbpl         256 1733160973  0 1733159762 189     0   189   189     1   inf   74
mclpl       2048 231323098   0 231322856  370     0   370   370     4  1024  249
sockpl       200  4347379    0  4346683    66     0    66    66     0   inf   12
procpl       320   575995    0   575893    17     0    17    17     0   inf    7
zombiepl      72   575893    0   575893     1     0     1     1     0   inf    1
ucredpl       80   130009    0   129956     2     0     2     2     0   inf    0
pgrppl        24    21300    0    21263     1     0     1     1     0   inf    0
sessionpl     48    20671    0    20640     1     0     1     1     0   inf    0
pcredpl       24   575995    0   575893     2     0     2     2     0   inf    1
lockfpl       48    44081    0    44068     1     0     1     1     0   inf    0
filepl        48 16488323    0 16487571    14     0    14    14     0   inf    1
fdescpl      292   575996    0   575893    15     0    15    15     0   inf    7
pipepl        72   556958    0   556904     4     0     4     4     0   inf    3
sigapl       308   575985    0   575893    15     0    15    15     0   inf    7
wdcspl        96 22779417    0 22779417     1     0     1     1     0   inf    1
scxspl       128        4    0        4     1     0     1     1     0   inf    1
vnodes       192     2621    0        0   125     0   125   125     0   inf    0
nchpl         64     1310    0        0    21     0    21    21     0   inf    0
ffsino       280 11473213    0 11470601   187     0   187   187     0   inf    0
dirhash     1024   103554    0   103271   410     0   410   410     0   inf  337
semapl        64        2    0        2     1     0     1     1     0   inf    1
pfrulepl     560       40    0        0     6     0     6     6     0   inf    0
pfstatepl    244  4643351    0  4642339   156     0   156   156     0   625   52
pfaltqpl     128        9    0        0     1     0     1     1     0   inf    0
pfpooladdrpl  68       10    0        0     1     0     1     1     0   inf    0
pfrktable    248       41    0       40     1     0     1     1     0   inf    0
pfrkentry    152       79    0       16     3     0     3     3     0   inf    0
ipqepl        20  2607985    0  2607983     1     0     1     1     0   inf    0
tcpcbpl      360  4236651    0  4236030   113     0   113   113     0   inf   30
sackhlpl      20   913867    0   913864     1     0     1     1     0   inf    0
synpl        180  5228927    0  5228923    28     0    28    28     0   inf   27
plimitpl     152    55077    0    55055     2     0     2     2     0   inf    1
inpcbpl      216  4331550    0  4330911    70     0    70    70     0   inf   13
kqeuepl      192        4    0        3     1     0     1     1     0   inf    0
knotepl       64        8    0        6     1     0     1     1     0   inf    0
In use 3746K, total allocated 8116K; utilization 46.2%
============================================================================
I just copied the whole thing, because I don't have a clue which parts
of it are relevant.  I hope that's all right.
Here's an updated dmesg:
============================================================================
tem full
uid 1000 on /export: file system full
uid 1000 on /export: file system full
uid 1000 on /export: file system full
uid 1000 on /export: file system full
uid 1000 on /export: file system full
panic: uvm_mapent_alloc: out of static map entries, check MAX_KMAPENT (currently 1000)
Stopped at	Debugger+0x4:	leave	
RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC!
DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION!
ddb> sync        crash       dump        halt        reboot      poweroff    
ddb> No such command
ddb> No such command
ddb> rebooting...
OpenBSD 3.4-current (GENERIC) #2: Sat Feb  7 21:20:46 EST 2004
    [email protected]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: AMD Duron(tm)  ("AuthenticAMD" 686-class) 1.30 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE
real mem  = 536391680 (523820K)
avail mem = 491315200 (479800K)
using 4278 buffers containing 26923008 bytes (26292K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(00) BIOS, date 02/20/02, BIOS32 rev. 0 @ 0xfdb10
apm0 at bios0: Power Management spec V1.2
apm0: AC on, battery charge unknown
pcibios0 at bios0: rev. 2.1 @ 0xf0000/0x10000
pcibios0: PCI IRQ Routing Table rev. 1.0 @ 0xf8050/192 (10 entries)
pcibios0: no compatible PCI ICU found: ICU vendor 0x1106 product 0x3147
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc0000/0x8000
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "VIA VT8366 PCI" rev 0x00
ppb0 at pci0 dev 1 function 0 "VIA VT8366 AGP" rev 0x00
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "Nvidia Vanta" rev 0x15
wsdisplay0 at vga1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
dc0 at pci0 dev 10 function 0 "ADMtek AN983" rev 0x11: irq 10, address 00:0c:41:21:14:16
ukphy0 at dc0 phy 1: Generic IEEE 802.3u media interface
ukphy0: OUI 0x000749, model 0x0001, rev. 1
dc1 at pci0 dev 12 function 0 "ADMtek AN983" rev 0x11: irq 11, address 00:0c:41:21:19:40
ukphy1 at dc1 phy 1: Generic IEEE 802.3u media interface
ukphy1: OUI 0x000749, model 0x0001, rev. 1
pcib0 at pci0 dev 17 function 0 "VIA VT8233 ISA" rev 0x00
pciide0 at pci0 dev 17 function 1 "VIA VT82C571 IDE" rev 0x06: ATA133, channel 0 configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: <SAMSUNG SP8004H>
wd0: 16-sector PIO, LBA, 76351MB, 156368016 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <SAMSUNG, DVD-ROM SD-616T, F301> SCSI0 5/cdrom removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
uhci0 at pci0 dev 17 function 2 "VIA VT83C572 USB" rev 0x23: irq 12
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1 at pci0 dev 17 function 3 "VIA VT83C572 USB" rev 0x23: irq 12
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
auvia0 at pci0 dev 17 function 5 "VIA VT8233 AC97 Audio" rev 0x40: irq 10
ac97: codec id 0x414c4710 (Avance Logic ALC200)
ac97: codec features headphone, 18 bit DAC, 18 bit ADC, Realtek 3D
audio0 at auvia0
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
sysbeep0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
it0 at isa0 port 0x290/8: IT87
npx0 at isa0 port 0xf0/16: using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
biomask d040 netmask dc40 ttymask dcc2
pctr: user-level cycle counter enabled
mtrr: Pentium Pro MTRR support
dkcsum: wd0 matched BIOS disk 80
root on wd0a
rootdev=0x0 rrootdev=0x300 rawdev=0x302
WARNING: / was not properly unmounted
uhub0: port error, restarting port 1
uhub0: port error, giving up port 1
uhub0: port error, restarting port 2
uhub0: port error, giving up port 2
uhub1: port error, restarting port 1
uhub1: port error, restarting port 2
syncing disks... done
rebooting...
OpenBSD 3.4-current (PEGASUS) #0: Mon Feb 23 19:33:31 EST 2004
    [email protected]:/usr/src/sys/arch/i386/compile/PEGASUS
cpu0: AMD Duron(tm)  ("AuthenticAMD" 686-class) 1.30 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE
real mem  = 536391680 (523820K)
avail mem = 491216896 (479704K)
using 4278 buffers containing 26923008 bytes (26292K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(00) BIOS, date 02/20/02, BIOS32 rev. 0 @ 0xfdb10
apm0 at bios0: Power Management spec V1.2
apm0: AC on, battery charge unknown
pcibios0 at bios0: rev. 2.1 @ 0xf0000/0x10000
pcibios0: PCI IRQ Routing Table rev. 1.0 @ 0xf8050/192 (10 entries)
pcibios0: no compatible PCI ICU found: ICU vendor 0x1106 product 0x3147
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc0000/0x8000
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "VIA VT8366 PCI" rev 0x00
ppb0 at pci0 dev 1 function 0 "VIA VT8366 AGP" rev 0x00
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "Nvidia Vanta" rev 0x15
wsdisplay0 at vga1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
dc0 at pci0 dev 10 function 0 "ADMtek AN983" rev 0x11: irq 10, address 00:0c:41:21:14:16
ukphy0 at dc0 phy 1: Generic IEEE 802.3u media interface
ukphy0: OUI 0x000749, model 0x0001, rev. 1
dc1 at pci0 dev 12 function 0 "ADMtek AN983" rev 0x11: irq 11, address 00:0c:41:21:19:40
ukphy1 at dc1 phy 1: Generic IEEE 802.3u media interface
ukphy1: OUI 0x000749, model 0x0001, rev. 1
pcib0 at pci0 dev 17 function 0 "VIA VT8233 ISA" rev 0x00
pciide0 at pci0 dev 17 function 1 "VIA VT82C571 IDE" rev 0x06: ATA133, channel 0 configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: <SAMSUNG SP8004H>
wd0: 16-sector PIO, LBA, 76351MB, 156368016 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <SAMSUNG, DVD-ROM SD-616T, F301> SCSI0 5/cdrom removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
uhci0 at pci0 dev 17 function 2 "VIA VT83C572 USB" rev 0x23: irq 12
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1 at pci0 dev 17 function 3 "VIA VT83C572 USB" rev 0x23: irq 12
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
auvia0 at pci0 dev 17 function 5 "VIA VT8233 AC97 Audio" rev 0x40: irq 10
ac97: codec id 0x414c4710 (Avance Logic ALC200)
ac97: codec features headphone, 18 bit DAC, 18 bit ADC, Realtek 3D
audio0 at auvia0
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
sysbeep0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
it0 at isa0 port 0x290/8: IT87
npx0 at isa0 port 0xf0/16: using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
biomask d040 netmask dc40 ttymask dcc2
pctr: user-level cycle counter enabled
mtrr: Pentium Pro MTRR support
dkcsum: wd0 matched BIOS disk 80
root on wd0a
rootdev=0x0 rrootdev=0x300 rawdev=0x302
uhub0: port error, restarting port 1
uhub0: port error, giving up port 1
uhub0: port error, restarting port 2
uhub0: port error, giving up port 2
uhub1: port error, restarting port 1
uhub1: port error, restarting port 2
============================================================================
As you can see, the GENERIC kernel crashed on me (though I was hoping
that the MAX_KMAPENT problem would go away in 3.4... wishful thinking!).
So I set MAX_KMAPENT to 2000 again; that's the only change from GENERIC
to PEGASUS.
-- 
Greg Wooledge                  |   "Truth belongs to everybody."
[email protected]              |    - The Red Hot Chili Peppers
http://wooledge.org/~greg/     |

Attachment: signature.asc
Description: Digital signature