Wind River Support Network

HomeDefectsLIN10-3780
Fixed

LIN10-3780 : Detect hang up with heavy load on preempt-rt kernel

Created: Apr 25, 2018    Updated: Dec 3, 2018
Resolved Date: May 25, 2018
Previous ID: LIN9-6745
Found In Version: 10.17.41.6
Fix Version: 10.17.41.8
Severity: Standard
Applicable for: Wind River Linux LTS 17
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-10/setup.sh --dl-layers --machine qemux86-64 --templates feature/test

2. Enable preempt-kernel with following method:

    Add following statment to conf/local

    KTYPE_ENABLED ?= "preempt-rt"
    LINUX_KERNEL_TYPE ?= "preempt-rt"
    PREFERRED_PROVIDER_virtual/kernel= "linux-yocto-rt"
    TARGET_SUPPORTED_KTYPES_append = " preempt-rt"

3. Enable following kernel config:

    bitbake linux-yocto-rt -c menuconfig

Symbol: DETECT_HUNG_TASK [=y]                                           
  ¦ Type  : boolean                                                         
  ¦ Prompt: Detect Hung Tasks                                             
  ¦   Location:                                                             
  ¦     -> Kernel hacking                                                  
  ¦       -> Debug Lockups and Hangs

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. 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:

Patchs which fix this issue.

Other Downloads


Live chat
Online