Project

General

Profile

Actions

Bug #1377

closed

tests/regression/kernel/test_callstack fails with gcc 13

Added by Richard Purdie 11 months ago. Updated 11 months ago.

Status:
Resolved
Priority:
Normal
Target version:
-
Start date:
05/25/2023
Due date:
% Done:

100%

Estimated time:

Description

When Yocto Project tests upgrading to gcc 13, we see a ptest failure in lttng-tools (2.13.9) in tests/regression/kernel/test_callstack (6.1 kernel). The log of the failing test:

1..22
  1. Kernel tracer - Callstack context
    ok 1 - Start session daemon
    PASS: kernel/test_callstack 1 - Start session daemon
  2. Userspace callstack test
    ok 2 - Create session callstack in -o /tmp/tmp.test_user_callstack_trace_path.1DdyIt
    PASS: kernel/test_callstack 2 - Create session callstack in -o /tmp/tmp.test_user_callstack_trace_path.1DdyIt
    ok 3 - Enable channel chan0 for session callstack
    PASS: kernel/test_callstack 3 - Enable channel chan0 for session callstack
    ok 4 - Enable kernel syscall gettid for session callstack on channel chan0
    PASS: kernel/test_callstack 4 - Enable kernel syscall gettid for session callstack on channel chan0
    ok 5 - Add context command for type: callstack-user
    PASS: kernel/test_callstack 5 - Add context command for type: callstack-user
    ok 6 - Untrack command with opts: -s callstack --all --pid -k
    PASS: kernel/test_callstack 6 - Untrack command with opts: -s callstack --all --pid -k
    ok 7 - Track command with opts: -s callstack -k --pid=2503
    PASS: kernel/test_callstack 7 - Track command with opts: -s callstack -k --pid=2503
    ok 8 - Start tracing for session
    PASS: kernel/test_callstack 8 - Start tracing for session
    ok 9 - Stop lttng tracing for session
    PASS: kernel/test_callstack 9 - Stop lttng tracing for session
    Traceback (most recent call last):
    File "/usr/lib/lttng-tools/ptest/tests/regression/././kernel//../../utils/parse-callstack.py", line 160, in <module>
    main()
    File "/usr/lib/lttng-tools/ptest/tests/regression/././kernel//../../utils/parse-callstack.py", line 155, in main
    raise Exception('Expected function name not found in recorded callstack')
    Exception: Expected function name not found in recorded callstack
    ok 10 - Destroy session callstack
    PASS: kernel/test_callstack 10 - Destroy session callstack
    not ok 11 - Validate userspace callstack
    FAIL: kernel/test_callstack 11 - Validate userspace callstack
  3. Failed test 'Validate userspace callstack'
  4. in ./kernel/test_callstack:test_user_callstack() at line 80.
  5. Kernel callstack test
    ok 12 - Create session callstack in -o /tmp/tmp.test_kernel_callstack_trace_path.rHPMq3
    PASS: kernel/test_callstack 12 - Create session callstack in -o /tmp/tmp.test_kernel_callstack_trace_path.rHPMq3
    ok 13 - Enable channel chan0 for session callstack
    PASS: kernel/test_callstack 13 - Enable channel chan0 for session callstack
    ok 14 - Enable kernel syscall read for session callstack on channel chan0
    PASS: kernel/test_callstack 14 - Enable kernel syscall read for session callstack on channel chan0
    ok 15 - Add context command for type: callstack-kernel
    PASS: kernel/test_callstack 15 - Add context command for type: callstack-kernel
    ok 16 - Untrack command with opts: -s callstack --all --pid -k
    PASS: kernel/test_callstack 16 - Untrack command with opts: -s callstack --all --pid -k
    ok 17 - Track command with opts: -s callstack -k --pid=2532
    PASS: kernel/test_callstack 17 - Track command with opts: -s callstack -k --pid=2532
    ok 18 - Start tracing for session
    PASS: kernel/test_callstack 18 - Start tracing for session
    ok 19 - Stop lttng tracing for session
    PASS: kernel/test_callstack 19 - Stop lttng tracing for session
    ok 20 - Destroy session callstack
    PASS: kernel/test_callstack 20 - Destroy session callstack
    ok 21 - Validate kernel callstack
    PASS: kernel/test_callstack 21 - Validate kernel callstack
  6. Killing (signal SIGTERM) lttng-sessiond and lt-lttng-sessiond pids: 2469 2470
    ok 22 - Wait after kill session daemon
    PASS: kernel/test_callstack 22 - Wait after kill session daemon
  7. Looks like you failed 1 test of 22.

I've attached the test binary to this bug.


Files

gen-syscall-events-callstack (31.6 KB) gen-syscall-events-callstack Richard Purdie, 05/25/2023 06:33 PM
Actions #1

Updated by Jérémie Galarneau 11 months ago

  • Status changed from New to In Progress

I can confirm I can reproduce this on both stable-2.13 and master branches using GCC 13.1 and Linux 6.3.3.

Actions #2

Updated by Jérémie Galarneau 11 months ago

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

Any chance you can try that fix on your end?

https://review.lttng.org/c/lttng-tools/+/10101

Actions #3

Updated by Richard Purdie 11 months ago

I can confirm that patch fixes the issue we were seeing, thanks!

Actions #4

Updated by Jérémie Galarneau 11 months ago

  • Status changed from Feedback to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF