malloc() function may not return when system use malloc() function and fork() at the same time.
Apply attached patch to oe-core layer.
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 %)