Wind River Support Network

HomeDefectsLIN9-6738
Fixed

LIN9-6738 : Detect hang up with heavy load on preempt-rt kernel

Created: Apr 19, 2018    Updated: Dec 3, 2018
Resolved Date: May 6, 2018
Found In Version: 9.0.0.15
Fix Version: 9.0.0.16
Severity: Standard
Applicable for: Wind River Linux 9
Component/s: Kernel

Description

We encountered system hung when running LTP ftest01 with preempt-rt kernel.  We succeeded to reproduce same issue on the reference target with modified LTP ftest01.

The issue reproduce when we specify temporary path onto eMMC or SD-Card with LTP's -d option.  Also, the issue reproduce with ext4 filesystem.  We tried to format the partition with ext2 and mount it by ext4 module, but it was not reproduced.

Steps to Reproduce

1. Configure the project with LTP and preempt-rt kernel

   ./wrlinux-9/setup.sh --dl-layers --machine bcm-587xx --templates feature/test --kernel preempt-rt

2. Enable preempt-kernel with following method:

   https://knowledge.windriver.com/en-us/000_Products/000/010/050/030/000_Wind_River_Linux_Kernel_Configuration_and_Build%2C_9/050/010

3. Enable following kernel config:

   CONFIG_DETECT_HUNG_TASK=y

4. Modify following file to fork 10 children:

   build/tmp/work/aarch64-wrs-linux/ltp/20160126-r0/git/testcases/kernel/fs/ftest/ftest01.c

Before:
static void setup(void)
{
...
	/*
	 * Default values for run conditions.
	 */
	iterations = 10;
	nchild = 5;

After:
static void setup(void)
{
...
	/*
	 * Default values for run conditions.
	 */
	iterations = 10;
	nchild = 10;

5. Build the project

6. Boot the target

7. Insert SD-Card to the target and format it, then mount it under /mnt

   # mkfs.ext4 /dev/mmcblk1p1
   # mount /dev/mmcblk1p1 /mnt

8. Run LTP ftest01 as follows:

   # run /opt/ltp/runltp -f fs -s ftest01 -d /mnt

   Normally, above test takes 10~15 minutes.  However, hung tasks are sometimes detected.

Attachment:
  - hang-tasks.log: Hung up log, the issue was reproduced on second trial.
  - ftest01: Modified binary (step 4 above) for arm64.  You can replace it with /opt/ltp/testcases/bin/ftest01.

Other Downloads


Live chat
Online