Project

General

Profile

Actions

Bug #1360

closed

Test stop/hang when run ptest of lttng-tools (OE/yocto)

Added by Heng Guo over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Target version:
-
Start date:
10/14/2022
Due date:
% Done:

0%

Estimated time:

Description

Linux and related packages versions:
Linux version: 5.10.79 (OE/yocto)
Liburcu 0.13.2
Lttng_tools: 2.13.8
Lttng_ust: 2.13.5
Lttng modules: 2.13.5

Build environment:
Build kernel and rootfs on Ubuntu (kernel 4.18.0)
Target BSP: intel-x86-64
Test is run on target board: Intel-snr (cpu atom) and command is:
./run-ptest
or
make -k -s LOG_DRIVER_FLAGS=--ignore-exit top_srcdir=$PWD top_builddir=$PWD check

Issue:
Using ptest from (OE/yocto), so all lttng-tools unit tests can be run.
Ptest stop/hang at tools/base-path/test_ust, please find the attached log: test_ust.log and ptest-lttng-tools-2.13.8.log.

Root cause:
In configure.ac, "no" string is set to $PGREP if pgrep is not found during build. Refer to below codes,

--------
AC_PATH_PROG([PGREP], [pgrep], [no])
AM_CONDITIONAL([HAVE_PGREP], [test "x$PGREP" != "xno"])

In tests/utils/utils.sh, NULL string is used to check for $PGREP, so correct pgrep is not set correctly to $PGREP. Refer to below codes,

# Check pgrep from env, default to pgrep if none
if [ -z "$PGREP" ]; then
    PGREP=pgrep

Solution:
Check "no" string instead of NULL in utils.sh.
The fix patch is attached: 0001-Fix-tests-PGREP-is-not-checked-correctly-in-utils-sc.patch
Test log is attached too: test_ust-fix.log and ptest-lttng-tools-2.13.8-fix.log


Files

Actions #1

Updated by Heng Guo over 1 year ago

The 2nd patch is uploaded : 0001-Fix-tests-PGREP-is-not-checked-correctly-in-utils-v2.patch

Actions #2

Updated by Jérémie Galarneau over 1 year ago

  • Status changed from New to In Progress
  • Assignee set to Jérémie Galarneau

Hi Heng,

Michael has proposed the following alternative fix which is more in line with how we have fixed those types of issues:
https://review.lttng.org/c/lttng-tools/+/8845

Can you confirm if it solves the problem for you?

Thanks!

Actions #3

Updated by Heng Guo over 1 year ago

Yes the similar solution has been verified in my test.

Actions #4

Updated by Jérémie Galarneau over 1 year ago

  • Status changed from In Progress to Resolved
Actions #5

Updated by Heng Guo over 1 year ago

Hi Jérémie,

Random failure in test_ust after I apply the official patch. Could you verify if you have the same failure as the attached log : test_ust_fail.log

Br,
Heng

Actions #6

Updated by Heng Guo over 1 year ago

test_ust failure is not related to this patch, so please skip it.

Actions #7

Updated by Jérémie Galarneau over 1 year ago

That seems unrelated to the change.

Actions

Also available in: Atom PDF