Wind River Support Network

HomeDefectsCGP8-381
Fixed

CGP8-381 : OpenHpi leaks file descriptors

Created: Feb 8, 2018    Updated: Mar 5, 2019
Resolved Date: Apr 12, 2018
Found In Version: 8.0.0.24
Fix Version: 8.0.0.26
Severity: Standard
Applicable for: Wind River Linux 8
Component/s: Userspace

Description

Calling saHpiSessionOpen/saHpiSessionClose leaves a file descriptor open.

Steps to Reproduce

1) Create a simple CGP project with openhpi

configure --enable-addons=wr-cgp --with-layer=cgp --enable-board=intel-x86-64 --enable-kernel=cgl --enable-rootfs=glibc-cgl --with-package=openhpi --enable-reconfig --with-rcpl-version=0024

2) Include a test case, I attached it as a layer in order to not use the SDK (extract the attached tarball in the root of the project)

3) Add the openhpi-test package to the project

make lib32-openhpi-test.addpkg && make

4) Start the target and start openhpid service with systemctl. You will need to disable the first line before.

# OPENHPI_UNCONFIGURED = "YES"

5) Run openhpi-test in the background

6) There are two ways to see the issue:

6.1) ls -l /proc/`pidof wrl8_openhpi_test`/fd can be used to monitor file descriptor being leaked.
6.2) strace the test program, close() 

Other Downloads


Live chat
Online