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

    Ram disk causes crash logs to fail - need excludes

    General pfSense Questions
    2
    6
    205
    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.
    • G
      gwaitsi
      last edited by

      I have 4G of RAM. and a 120G SSD drive
      I set the RAM disk to be 512M for /tmp and 256M for /var.

      If i understand properly, crash core save will save the entire memory i.e. 4G.
      this of course is not possible with a ramdisk, not withstanding the fact the system crashed.

      Notably, upon booting. i get the error message
      "dump directory does not exist. savecore not run."

      As soon as i turn RAM Disk off, the error disappears and it works.

      It seems Ram Disk moving /var and /tmp is insufficient, there needs to be the option for explicit excludes

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        A crash dump only saves a small textdump, not the whole RAM dump.

        More likely is that the RAM disk config portion of the startup script needs to create /var/crash just after making the RAM disk. Assuming it happens in that order. It's possible that due to the order of how things boot up that it may not be possible to save the crash dump with RAM disks on. I'd have to go digging in the code to find out.

        Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 1
        • G
          gwaitsi
          last edited by

          yeh....you are probably right.

          • after i disabled ram disk, the /var/crash is created.
          • when i re-enable ram disk, the /var/crash is no longer there.
          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            Try the attached patch, it may take care of it. It's just a one-line change so you can either make it by hand or use the System Patches package to apply the patch.

            If it works, I'll commit this change.

            ramdisk-crashdumpfix.diff

            Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            G 1 Reply Last reply Reply Quote 0
            • G
              gwaitsi @jimp
              last edited by

              @jimp thanks, that worked on production and in the test environment using the system patches package.
              directory created, logs clear.

              Do you know which dmi fields are being used at this stage where the warning is being generated?
              the system has a UUID in dmi. but i guess this is related to a specific component in the boot process.

              eapeipfw-test check_reload_status: Updating all dyndns
              eapeipfw-test kernel: ....
              eapeipfw-test kernel: .done.
              eapeipfw-test php-cgi: rc.bootup: Creating rrd update script
              eapeipfw-test kernel: done.
              eapeipfw-test root: /etc/rc.d/hostid: WARNING: hostid: unable to figure out a UUID from DMI data, generating eapeipfw-test syslogd: exiting on signal 15
              eapeipfw-test syslogd: kernel boot file is /boot/kernel/kernel

              cheers

              1 Reply Last reply Reply Quote 0
              • jimpJ
                jimp Rebel Alliance Developer Netgate
                last edited by

                OK, I committed that /var/crash fix. I opened an issue to track it at https://redmine.pfsense.org/issues/9409

                That UUID issue would be a topic for a fresh thread.

                Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post