Ram disk causes crash logs to fail - need excludes



  • 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


  • Rebel Alliance Developer Netgate

    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.



  • 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.

  • Rebel Alliance Developer Netgate

    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



  • @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


  • Rebel Alliance Developer Netgate

    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.


Log in to reply