Wind River Support Network

HomeDefectsLIN9-4461
Fixed

LIN9-4461 : glibc(arm): pthread_mutex_unlock() returns error when PTHREAD_PRIO_INHERIT is enabled

Created: Jun 21, 2017    Updated: Dec 3, 2018
Resolved Date: Aug 2, 2017
Found In Version: 9.0.0.6
Fix Version: 9.0.0.9
Severity: Standard
Applicable for: Wind River Linux 9
Component/s: Toolchain, Userspace

Description

pthread_mutex functions such as pthread_cond_wait(), pthread_mutex_unlock() return
 errors after PTHREAD_PRIO_INHERIT is enabled

If PTHREAD_PRIO_INHERIT is not enabled, no errors occur.

Steps to Reproduce

Build WRL9 image and SDK installer 

$ wrlinux-9/setup.sh --machines bcm-587xx
$ . environment-setup-x86_64-wrlinuxsdk-linux
$ . oe-init-build-env build

$ vi conf/local.conf
--- changes from default ---
BB_NO_NETWORK ?= '0'
LINUX_KERNEL_TYPE ?= "preempt-rt"
---

$ bitbake lib32-wrlinux-image-glibc-std
$ bitbake -c populate_sdk lib32-wrlinux-image-glibc-std

Build pthread-test

$ . <sdk path>/environment-setup-armv7ahf-neon-wrsmllib32-linux-gnueabi
$ $CC test.c -o pthread-test -lpthread

Steps on to bcm-587xx 

Change settng on boot SD 
copy /dev/mmcblk0p1 (ext2) uImage, uImage-ns2-svk.dtb 
unzip /dev/mmcblk0p2 (ext4) lib32-wrlinux-image-glibc-std-bcm-587xx.tar.bz2
and copy pthread-test to root/ 

After u-boot is up
u-boot> setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait
u-boot> mmc rescan
u-boot> load mmc 0 0x90000000 uImage
u-boot> load mmc 0 0x88000000 uImage-ns2-svk.dtb
u-boot> bootm 0x90000000 - 0x88000000

Run test as below
* Running with or without PTHREAD_PRIO_INHERIT on

OK Case
root@bcm-587xx:~# ./pthread-test
[MUTEX] Normal Mutex
test value=10
test value=9
...

NG Case
root@bcm-587xx:~# ./pthread-test 1
[MUTEX] Inherit Enabled
[wait] pthread_mutex_unlock failed ret=1
test value=10
test value=9
[notify] pthread_mutex_unlock failed ret=1
[unlock] pthread_mutex_unlock failed ret = 1
[lock] mutex_unlock failed ret=1
test value=8
...


4. Environment ran on

wrlinux-9
BCM857xx BSP + BCM857xx Reference board

------

Other Downloads


Live chat
Online