Wind River Support Network

HomeDefectsLIN1022-943
Fixed

LIN1022-943 : Kernel bug occurred during flash_char_block testing on Stratix10

Created: Jul 14, 2022    Updated: Oct 20, 2022
Resolved Date: Oct 20, 2022
Found In Version: 10.22.33.1
Fix Version: 10.22.33.2
Severity: Standard
Applicable for: Wind River Linux LTS 22
Component/s: BSP

Description

kernel BUG at drivers/mtd/mtdcore.c:1221!
kernel BUG at drivers/mtd/mtdcore.c:1221!
Internal error: Oops - BUG: 0 1 PREEMPT_RT SMP
Modules linked in: sch_fq_codel openvswitch nsh nf_conncount nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 fuse [last unloaded: dmatest]
CPU: 0 PID: 15349 Comm: mtd-test Not tainted 5.15.52-rt41-yocto-preempt-rt #1
Hardware name: SoCFPGA Stratix 10 SoCDK (DT)
pstate: 60000005put_mtd_device+0x4c/0x84
lr : blktrans_release+0xb0/0x120
sp : ffff80000a693c00
x29: ffff80000a693c00 x28: 0000000000000004 x27: 0000000000000000
x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000
x23: ffff0001804fa960 x22: ffff00018292d690 x21: ffff00018292d600
x20: ffff00018294a420 x19: ffff000182424880 x18: 0000000000000000
x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
x11: 0000000000000000 x10: 0000000000000000 x9 : ffff800008831340
x8 : ffff80000a693c90 x7 : 0000000000000000 x6 : 0000000000000001
x5 : ffff000180d36ce8 x4 : 0000000000000000 x3 : 0000000000000000
x2 : ffff000182426000 x1 : 00000000ffffffff x0 : ffff000182424880
Call trace:
__put_mtd_device+0x4c/0x84
blktrans_release+0xb0/0x120
blkdev_put+0xd4/0x210
blkdev_close+0x34/0x50
__fput+0x8c/0x240
____fput+0x1c/0x30
task_work_run+0x98/00t_64_sync_handler+0xa4/0x130
el0t_64_sync+0x1a0/0x1a4
Code: b944d841 51000421 b904d841 36ffff41 (d4210000)
--{-}[ end trace 0000000000000002 ]{-}--
printk: enabled sync mode
Internal error: Oops - BUGempt_count 1
Modules linked in: sch_fq_codel openvswitch nsh nf_conncount nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 fuse [last unloaded: dmatest]
printk: console [ttyS0]: printing thread stopped
-----------{-}[ cut here ]{-}-----------
CPU: 3 PID: 15348 Comm: mtd-test Tainted: G D 5.15.52-rt41-yocto-preempt-rt #1
WARNING: CPU: 0 PID: 0 at kernel/rcu/tree.c:613 rcu_eqs_enter.constprop.0+0xa4/0x104
Hardware name: SoCFPGA Stratix 10 SoCDK (DT)
Modules linked in: sch_fq_codel openvswitch nsh nf_conncount nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 fuse [last unloaded: dmatest]
pstate: 60000005 (nZCv daif {-}PAN -UAO -TCO -DIT -SSBS BTYPE={-}-)
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G D 5.15.52-rt41-yocto-preempt-rt #1
pc : __put_mtd_device+0x4c/0x84
Hardware name: SoCFPGA Stratix 10 SoCDK (DT)
lr : put_mtd_device+0x38/0x50
pstate: 200003c5 (nzCv DAIF {-}PAN -UAO -TCO -DIT -SSBS BTYPE={-}-)
sp : ffff80000a76bc30
pc : rcu_eqs_enter.constprop.0+0xa4/0x104
x29: ffff80000a76bc30 x28: 0000000000000004 x27: 0000000000000000
lr : rcu_eqs_enter.constprop.0+0x14/0x104
x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000
sp : ffff8000093a3d30
x23: ffff0001804fa780 x22: ffff00018253a520 x21: ffff000182426000
x29: ffff8000093a3d30 x28: 0000000002fc0018 x27: 000000007ff42d38
x20: ffff000182426000 x19: ffff000182424880 x18: 0000000000000000
x26: 0000000000000000 x25: ffff8000093b2640 x24: 0000000000000000
x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
x23: 0000000000000000 x22: ffff8000090ac3e8 x21: ffff800009a6d4c8
x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
x20: ffff800009554b80 x19: ffff0001ff77e500 x18: 0000000000000038
x11: 0000000000000000 x10: 0000000000000000 x9 : ffff8000088287cc
x17: 0000000000000002 x16: 0000000000000002 x15: 0140cfe52d6b4a28
x8 : ffff80000a76bc90 x7 : 0000000000000000 x6 : 0000000000000001
x14: 0000000000000000 x13: 0000000000000001 x12: ffff0001ff7c8940
x5 : ffff000180d36618 x4 : ffff800009a72f48 x3 : 0000000000000000
x11: 0000000000000000 x10: 0000000000000a20 x9 : ffff800008c9f730
x2 : ffff000182426000 x1 : 00000000ffffffff x0 : ffff000182424880
x8 : ffff8000093b30c0 x7 : 000000000001c5d5 x6 : 000001abc74b4ac5
Call trace:
x5 : 00000000410fd030 x4 : 0000000000000001 x3 : ffff80000909f008
__put_mtd_device+0x4c/0x84
x2 : 4000000000000000 x1 : ffff8000093ac290 x0 : 4000000000000002
put_mtd_device+0x38/0x50
Call trace:
mtdchar_close+0x3c/0x84
rcu_eqs_enter.constprop.0+0xa4/0x104
__fput+0x8c/0x240
rcu_idle_enter+0x1c/0x30
____fput+0x1c/0x30
default_idle_call+0x50/0x1d8
task_work_run+0x98/0xe0
do_idle+0x210/0x280
do_notify_resume+0x3cc/0x14e0
cpu_startup_entry+0x30/0x60
el0_svc+0x6c/0x80
rest_init+0xe8/0x100
el0t_64_sync_handler+0xa4/0x130
arch_call_rest_init+0x1c/0x28
el0t_64_sync+0x1a0/0x1a4
start_kernel+0x704/0x744
Code: b944d841 51000421 b904d841 36ffff41 (d4210000)
__primary_switched+0xa4/0xac
--{-}[ end trace 0000000000000003 ]{-}--
--{-}[ end trace 0000000000000004 ]{-}--

Message from syslogd@intel-socfpga-64 at Apr 28 19:24:57 ...

kernel:Internal error: Oops - BUG: 0 1 PREEMPT_RT SMP

Message from syslogd@intel-socfpga-64 at Apr 28 19:24:57 ...

kernel:Code: b944d841 51000421 b904d841 36ffff41 (d4210000)

Message from syslogd@intel-socfpga-64 at Apr 28 19:24:57 ...

kernel:Internal error: Oops - BUG: 0 2 PREEMPT_RT SMP

Message from syslogd@intel-socfpga-64 at Apr 28 19:24:59 ...

kernel:Code: b944d841 51000421 b904d841 36ffff41 (d4210000)

printk: enabled sync mode
note: mtd-test[15348] exited with preempt_count 1
BUG: sleeping function called from invalid context at include/linux/percpu-rwsem.h:49
in_atomic(): 0, irqs_disabled(): 128, non_block: 0, pid: 15348, name: mtd-test
preempt_count: 0, expected: 0
RCU nest depth: 0, expected: 0
CPU: 3 PID: 15348 Comm: mtd-test Tainted: G D W 5.15.52-rt41-yocto-preempt-rt #1
Hardware name: SoCFPGA Stratix 10 SoCDK (DT)
Call trace:
dump_backtrace+0x0/0x1a0
show_stack+0x24/0x30
dump_stack_lvl+0x7c/0xa0
dump_stack+0x18/0x34
__might_resched+0x160/0x1c0
__might_sleep+0x58/0x90
exit_signals+0x30/0x1d4
do_exit+0xcc/0xa00
die+0x200/0x23c
bug_handler+0x58/0x80
call_break_hook+0x70/0x84
brk_handler+0x28/0x6c
do_debug_exception+0xc8/0x14c
el1_dbg+0x7c/0xa0
el1h_64_sync_handler+0x94/0xd0
el1h_64_sync+0x78/0x7c
__put_mtd_device+0x4c/0x84
put_mtd_device+0x38/0x50
mtdchar_close+0x3c/0x84
__fput+0x8c/0x240
____fput+0x1c/0x30
task_work_run+0x98/0xe0
do_notify_resume+0x3cc/0x14e0
el0_svc+0x6c/0x80
el0t_64_sync_handler+0xa4/0x130
el0t_64_sync+0x1a0/0x1a4

Steps to Reproduce

1.build project:

 

 

/lpg-build/cdc/fast_prod/WRL10_22/WRL10_22_GIT/wrlinux-10/setup.sh
 --machines=intel-socfpga-64 --distros=wrlinux --dl-layers --accept-eula=yes

. ./environment-setup-x86_64-wrlinuxsdk-linux
. ./oe-init-build-env build_test

bitbake-layers add-layer /net/pek-lpgtest20/buildarea1/renfeiqu/10_22/testcases/wr-testing/bts-dev/

echo "require templates/feature/bts/template.conf" >> conf/local.conf

echo BB_NUMBER_THREADS ?= \"24\" >> conf/local.conf

echo PARALLEL_MAKE ?= \"-j 24\" >> conf/local.conf

echo "WRTEMPLATE:append = \" feature/docker feature/target-toolchain \"" >> conf/local.conf

bitbake wrlinux-image-std

 

 2. run the testcase:
/opt/wr-test/main_test.py -k flash_char_block:"mtd1" -q 
Live chat
Online