You are not logged in.

#1 2024-10-18 22:06:57

harvie
Member
From: Prague
Registered: 2015-01-20
Posts: 15
Website

PSTORE not working

Hello, i am trying to get pstore working, because i have crash like once a month and i want to see at least basic backtrace of crashed kernel.
I've tried to set pstore with EFI backend and it didn't worked. Then i've realized there is pstore_blk, which i like better, because i find block devices more straightforward than EFI subsystem. But it does not work either.

This is my kernel (linux-zen from official arch repo):

# uname -a
Linux arch 6.11.3-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Thu, 10 Oct 2024 20:11:02 +0000 x86_64 GNU/Linux
# zcat /proc/config.gz  | grep -i pstore
CONFIG_EFI_VARS_PSTORE=y
CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE=y
CONFIG_MTD_PSTORE=m
CONFIG_CHROMEOS_PSTORE=m
CONFIG_PSTORE=y
CONFIG_PSTORE_DEFAULT_KMSG_BYTES=10240
CONFIG_PSTORE_COMPRESS=y
# CONFIG_PSTORE_CONSOLE is not set
# CONFIG_PSTORE_PMSG is not set
# CONFIG_PSTORE_FTRACE is not set
CONFIG_PSTORE_RAM=m
CONFIG_PSTORE_ZONE=m
CONFIG_PSTORE_BLK=m
CONFIG_PSTORE_BLK_BLKDEV=""
CONFIG_PSTORE_BLK_KMSG_SIZE=64
CONFIG_PSTORE_BLK_MAX_REASON=2

Here's how iam trying to set it up:

# modprobe pstore_blk blkdev=/dev/mmcblk0 kmsg_size=64 console_size=64 pmsg_size=64 ftrace_size=64 max_reason=0 best_effort=y
# cat /sys/module/pstore/parameters/backend 
pstore_blk
# cat /sys/module/printk/parameters/always_kmsg_dump
Y
# cat /sys/module/kernel/parameters/crash_kexec_post_notifiers
Y
# echo "<1>THIS IS A TEST" > /dev/kmsg
# echo c > /proc/sysrq-trigger

At this point system is crashed with panic. I hold power button to reboot it and i try to read the pstore:

# modprobe pstore_blk blkdev=/dev/mmcblk0 kmsg_size=64 console_size=64 pmsg_size=64 ftrace_size=64 max_reason=0 best_effort=y
# mount | grep pstore
pstore on /sys/fs/pstore type pstore (rw,relatime)
# ls -la /sys/fs/pstore/ /var/lib/systemd/pstore/

There is nothing in those directories. (First one is provided by kernel, the second one is where systemd-pstore would move the data if it did found some).

Do you please have any idea what i am doing wrong?

Offline

Board footer

Powered by FluxBB