Wind River Support Network

HomeDefectsLIN8-5507
Fixed

LIN8-5507 : WRLinux8 - malloc() function freeze

Created: Jan 10, 2017    Updated: Dec 3, 2018
Resolved Date: Jan 22, 2017
Found In Version: 8.0.0.11
Fix Version: 8.0.0.14
Severity: Standard
Applicable for: Wind River Linux 8
Component/s: Toolchain, Userspace

Description

malloc() function may not return when system use malloc() function and fork() at the same time.

Workaround

Apply attached patch to oe-core layer.

Steps to Reproduce

0.Environment.

WRLinux8 RCPL11
  BSP:intel-x86-64
  Target:qemu
     * fsl-ls1043 has same issue.

1. configure
/home/nss/WRLinux8/wrlinux-8/wrlinux/configure --enable-reconfig --enable-board=intel-x86-64 --enable-kernel=preempt-rt --enable-rootfs=glibc-std+debug --enable-build=production --with-rcpl-version=0011

2.add 32bit library package.
make -C build lib32-zlib.addpkg

3. build project
make

4. export SDK
make export-sdk

5. expand SDK
cd export
sudo ./wrlinux-8.0.0.11-glibc-x86_64-intel_x86_64-wrlinux-image-glibc-std-sdk.sh

6. build test program as 64bit
cd <SDK export directory>
source environment-setup-corei7-64-wrs-linux
${CC} -g -o deadlock_test -Wall -O2 -lrt -lpthread deadlock_test.c

7. Copy test program to rootfs.
cp deadlock_test {project}_prj/export/dist/root

8. Qemu start up.
cd {project}_prj
make start-target

9. execute test program on Qemu.
./deadlock_test
fork 0

    * In case of Qeme, it can reproduce 3 of 3times.  (100%)
      In case of fsl_ls1043, it can reproduce 1 of 5 times. (about 20 %)

Other Downloads


Live chat
Online