Uploaded image for project: 'RHEL Testing'
  1. RHEL Testing
  2. RHELTEST-266

KUNIT: kprobe: not ok 7 test_stacktrace_on_nested_kretprobe

    • False
    • Hide

      None

      Show
      None
    • False
    • None

      The kprobe test started failing on upstream arm64 systems.

       

      [ 1349.318266]     ok 6 test_stacktrace_on_kretprobe
      [ 1349.319112] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:321
      [ 1349.320026] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 81685, name: kunit_try_catch
      [ 1349.320601] preempt_count: 2, expected: 0
      [ 1349.320867] RCU nest depth: 0, expected: 0
      [ 1349.321146] INFO: lockdep is turned off.
      [ 1349.321409] irq event stamp: 0
      [ 1349.321618] hardirqs last  enabled at (0): [<0000000000000000>] 0x0
      [ 1349.322046] hardirqs last disabled at (0): [<ffffa3e82d90cd78>] copy_process+0x1170/0x3db0
      [ 1349.322594] softirqs last  enabled at (0): [<ffffa3e82d90cdb0>] copy_process+0x11a8/0x3db0
      [ 1349.323140] softirqs last disabled at (0): [<0000000000000000>] 0x0
      [ 1349.323555] Preemption disabled at:
      [ 1349.323558] [<ffffa3e82d7f55d4>] debug_exception_enter+0x1c/0x80
      [ 1349.324192] CPU: 0 UID: 0 PID: 81685 Comm: kunit_try_catch Tainted: G        W        N-------  ---  6.12.0-2.test.eln.aarch64+64k-debug #1
      [ 1349.325013] Tainted: [W]=WARN, [N]=TEST
      [ 1349.325268] Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015
      [ 1349.325719] Call trace:
      [ 1349.325882]  show_stack+0x34/0x98 (C)
      [ 1349.326129]  dump_stack_lvl+0xa8/0xe8
      [ 1349.326374]  dump_stack+0x1c/0x38
      [ 1349.326598]  __might_resched+0x418/0x5c0
      [ 1349.326879]  __might_sleep+0xa0/0x168
      [ 1349.327125]  __kmalloc_cache_noprof+0x280/0x320
      [ 1349.327425]  alloc_string_stream+0x78/0x170 [kunit]
      [ 1349.327760]  kunit_alloc_string_stream+0x24/0x70 [kunit]
      [ 1349.328138]  __kunit_do_failed_assertion+0xf0/0x480 [kunit]
      [ 1349.328549]  stacktrace_internal_return_handler+0x500/0x660 [test_kprobes]
      [ 1349.329074]  __kretprobe_trampoline_handler+0x1f4/0x430
      [ 1349.329471]  kretprobe_breakpoint_handler+0x90/0xf0
      [ 1349.329836]  call_break_hook+0x118/0x1b8
      [ 1349.330115]  brk_handler+0x24/0x98
      [ 1349.330363]  do_debug_exception+0xc0/0x250
      [ 1349.330656]  el1_dbg+0x80/0xa0
      [ 1349.330877]  el1h_64_sync_handler+0xd4/0x128
      [ 1349.331180]  el1h_64_sync+0x80/0x88
      [ 1349.331430]  kprobe_stacktrace_target+0x34/0x48 [test_kprobes] (P)
      [ 1349.331866]  kprobe_stacktrace_target+0x34/0x48 [test_kprobes] (LK)
      [ 1349.332307]  kprobe_stacktrace_driver+0x24/0x40 [test_kprobes] (K)
      [ 1349.332743]  test_stacktrace_on_nested_kretprobe+0x12c/0x280 [test_kprobes]
      [ 1349.333234]  kunit_try_run_case+0x158/0x3c0 [kunit]
      [ 1349.333589]  kunit_generic_run_threadfn_adapter+0x88/0x100 [kunit]
      [ 1349.334027]  kthread+0x270/0x2f8
      [ 1349.334258]  ret_from_fork+0x10/0x20
      [ 1349.334552]     # test_stacktrace_on_nested_kretprobe: EXPECTATION FAILED at lib/test_kprobes.c:327
                         Expected stack_buf[i + 1] == target_return_address[1], but
                             stack_buf[i + 1] == -101257914810052 (0xffffa3e80df5013c)
                             target_return_address[1] == -101257914810188 (0xffffa3e80df500b4)
      [ 1349.398518]     not ok 7 test_stacktrace_on_nested_kretprobe
      [ 1349.400466] # kprobes_test: pass:6 fail:1 skip:0 total:7
      [ 1349.400832] # Totals: pass:6 fail:1 skip:0 total:7
      [ 1349.401172] not ok 1 kprobes_test 

       

      I believe the culprit is the following series

      https://lore.kernel.org/r/20241008155851.801546-5-mark.rutland@arm.com

              mnpache Nico Pache
              mnpache Nico Pache
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: