Bug #1360
closedTest stop/hang when run ptest of lttng-tools (OE/yocto)
0%
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
Updated by Heng Guo about 2 years ago
- File 0001-Fix-tests-PGREP-is-not-checked-correctly-in-utils-v2.patch 0001-Fix-tests-PGREP-is-not-checked-correctly-in-utils-v2.patch added
The 2nd patch is uploaded : 0001-Fix-tests-PGREP-is-not-checked-correctly-in-utils-v2.patch
Updated by Jérémie Galarneau about 2 years 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!
Updated by Heng Guo about 2 years ago
Yes the similar solution has been verified in my test.
Updated by Jérémie Galarneau about 2 years ago
- Status changed from In Progress to Resolved
Michael's fix was merged as:
https://github.com/lttng/lttng-tools/commit/dc3c58c9e7e0b71fa746c7267f8d471c62351045
Thank you!
Updated by Heng Guo about 2 years ago
- File test_ust_fail.log test_ust_fail.log added
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
Updated by Heng Guo about 2 years ago
test_ust failure is not related to this patch, so please skip it.
Updated by Jérémie Galarneau about 2 years ago
That seems unrelated to the change.