Wind River Support Network

HomeDefectsLIN9-6836
Fixed

LIN9-6836 : OpenHpi leaks file descriptors

Created: May 3, 2018    Updated: Dec 3, 2018
Resolved Date: May 14, 2018
Previous ID: CGP8-385
Found In Version: 9.0.0.15
Fix Version: 9.0.0.16
Severity: Standard
Applicable for: Wind River Linux 9
Component/s: Userspace

Description

Calling saHpiSessionOpen/saHpiSessionClose leaves a file descriptor open.

Steps to Reproduce

1) Create a simple CGP project with openhpi

setup.sh --distro=wrlinux-cgl --all-layers --dl-layers --layers=wr-cgl --machines=intel-x86-64

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

$echo IMAGE_INSTALL += \"openhpi-test\" >> build/conf/wrimage.inc
$bitbake

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