Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-47342

[systemtap] /usr/bin/stap provided by two packages, but fails if systemtap-devel not installed

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Normal Normal
    • None
    • rhel-9.5
    • systemtap
    • None
    • Low
    • Upstream
    • rhel-sst-pt-perf-debug
    • ssg_platform_tools
    • 2
    • False
    • Hide

      None

      Show
      None
    • No
    • None
    • None
    • None
    • Unspecified Release Note Type - Unknown
    • All
    • None

      What were you trying to do that didn't work?

      I was trying to help QE test if we had fixed a bug in qemu-trace-stap, which calls stap under the hood.  In the process, we discovered that the systemtap packaging is wonky.  At this point, it's no longer an issue in qemu-trace-stap, but something that is worth the systemtap team deciding whether to improve.

      Please provide the package NVR for which bug is seen:

      I reproduced this on Fedora 40, but suspect the same issues will be seen in RHEL 9.5 unless changes are made.

      systemtap-client-5.1-1.fc40.x86_64

      How reproducible:

      100%

      Steps to reproduce

      1. dnf install qemu-tools '*/bin/stap'
      2. notice that systemtap-client is now installed, but not systemtap-devel
      3. qemu-trace-stap run `which qemu-kvm` 'nbd_send*'
      4. dnf install -y systemtap-devel
      5. rpm -qf /usr/bin/stap

      Expected results

      If stap requires headers to be installed to work, then installing the binary should pull in those headers by dependency, rather than by manual action. Also, it is unusual to have multiple RPMs claim the same binary.

      Actual results

      after step 3, I get an error:/tmp/stapxUvHmF/stap_10b3cca198cbae600b4323c636f811a3_5442_src.c:12:10: fatal error: runtime_defines.h: No such file or directory
         12 | #include "runtime_defines.h"
            |          ^~~~~~~~~~~~~~~~~~~
      compilation terminated.
      make[1]: *** [scripts/Makefile.build:244: /tmp/stapxUvHmF/stap_10b3cca198cbae600b4323c636f811a3_5442_src.o] Error 1
      make[1]: *** Waiting for unfinished jobs....
      /tmp/stapxUvHmF/stap_symbols.c:3:10: fatal error: sym.h: No such file or directory
          3 | #include <sym.h>
            |          ^~~~~~~
      compilation terminated.
      make[1]: *** [scripts/Makefile.build:244: /tmp/stapxUvHmF/stap_symbols.o] Error 1
      make: *** [Makefile:1930: /tmp/stapxUvHmF] Error 2
      WARNING: kbuild exited with status: 2
      Pass 4: compilation failed.  [man error::pass4]
      Kernel version 6.9.5 is outside tested range 2.6.32 ... 6.9-rc0

      after step 4, repeating step 3 works as desired.

      after step 5, I see that the binary is claimed by two RPMs, which is unusual:

      systemtap-client-5.1-1.fc40.x86_64
      systemtap-devel-5.1-1.fc40.x86_64

              rhtorsys Frank Eigler
              eblake_redhat Eric Blake
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: