Site Tools


software:freebsd:kernel_debug

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revisionBoth sides next revision
software:freebsd:kernel_debug [2018/11/05 02:30]
– создано root
software:freebsd:kernel_debug [2022/02/04 18:33]
– removed - external edit (Unknown date) 127.0.0.1
Line 1: Line 1:
-====== Опции и параметры необходимые для получения coredump ядра ====== 
  
-Актуально для FreeBSD 11.2, 12.0 
- 
-===== Конфиг ядра ===== 
-Должен содержать: 
-<code> 
-options GZIO #m zlib I/O stream support. Enables support for compressed core dumps. 
- 
-# Debugging support. Always need this: 
-makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols 
-options HWPMC_HOOKS #oD Necessary kernel hooks for hwpmc(4) 
-options KDB #oD Enable kernel debugger support, rquied for DDB, GDB. Little or no performance overhead. 
-options KDB_TRACE #oD Set debug.trace_on_panic=1 - Print a stack trace for a panic. 
-options KDB_UNATTENDED #oD Set debug.debugger_on_panic=0 - reboot. 
-options KTRACE #oD ktrace(1) support 
-options STACK #oD stack(9) support 
-options PANIC_REBOOT_WAIT_TIME=16 #o Set the amount of time (in seconds) the system will wait before rebooting automatically when a kernel panic occurs. (-1) = inf 
-</code> 
- 
-===== Настройки системы ===== 
-==== /etc/rc.conf ==== 
-<code># Debug 
-dumpdev="AUTO" # Device to crashdump to (device name, AUTO, or NO). 
-dumpon_flags="-z" # Options to pass to dumpon(8), followed by dumpdev. 
-savecore_enable="YES" # Extract core from dump devices if any 
-savecore_flags="-z -v -m 16" # Used if dumpdev is enabled above, and present. 
-crashinfo_enable="YES" # Automatically generate crash dump summary. 
-</code> 
- 
-==== /etc/sysctl.conf ==== 
-<code># Debug kernel 
-debug.minidump=1 # Enable mini crash dumps 
-kern.sync_on_panic=0 # Do a sync before rebooting from a panic / 0 - required for coredump write 
-kern.panic_reboot_wait_time=16 # Seconds to wait before rebooting after a panic 
-kern.kerneldump_gzlevel=3 # Kernel crash dump compression level 
-</code> 
- 
-==== /etc/src.conf ==== 
-<code>WITH_KERNEL_SYMBOLS= 
-# Set to not install kernel symbol files. 
-</code> 
-Либо файл /etc/src.conf должен отсутствовать, либо в нём не должно быть WITHOUT_KERNEL_SYMBOLS= 
- 
-==== /etc/fstab ==== 
-Вариант с шифрованным swap: 
-<code>/dev/gptid/0714a812-b98e-11e8-a831-7085c2375722.eli none swap sw,late,ealgo=AES-XTS,keylen=256,sectorsize=4096 0 0 
-</code> 
- 
-Обычный swap: 
-<code>/dev/ada1p1 none swap sw 0 0</code> 
software/freebsd/kernel_debug.txt · Last modified: 2022/02/06 12:42 by root