Wind River Support Network


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:
Fix Version:
Severity: Standard
Applicable for: Wind River Linux LTS 17
Component/s: Kernel


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


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

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.


Patchs which fix this issue.

Other Downloads

Live chat