Bug 1223327 - [sle15sp6]stap /usr/share/doc/packages/systemtap/examples/general/helloworld.stp fails with error "‘struct module’ has no member named ‘core_text_size’"
Summary: [sle15sp6]stap /usr/share/doc/packages/systemtap/examples/general/helloworld....
Status: VERIFIED FIXED
Alias: None
Product: PUBLIC SUSE Linux Enterprise Server 15 SP6
Classification: openSUSE
Component: Kernel (show other bugs)
Version: unspecified
Hardware: x86-64 SLES 15
: P2 - High : Normal
Target Milestone: ---
Assignee: Tony Jones
QA Contact:
URL: https://openqa.suse.de/tests/14125987...
Whiteboard: In integration
Keywords:
Depends on:
Blocks: 1226019
  Show dependency treegraph
 
Reported: 2024-04-24 01:55 UTC by Richard Fan
Modified: 2024-06-06 02:22 UTC (History)
2 users (show)

See Also:
Found By: openQA
Services Priority:
Business Priority:
Blocker: Yes
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Fan 2024-04-24 01:55:29 UTC
## Description

The commmand `stap /usr/share/doc/packages/systemtap/examples/general/helloworld.stp` fails on sle15sp6.

Do we need to upgrade the systemtap* packages?

># rpm -qa |grep systemtap
>systemtap-4.9-150600.1.2.x86_64
>systemtap-docs-4.9-150600.1.2.noarch
>systemtap-dtrace-4.9-150600.1.2.noarch
>systemtap-runtime-4.9-150600.1.2.x86_64
>systemtap-server-4.9-150600.1.2.x86_64

># rpm -qa |grep kernel-default
>kernel-default-6.4.0-150600.13.1.x86_64
>kernel-default-extra-6.4.0-150600.13.1.x86_64
>kernel-default-devel-6.4.0-150600.13.1.x86_64


># stap /usr/share/doc/packages/systemtap/examples/general/helloworld.stp

```
In file included from /usr/src/linux-6.4.0-150600.13/include/linux/kernel.h:30:0,
                 from /usr/src/linux-6.4.0-150600.13/arch/x86/include/asm/percpu.h:27,
                 from /usr/src/linux-6.4.0-150600.13/arch/x86/include/asm/preempt.h:6,
                 from /usr/src/linux-6.4.0-150600.13/include/linux/preempt.h:79,
                 from /usr/src/linux-6.4.0-150600.13/include/linux/spinlock.h:56,
                 from /usr/src/linux-6.4.0-150600.13/include/linux/mmzone.h:8,
                 from /usr/src/linux-6.4.0-150600.13/include/linux/gfp.h:7,
                 from /usr/share/systemtap/runtime/linux/runtime_defines.h:20,
                 from /usr/share/systemtap/runtime/runtime_defines.h:8,
                 from /tmp/stap1liBh8/stap_fe4e7b4c533bdd84e5c3873c80b39cf7_1017_src.c:12:
/usr/share/systemtap/runtime/linux/print.c: In function ‘_stp_print_kernel_info’:
/usr/share/systemtap/runtime/linux/print.c:365:36: error: ‘struct module’ has no member named ‘module_core’
         (unsigned long) THIS_MODULE->module_core,
                                    ^
/usr/src/linux-6.4.0-150600.13/include/linux/printk.h:427:19: note: in definition of macro ‘printk_index_wrap’
   _p_func(_fmt, ##__VA_ARGS__);    \
                   ^~~~~~~~~~~
/usr/share/systemtap/runtime/linux/print.c:348:2: note: in expansion of macro ‘printk’
  printk(KERN_DEBUG
  ^~~~~~
/usr/share/systemtap/runtime/linux/print.c:366:39: error: ‘struct module’ has no member named ‘core_size’; did you mean ‘percpu_size’?
         (unsigned long) (THIS_MODULE->core_size - THIS_MODULE->core_text_size)/1024,
                                       ^
/usr/src/linux-6.4.0-150600.13/include/linux/printk.h:427:19: note: in definition of macro ‘printk_index_wrap’
   _p_func(_fmt, ##__VA_ARGS__);    \
                   ^~~~~~~~~~~
/usr/share/systemtap/runtime/linux/print.c:348:2: note: in expansion of macro ‘printk’
  printk(KERN_DEBUG
  ^~~~~~
/usr/share/systemtap/runtime/linux/print.c:366:64: error: ‘struct module’ has no member named ‘core_text_size’; did you mean ‘kprobes_text_size’?
         (unsigned long) (THIS_MODULE->core_size - THIS_MODULE->core_text_size)/1024,
                                                                ^
/usr/src/linux-6.4.0-150600.13/include/linux/printk.h:427:19: note: in definition of macro ‘printk_index_wrap’
   _p_func(_fmt, ##__VA_ARGS__);    \
                   ^~~~~~~~~~~
/usr/share/systemtap/runtime/linux/print.c:348:2: note: in expansion of macro ‘printk’
  printk(KERN_DEBUG
  ^~~~~~
/usr/share/systemtap/runtime/linux/print.c:367:46: error: ‘struct module’ has no member named ‘core_text_size’; did you mean ‘kprobes_text_size’?
                (unsigned long) (THIS_MODULE->core_text_size)/1024,
                                              ^
/usr/src/linux-6.4.0-150600.13/include/linux/printk.h:427:19: note: in definition of macro ‘printk_index_wrap’
   _p_func(_fmt, ##__VA_ARGS__);    \
                   ^~~~~~~~~~~
/usr/share/systemtap/runtime/linux/print.c:348:2: note: in expansion of macro ‘printk’
  printk(KERN_DEBUG
  ^~~~~~
/tmp/stap1liBh8/stap_fe4e7b4c533bdd84e5c3873c80b39cf7_1017_src.c: At top level:
cc1: error: unrecognized command line option ‘-Wno-infinite-recursion’ [-Werror]
cc1: all warnings being treated as errors
make[1]: *** [/usr/src/linux-6.4.0-150600.13/scripts/Makefile.build:252: /tmp/stap1liBh8/stap_fe4e7b4c533bdd84e5c3873c80b39cf7_1017_src.o] Error 1
make: *** [../../../linux-6.4.0-150600.13/Makefile:2066: /tmp/stap1liBh8] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compilation failed.  [man error::pass4]
```

----------------------------------------------------------------------------
## openQA AUTOMATION TESTS Observation

openQA test in scenario sle-15-SP6-Server-DVD-Updates-x86_64-mau-extratests2@64bit fails in
[systemtap](https://openqa.suse.de/tests/14125987/modules/systemtap/steps/51)

## Test suite description
Testsuite maintained at https://gitlab.suse.de/qa-maintenance/qam-openqa-yml. Run console tests against aggregated test repo


## Reproducible

Fails since (at least) Build [20240421-1](https://openqa.suse.de/tests/14113686)


## Expected result

Last good: (unknown) (or more recent)


## Further details

Always latest result in this scenario: [latest](https://openqa.suse.de/tests/latest?arch=x86_64&distri=sle&flavor=Server-DVD-Updates&machine=64bit&test=mau-extratests2&version=15-SP6)
Comment 1 Takashi Iwai 2024-04-24 07:17:48 UTC
Looks like the systemtap version shipped for SLE15-SP6 doesn't follow the changes for struct module_memory yet.  The upstream systemtap seems already containing the fixes in 5.0a release.

Tossed to Tony.
Comment 5 Tony Jones 2024-04-27 23:13:01 UTC
sr 328134

version upgrade to v5.0

As I said, systemtap was working earlier in SP6 dev cycle.  Given that it was totally broken (could not even run "hello world" case) updating version to v5.0
(from v4.9) seems best approach to ensure we cover all bases.

Tested on x86_64 and ppc64le.

Rado:  If this isn't acceptable and we instead need to cherry pick fixes into existing v4.9 LMK.
Comment 6 Radoslav Tzvetkov 2024-04-29 08:29:06 UTC
OK. Let's take it
Comment 8 Radoslav Tzvetkov 2024-05-03 12:49:13 UTC
It is on the  Build83.1 please VERIFY
Comment 9 Richard Fan 2024-06-06 02:11:06 UTC
(In reply to Radoslav Tzvetkov from comment #8)
> It is on the  Build83.1 please VERIFY


The issue is gone
>https://openqa.suse.de/tests/14523525#step/systemtap/307

However, new issue seen with MU, I will file anoher bug 
>https://openqa.suse.de/tests/14523525#step/systemtap/315