Wind River Support Network

HomeDefectsCGP8-392
Fixed

CGP8-392 : Kernel reboots after writing to /sys/module/nf_conntrack/parameters/hashsize

Created: Oct 10, 2018    Updated: Dec 14, 2018
Resolved Date: Oct 31, 2018
Previous ID: SCP8-351
Found In Version: 8.0.0.27
Severity: Standard
Applicable for: Wind River Linux 8
Component/s: Kernel

Description

Errors while writing to /sys/module/nf_conntrack/parameters/hashsize when  CONFIG_PREEMPT=y as kernel option

Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: DEBUG_LOCKS_WARN_ON((preempt_count() & PREEMPT_MASK) >= PREEMPT_MASK - 10)
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: Modules linked in: boardctrl(O) softdog tipc ip6_udp_tunnel udp_tunnel pmemfs bonding ipmi_poweroff ipmi_devintf ipmi_si ipmi_msghandler lpc_ich sch_fq_codel [last unloaded: ipmi_watchdog]
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: CPU: 0 PID: 406 Comm: bash Tainted: G O 4.1.21-WR0.1_cgl #15
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: Hardware name: Emerson Network Power - Embedded Computing, Inc. GBRY52LA/GBRY52LA, BIOS 1.3.07 X64 01/13/2014
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: 0000000000000000 ffff8807fc6c3cb8 ffffffff81929d9a ffff8807fc6c3d08
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: ffffffff81c919b8 ffff8807fc6c3cf8 ffffffff810a722a 0000000000000002
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: 0000000000000001 ffffffff81e0b600 ffff8807fc1e0838 ffff8807fc580000
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: Call Trace:
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: [] dump_stack+0x4f/0x65
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: [] warn_slowpath_common+0x8a/0xc0
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: [] warn_slowpath_fmt+0x46/0x50
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: [] preempt_count_add+0x84/0xc0
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: [] _raw_spin_lock+0x1b/0x60
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: [] nf_conntrack_set_hashsize+0xac/0x240
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: [] param_attr_store+0x4a/0xa0
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: [] module_attr_store+0x1e/0x30
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: [] sysfs_kf_write+0x3a/0x50
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: [] kernfs_fop_write+0x127/0x180
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: [] __vfs_write+0x18/0x40
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: [] vfs_write+0xa4/0x1b0
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: [] SyS_write+0x4a/0xc0
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: [] system_call_fastpath+0x16/0x6e
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: ---[ end trace d9fbbe4bd255f319 ]---

This is followed by many "scheduling while atomic" logs such as:
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: BUG: scheduling while atomic: bash/406/0x00000401
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: Modules linked in: boardctrl(O) softdog tipc ip6_udp_tunnel udp_tunnel pmemfs bonding ipmi_poweroff ipmi_devintf ipmi_si ipmi_msghandler lpc_ich sch_fq_codel [last unloaded: ipmi_watchdog]
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: Preemption disabled at:[] param_attr_store+0x4a/0xa0
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel:
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: CPU: 0 PID: 406 Comm: bash Tainted: G W O 4.1.21-WR0.1_cgl #15
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: Hardware name: Emerson Network Power - Embedded Computing, Inc. GBRY52LA/GBRY52LA, BIOS 1.3.07 X64 01/13/2014
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: 0000000000000000 ffff8807fc6c3ec0 ffffffff81929d9a 0000000000015ec0
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: ffff88080fa15ec0 ffff8807fc6c3ed0 ffffffff810cb92a ffff8807fc6c3f20
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: ffffffff8192c8fa 00007f5c0a66c000 ffff8807f7374920 0000000000000000
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: Call Trace:
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: [] dump_stack+0x4f/0x65
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: bond0: scheduling interface eth1 to be reset in 600 msec
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: bond0: interface eth1 is now down [was up (UUU)]. (jn:0x11f763e27 ts:0x11f763dc3 lr:0x00000000 la:0x00000000, sj:0x00000000)
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: bond1: scheduling interface eth5 to be reset in 600 msec
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: bond1: interface eth5 is now down [was up (UUU)]. (jn:0x11f763e2f ts:0x11f763dcb lr:0x00000000 la:0x00000000, sj:0x00000000)
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: [] __schedule_bug+0x5a/0xb0
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: [] __schedule+0x77a/0x830
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: [] schedule+0x37/0x90
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: [] int_careful+0xd/0x14
Sep 4 13:26:09 base0-0-0-4-0-11-1 kernel: tipc: Established link <1.1.4:bond0-1.1.75:bond0> on network plane A

Steps to Reproduce

Create a project with:

--enable-addons=wr-cgp --with-layer=cgp --enable-board=intel-x86-64 --enable-kernel=cgl --enable-rootfs=glibc-cgl --enable-bootimage=iso --with-rcpl-version=0026

Use conntrack (conntrack -L should work) to create the files.

modprobe nf_conntrack
The write the file, it could be the same value.
cat  /sys/module/nf_conntrack/parameters/hashsize
65536
echo 65536 > /sys/module/nf_conntrack/parameters/hashsize

It should generate the log.
Live chat
Online