[TrueNAS] Problems with getting a crash dump

hi there, my truenas freebsd 13.1 based system seem to crash and im on to debug the same together with the freeBSD support. Any how im not able to grab a real good dump on my crashing system.
root@freenas[~]# uname -a
Code:
FreeBSD freenas.local 13.1-BETA3 FreeBSD 13.1-BETA3 truenas/13-stable-4832c07ef TRUENAS amd64
What I tried so far:

-> Attached a 50GB blank disk to dump on
-> I run "dumpon /dev/da2" after boot to set it as dump device

After crash I get this:

Code:
root@freenas[~]# savecore -vC /dev/da2
checking for kernel dump on device /dev/da2
mediasize = 53687091200 bytes
sectorsize = 512 bytes
magic mismatch on last dump header on /dev/da2
No dump exists

Code:
root@freenas[~]# savecore -vC /dev/da15p1
checking for kernel dump on device /dev/da15p1
mediasize = 2147483648 bytes
sectorsize = 512 bytes
textdump magic on last dump header on /dev/da15p1

if I try to save the dump
Code:
root@freenas[~]# savecore -fkvz -m 1 /mnt/Path /dev/da15p1
checking for kernel dump on device /dev/da15p1
mediasize = 2147483648 bytes
sectorsize = 512 bytes
textdump magic on last dump header on /dev/da15p1
Checking for available free space
bounds number: 1
Dump header from device: /dev/da15p1
  Architecture: amd64
  Architecture Version: 4
  Dump Length: 0
  Blocksize: 512
  Compression: none
  Dumptime: 2022-04-15 15:50:45 +0200
  Hostname: freenas.local
  Magic: FreeBSD Text Dump
  Version String: FreeBSD 13.1-BETA3 truenas/13-stable-4832c07ef TRUENAS
  Panic String: Bad link elm 0xfffff804c0d8a000 next->prev != elm
  Dump Parity: 1041631048
  Bounds: 0
  Dump Status: bad

dump saved

but its empty.

Any ideas?

Thanks!

Edit: for reference PR 262894
 
Last edited by a moderator:
If memory serves me right(corrections welcome), the usb drivers are not able to create dumps from a kernel. Please try with a disk directly connected to a host port.
 
It's a virtual machine on a hyper V host with a HBA passed though. No USB devices. The new disk for the dump was created regular as a hyper v disk and directly attached to the VM. I can also try dumping to a 8TB Samsung disk which is unused and connected on the HBA as well.

Edit:
I tired it with the 8Tb disk and forced to crash with "sysctl debug.kdb.panic=1"

View attachment 13636

If i set debug.debugger_on_panic=0 its a bit different as it seems

View attachment 13637

even so the saving was done almost instantly (would have thought it may have 32Gb as memory size) it says it was successfully saved

Code:
root@freenas[~]# savecore -fkvz -m 1 /mnt/path /dev/da2
checking for kernel dump on device /dev/da2
mediasize = 53687091200 bytes
sectorsize = 512 bytes
textdump magic on last dump header on /dev/da2
Checking for available free space
bounds number: 1
Dump header from device: /dev/da2
  Architecture: amd64
  Architecture Version: 4
  Dump Length: 531968
  Blocksize: 512
  Compression: none
  Dumptime: 2022-04-16 10:23:48 +0200
  Hostname: freenas.local
  Magic: FreeBSD Text Dump
  Version String: FreeBSD 13.1-BETA3 truenas/13-stable-4832c07ef TRUENAS
  Panic String: kdb_sysctl_panic
  Dump Parity: 2134722883
  Bounds: 0
  Dump Status: good
531968
dump saved
root@freenas[~]#

but it still seems to be only a textdump, no real memory dump
 
Last edited by a moderator:
so in detail, no matter if usb or not (its not), what will I have to push to console "set variables after boot" to grab a full dump in the next crash? thx
 
Back
Top