Bug 2304143 - systemtap-5.1-2.fc40 (and fc39) do not work with Linux 6.10 kernels
Summary: systemtap-5.1-2.fc40 (and fc39) do not work with Linux 6.10 kernels
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: systemtap
Version: 40
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Frank Ch. Eigler
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-08-12 14:13 UTC by William Cohen
Modified: 2024-09-13 20:46 UTC (History)
6 users (show)

Fixed In Version: systemtap-5.2~pre17250223gd07e4284-1.fc39 systemtap-5.2~pre17250223gd07e4284-1.fc40 systemtap-5.2~pre17250223gd07e4284-1.fc41
Clone Of:
Environment:
Last Closed: 2024-09-06 03:52:57 UTC
Type: ---
Embargoed:
wcohen: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FC-1280 0 None None None 2024-08-21 14:08:20 UTC

Description William Cohen 2024-08-12 14:13:16 UTC
Changes in the linux 6.10 naming of function task_work_cancel to task_work_cancel_func causes systemtap to fail to compile kernel instrumentation. Upstream systemtap git commit a64dc4e2e0195ca80c6509df511a42459b40e9af addresses this issue.

Reproducible: Always

Steps to Reproduce:
1. sudo dnf install "systemtap*"
2. sudo stap-prep
3. sudo stap --example helloworld.stp
Actual Results:  

In file included from ./include/linux/percpu.h:5,
                 from ./arch/x86/include/asm/msr.h:15,
                 from ./arch/x86/include/asm/tsc.h:10,
                 from ./arch/x86/include/asm/timex.h:6,
                 from ./include/linux/timex.h:67,
                 from ./include/linux/time32.h:13,
                 from ./include/linux/time.h:60,
                 from ./include/linux/jiffies.h:10,
                 from ./include/linux/ktime.h:25,
                 from ./include/linux/timer.h:6,
                 from ./include/linux/workqueue.h:9,
                 from ./include/linux/srcu.h:21,
                 from ./include/linux/notifier.h:16,
                 from ./arch/x86/include/asm/uprobes.h:13,
                 from ./include/linux/uprobes.h:49,
                 from ./include/linux/mm_types.h:16,
                 from ./include/linux/mmzone.h:22,
                 from ./include/linux/gfp.h:7,
                 from /usr/share/systemtap/runtime/linux/runtime_defines.h:1,
                 from /usr/share/systemtap/runtime/runtime_defines.h:8,
                 from /tmp/stap7o0rhr/stap_8c8240a849cea0022e6eb29b6c42bdec_1028_src.c:12:
./include/linux/alloc_tag.h:212:2: error: expected identifier or ‘(’ before ‘{’ token
  212 | ({                                                                      \
      |  ^
./include/linux/vmalloc.h:147:33: note: in expansion of macro ‘alloc_hooks’
  147 | #define vzalloc(...)            alloc_hooks(vzalloc_noprof(__VA_ARGS__))
      |                                 ^~~~~~~~~~~
/usr/share/systemtap/runtime/linux/alloc.c:408:14: note: in expansion of macro ‘vzalloc’
  408 | static void *vzalloc(unsigned long size)
      |              ^~~~~~~
./include/linux/alloc_tag.h:212:2: error: expected identifier or ‘(’ before ‘{’ token
  212 | ({                                                                      \
      |  ^
./include/linux/vmalloc.h:153:33: note: in expansion of macro ‘alloc_hooks’
  153 | #define vmalloc_node(...)       alloc_hooks(vmalloc_node_noprof(__VA_ARGS__))
      |                                 ^~~~~~~~~~~
/usr/share/systemtap/runtime/linux/alloc.c:443:14: note: in expansion of macro ‘vmalloc_node’
  443 | static void *vmalloc_node(unsigned long size, int node __attribute__((unused)))
      |              ^~~~~~~~~~~~
./include/linux/alloc_tag.h:212:2: error: expected identifier or ‘(’ before ‘{’ token
  212 | ({                                                                      \
      |  ^
./include/linux/vmalloc.h:156:33: note: in expansion of macro ‘alloc_hooks’
  156 | #define vzalloc_node(...)       alloc_hooks(vzalloc_node_noprof(__VA_ARGS__))
      |                                 ^~~~~~~~~~~
/usr/share/systemtap/runtime/linux/alloc.c:450:14: note: in expansion of macro ‘vzalloc_node’
  450 | static void *vzalloc_node(unsigned long size, int node)
      |              ^~~~~~~~~~~~
In file included from /usr/share/systemtap/runtime/runtime.h:26,
                 from /tmp/stap7o0rhr/stap_8c8240a849cea0022e6eb29b6c42bdec_1028_src.c:21:
/usr/share/systemtap/runtime/stp_task_work.c: In function ‘stp_task_work_cancel’:
/usr/share/systemtap/runtime/stp_task_work.c:13:123: error: passing argument 2 of ‘(bool (*)(struct task_struct *, struct callback_head *))kallsyms_task_work_cancel’ from incompatible pointer type [-Wincompatible-pointer-types]
   13 | k_head *, (* (task_work_cancel_fn)kallsyms_task_work_cancel)((a), (b)))
      |                                                                   ^~~
      |                                                                   |
      |                                                                   task_work_func_t {aka void (*)(struct callback_head *)}

/usr/share/systemtap/runtime/linux/runtime.h:317:21: note: in definition of macro ‘ibt_wrapper’
  317 |   rettype retval = (function);                  \
      |                     ^~~~~~~~
/usr/share/systemtap/runtime/stp_task_work.c:107:17: note: in expansion of macro ‘task_work_cancel’
  107 |         twork = task_work_cancel(task, func);
      |                 ^~~~~~~~~~~~~~~~
/usr/share/systemtap/runtime/stp_task_work.c:13:123: note: expected ‘struct callback_head *’ but argument is of type ‘task_work_func_t’ {aka ‘void (*)(struct callback_head *)’}
   13 | k_head *, (* (task_work_cancel_fn)kallsyms_task_work_cancel)((a), (b)))
      |                                                                   ^~~

/usr/share/systemtap/runtime/linux/runtime.h:317:21: note: in definition of macro ‘ibt_wrapper’
  317 |   rettype retval = (function);                  \
      |                     ^~~~~~~~
/usr/share/systemtap/runtime/stp_task_work.c:107:17: note: in expansion of macro ‘task_work_cancel’
  107 |         twork = task_work_cancel(task, func);
      |                 ^~~~~~~~~~~~~~~~
/usr/share/systemtap/runtime/linux/runtime.h:317:20: error: incompatible types when initializing type ‘struct callback_head *’ using type ‘bool’ {aka ‘_Bool’}
  317 |   rettype retval = (function);                  \
      |                    ^
/usr/share/systemtap/runtime/stp_task_work.c:13:31: note: in expansion of macro ‘ibt_wrapper’
   13 | #define task_work_cancel(a,b) ibt_wrapper(struct callback_head *, (* (task_work_cancel_fn)kallsyms_task_work_cancel)((a), (b)))
      |                               ^~~~~~~~~~~
/usr/share/systemtap/runtime/stp_task_work.c:107:17: note: in expansion of macro ‘task_work_cancel’
  107 |         twork = task_work_cancel(task, func);
      |                 ^~~~~~~~~~~~~~~~
In file included from /usr/share/systemtap/runtime/linux/runtime.h:207:
/usr/share/systemtap/runtime/transport/relay_v2.c: In function ‘__stp_relay_wakeup_timer’:
/usr/share/systemtap/runtime/linux/debug.h:47:36: error: suggest braces around empty body in an ‘else’ statement [-Werror=empty-body]
   47 | #define dbug_trans(level, args...) ;
      |                                    ^
/usr/share/systemtap/runtime/transport/relay_v2.c:195:17: note: in expansion of macro ‘dbug_trans’
  195 |                 dbug_trans(0, "relay_v2 wakeup timer expiry\n");
      |                 ^~~~~~~~~~
/usr/share/systemtap/runtime/transport/symbols.c: In function ‘_stp_set_stext’:
/usr/share/systemtap/runtime/linux/debug.h:103:34: error: suggest braces around empty body in an ‘else’ statement [-Werror=empty-body]
  103 | #define dbug_sym(level, args...) ;
      |                                  ^
/usr/share/systemtap/runtime/transport/symbols.c:44:17: note: in expansion of macro ‘dbug_sym’
   44 |                 dbug_sym(1, "found kernel _stext load address: 0x%lx\n",
      |                 ^~~~~~~~
/tmp/stap7o0rhr/stap_8c8240a849cea0022e6eb29b6c42bdec_1028_src.c: At top level:
/tmp/stap7o0rhr/stap_8c8240a849cea0022e6eb29b6c42bdec_1028_src.c:105:1: error: ‘static’ is not at beginning of declaration [-Werror=old-style-declaration]
  105 | } static stap_probes[];
      | ^
cc1: all warnings being treated as errors
make[1]: *** [scripts/Makefile.build:244: /tmp/stap7o0rhr/stap_8c8240a849cea0022e6eb29b6c42bdec_1028_src.o] Error 1
make: *** [Makefile:1946: /tmp/stap7o0rhr] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compilation failed.  [man error::pass4]
Kernel version 6.10.3 is outside tested range 2.6.32 ... 6.9-rc0


Expected Results:  
$ sudo stap --example helloworld.stp
hello world


The current upstream systemtap git repo works with the f40 (and f39) 6.10 kernels.

$ sudo ../install/bin/stap --example helloworld.stp
hello world

Comment 1 William Cohen 2024-08-21 14:07:24 UTC
A dummy message to check that mirroring is working.

Comment 2 Fedora Update System 2024-08-30 20:01:58 UTC
FEDORA-2024-e33854a64b (systemtap-5.2~pre17250223gd07e4284-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-e33854a64b

Comment 3 Fedora Update System 2024-08-30 20:02:18 UTC
FEDORA-2024-b4e453e470 (systemtap-5.2~pre17250223gd07e4284-1.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-b4e453e470

Comment 4 Fedora Update System 2024-08-30 20:02:54 UTC
FEDORA-2024-053e9322ab (systemtap-5.2~pre17250223gd07e4284-1.fc39) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-053e9322ab

Comment 5 Fedora Update System 2024-08-31 02:13:50 UTC
FEDORA-2024-b4e453e470 has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-b4e453e470`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-b4e453e470

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2024-08-31 02:55:29 UTC
FEDORA-2024-053e9322ab has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-053e9322ab`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-053e9322ab

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2024-08-31 03:38:32 UTC
FEDORA-2024-e33854a64b has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-e33854a64b`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-e33854a64b

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Martin Cermak 2024-09-05 07:12:04 UTC
Verified with kernel-6.10.6-100.fc39 and systemtap-5.2~pre17250223gd07e4284-1.fc39 .

Comment 9 Martin Cermak 2024-09-05 07:28:05 UTC
Verified also with kernel-6.10.6-200.fc40 and systemtap-5.2~pre17250223gd07e4284-1.fc40 .

Comment 10 Fedora Update System 2024-09-06 03:52:57 UTC
FEDORA-2024-053e9322ab (systemtap-5.2~pre17250223gd07e4284-1.fc39) has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2024-09-06 04:03:09 UTC
FEDORA-2024-b4e453e470 (systemtap-5.2~pre17250223gd07e4284-1.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Fedora Update System 2024-09-13 20:46:28 UTC
FEDORA-2024-e33854a64b (systemtap-5.2~pre17250223gd07e4284-1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.