oops pstore blk device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Everyone!

I'm not sure, if I used, the correct mailing list, but I hope that's
the right one. Because it's related to filesystem.

I would like to get running the pstore feature for iMX8 CPU with kernel
5.10.9 . Basically I followed the 3 variants of documentation.
 - the official one:
https://www.kernel.org/doc/html/latest/admin-guide/pstore-blk.html
 - the android one:
http://huaqianlee.github.io/2020/11/13/Android/pstore/
 - the complex one:
https://github.com/gmpy/articles/blob/master/pstore/Test-Pstore-Block.md
but ... nothing have been working .

I will summarize the steps what I did:
 1. created an empty device (fdisk) without any partition format
(~1GB), mmcblk0p4

 2. modified the DTB, to reserve some memory:
>  reserved-memory {
>    #address-cells = <2>;
>    #size-cells = <2>;
>    ranges;
>
>    /* global autoconfigured region for contiguous allocations */
>    linux,cma {
>        compatible = "shared-dma-pool";
>        reusable;
>        size = <0 0x3c000000>;
>        alloc-ranges = <0 0x96000000 0 0x3c000000>;
>        linux,cma-default;
>    };
>
>    ramoops: ramoops@ffc00000 {
>        compatible = "removed-dma-pool", "ramoops";
>        no-map;
>        reg = <0 0xffc00000 0 0x00100000>;
>        record-size = <0x1000>;
>        console-size = <0x40000>;
>        ftrace-size = <0x0>;
>        msg-size = <0x20000 0x20000>;
>        cc-size = <0x0>;
>    };
>};

 3. enabled feature via defconfig (see .config feature):
>CONFIG_PSTORE=y
># CONFIG_PSTORE_DEFLATE_COMPRESS is not set
># CONFIG_PSTORE_LZO_COMPRESS is not set
># CONFIG_PSTORE_LZ4_COMPRESS is not set
># CONFIG_PSTORE_LZ4HC_COMPRESS is not set
># CONFIG_PSTORE_842_COMPRESS is not set
># CONFIG_PSTORE_ZSTD_COMPRESS is not set
>CONFIG_PSTORE_CONSOLE=y
>CONFIG_PSTORE_PMSG=y
>CONFIG_PSTORE_FTRACE=y
>CONFIG_PSTORE_RAM=y
>CONFIG_PSTORE_ZONE=m
>CONFIG_PSTORE_BLK=m
>CONFIG_PSTORE_BLK_BLKDEV=""
>CONFIG_PSTORE_BLK_KMSG_SIZE=64
>CONFIG_PSTORE_BLK_MAX_REASON=2
>CONFIG_PSTORE_BLK_PMSG_SIZE=64
>CONFIG_PSTORE_BLK_CONSOLE_SIZE=64
>CONFIG_PSTORE_BLK_FTRACE_SIZE=64
>...
>CONFIG_DEBUG_FS=y
>CONFIG_DEBUG_FS_ALLOW_ALL=y
># CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set
># CONFIG_DEBUG_FS_ALLOW_NONE is not set
>CONFIG_HAVE_ARCH_KGDB=y
>CONFIG_DEBUG_KERNEL=y
>CONFIG_DEBUG_MISC=y
>
># CONFIG_DEBUG_SHIRQ is not set
>
>#
># Debug Oops, Lockups and Hangs
>#
>CONFIG_PANIC_ON_OOPS=y
>CONFIG_PANIC_ON_OOPS_VALUE=1
>CONFIG_PANIC_TIMEOUT=20
>CONFIG_LOCKUP_DETECTOR=y
>CONFIG_SOFTLOCKUP_DETECTOR=y
>CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
>CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=1
>CONFIG_DETECT_HUNG_TASK=y
>CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
>CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
>CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=1
>CONFIG_WQ_WATCHDOG=y
># CONFIG_TEST_LOCKUP is not set
># end of Debug Oops, Lockups and Hangs

 4. modprobe pstore_blk blkdev=/dev/mmcblk0p4
  - lsmod showed, that pstore_blk + pstore_zone modules have been
loaded
  - nothing has been written into dmesg\

 5. ls /sys/fs/pstore was empty, even if it was mounted
 
 6. echo 1 > /sys/kernel/debug/pstore/record_ftrace
  - /sys/kernel/debug/ - mounted
  - /sys/kernel/debug/pstore - path doesn't exist (which is little bit
strange to me)

 7. echo c > /proc/sysrq-trigger
  - system was rebooted, but nothing has been written somewhere

 8. changed to built-in option, without module using
  - CONFIG_PSTORE_BLK_BLKDEV="b304"
   - still the same results ...

So what I'm trying to get is, when some core module crash..., I would
like to have the dump. I think, that I don't need the ramoops, it was
just an example to get something working.

- How to reproduce the things from documentation?
- Is it possible to get it working not only for custom modules?
- What I'm doing wrong?

Many thanks for any advice,
Andrej




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux