Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Sudden restart

    Scheduled Pinned Locked Moved General pfSense Questions
    9 Posts 3 Posters 3.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      ssbaksa
      last edited by

      One of mine firewalls restarted and this is what I have i log file:

      Jan  2 01:35:22 zidic syslogd: kernel boot file is /boot/kernel/kernel
      Jan  2 01:35:22 zidic kernel: panic: kmem_malloc(4096): kmem_map too small: 335544320 total allocated
      Jan  2 01:35:22 zidic kernel: cpuid = 0
      Jan  2 01:35:22 zidic kernel: Uptime: 8d6h54m53s
      Jan  2 01:35:22 zidic kernel: Cannot dump. No dump device defined.
      Jan  2 01:35:22 zidic kernel: Automatic reboot in 15 seconds - press a key on the console to abort
      Jan  2 01:35:22 zidic kernel: Rebooting…
      Jan  2 01:35:22 zidic kernel: cpu_reset: Stopping other CPUs
      Jan  2 01:35:22 zidic kernel: Copyright (c) 1992-2007 The FreeBSD Project.
      Jan  2 01:35:22 zidic kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
      Jan  2 01:35:22 zidic kernel: The Regents of the University of California. All rights reserved.
      Jan  2 01:35:22 zidic kernel: FreeBSD is a registered trademark of The FreeBSD Foundation.
      Jan  2 01:35:22 zidic kernel: FreeBSD 6.2-RELEASE-p11 #0: Sun Feb 24 16:49:14 EST 2008
      Jan  2 01:35:22 zidic kernel: sullrich@builder6.pfsense.com:/usr/obj.pfSense/usr/src/sys/pfSense_SMP.6
      Jan  2 01:35:22 zidic kernel: acpi_alloc_wakeup_handler: can't alloc wake memory
      Jan  2 01:35:22 zidic kernel: Timecounter "i8254" frequency 1193182 Hz quality 0
      Jan  2 01:35:22 zidic kernel: CPU: Intel(R) Xeon(R) CPU          X3220  @ 2.40GHz (2396.41-MHz 686-class CPU)
      Jan  2 01:35:22 zidic kernel: Origin = "GenuineIntel"  Id = 0x6fb  Stepping = 11
      Jan  2 01:35:22 zidic kernel: Features=0xbfebfbff <fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,htt,tm,pbe>Jan  2 01:35:22 zidic kernel: Features2=0xe3bd<sse3,rsvd2,mon,ds_cpl,vmx,est,tm2,<b9>,CX16,<b14>,<b15>>
      Jan  2 01:35:22 zidic kernel: AMD Features=0x20100000 <nx,lm>Jan  2 01:35:22 zidic kernel: AMD Features2=0x1 <lahf>Jan  2 01:35:22 zidic kernel: Cores per package: 4

      Is there a way to prewnt that?

      Sasa</lahf></nx,lm></b15></b14></sse3,rsvd2,mon,ds_cpl,vmx,est,tm2,<b9></fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,htt,tm,pbe>

      1 Reply Last reply Reply Quote 0
      • Cry HavokC
        Cry Havok
        last edited by

        You need to find the problem and resolve it.  It could be anything from a power glitch, dodgy RAM, bad luck or somebody bumping the reset button ;)

        Do you have anything else in the logs?  I'd only worry about it if it happens again.

        1 Reply Last reply Reply Quote 0
        • S
          ssbaksa
          last edited by

          @Cry:

          You need to find the problem and resolve it.  It could be anything from a power glitch, dodgy RAM, bad luck or somebody bumping the reset button ;)

          Do you have anything else in the logs?  I'd only worry about it if it happens again.

          No there is no other useful data in the logs. Firewall is located in server room which is locked. 4 other servers are on the same power line but they are
          running just fine. My first thought was also power glitch but there was none. Only one suspicious message:

          Jan  2 01:35:22 zidic kernel: panic: kmem_malloc(4096): kmem_map too small: 335544320 total allocated
          Jan  2 01:35:22 zidic kernel: cpuid = 0
          Jan  2 01:35:22 zidic kernel: Uptime: 8d6h54m53s
          Jan  2 01:35:22 zidic kernel: Cannot dump. No dump device defined.
          Jan  2 01:35:22 zidic kernel: Automatic reboot in 15 seconds - press a key on the console to abort
          Jan  2 01:35:22 zidic kernel: Rebooting…

          Is there a way to allocate more memory. Also, I have big disc on that machine. Could I have log rotation (keep the old logs for a week maybe?)?

          Sasa

          1 Reply Last reply Reply Quote 0
          • W
            wallabybob
            last edited by

            It's a while since I've looked at the kernel memory allocation code in FreeBSD 6.x. My recollection is that kmap (kernel map) is an area of memory reserved to allow the paging system to map a certain total amount of physical memory (including PCI device registers) so its available to the kernel. The panic is likely because the kernel wanted more than that amount of memory. I suspect the most likely cause is a memory leak - some part of the kernel request allocation of memory but fails to return it and forgets that it has that memory allocated. You could monitor this periodically (say daily) issuing the following shell commands:

            sysctl vm.kmem_size

            sysctl kern.malloc

            which should display (in the first case) the amount of physical memory (not just RAM) is in use by the kernel and (in the second case) a breakdown of the different types of dynamically allocated memory in use by the kernel. You would be likely to see fairly rapid growth of the numbers during startup but they should stabilise by the time you have run your "normal" workload for a couple of hours. Any category that continues to grow over an extended period would be cause for concern.

            You might like to try pfSense 1.2.1 which is based on FreeBSD 7.0 which may have fixed the problem you have seen. If you want to monitor the memory use on pfSense 1.2.1 you should use the three commands

            sysctl vm.kmem_size

            vmstat -m

            netstat -m

            1 Reply Last reply Reply Quote 0
            • S
              ssbaksa
              last edited by

              @wallabybob:

              You might like to try pfSense 1.2.1 which is based on FreeBSD 7.0 which may have fixed the problem you have seen. If you want to monitor the memory use on pfSense 1.2.1 you should use the three commands

              sysctl vm.kmem_size

              vmstat -m

              netstat -m

              TNX for all info. I will try that. This is a very busy system at uni so I need good reason for re installation.

              I must say that this is first problem with kernel that I have on pfS. All problems, so far, have been with hardware malfunction (mainly disks and NIC's).
              This is Intel server board with quad core Xeon and 2 GB of RAM in 1U form housing (all Intel orig.)

              Sasa

              1 Reply Last reply Reply Quote 0
              • W
                wallabybob
                last edited by

                @ssbaksa:

                I will try that. This is a very busy system at uni so I need good reason for re installation.

                Given the RAM you have and the workload it would probably be very worthwhile to expand the allowed kernel memory size. I don't remember the details offhand but I'll look it up and post it here in the next 18 hours. Do you have any packages installed? If so, which packages?

                1 Reply Last reply Reply Quote 0
                • S
                  ssbaksa
                  last edited by

                  @wallabybob:

                  Given the RAM you have and the workload it would probably be very worthwhile to expand the allowed kernel memory size. I don't remember the details offhand but I'll look it up and post it here in the next 18 hours. Do you have any packages installed? If so, which packages?

                  No packages. Just bare system with IPSec for roadwariors and few VLAN's (10 for now). This project is in transition phase now. Only classroom's are on private network for now and all other computers and servers (except 4 new ones) are on bridged (DMZ) segment with public address assigned.

                  Sasa

                  1 Reply Last reply Reply Quote 0
                  • W
                    wallabybob
                    last edited by

                    In /boot/loader.conf you could add the line

                    vm.kmem_size="768M"

                    to set the physical memory available to the kernel to 768MB.

                    Forget about monitoring vm.kmem_size; it won't change. I was confusing it with something else. Sorry! The other commands are still useful for monitoring how much of the available memory is in use.

                    1 Reply Last reply Reply Quote 0
                    • S
                      ssbaksa
                      last edited by

                      @wallabybob:

                      In /boot/loader.conf you could add the line

                      vm.kmem_size="768M"

                      to set the physical memory available to the kernel to 768MB.
                      Forget about monitoring vm.kmem_size; it won't change. I was confusing it with something else. Sorry! The other commands are still useful for monitoring how much of the available memory is in use.

                      TNX. Will try.

                      BR

                      Sasa

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.