Language Selection

English French German Italian Portuguese Spanish

SystemTap 4.2 release

Filed under
GNU
Linux
Red Hat

The SystemTap team announces release 4.2!

support for generating backtraces of different contexts; improved backtrace
tapset to include file names and line numbers; eBPF support extensions
including raw tracepoint access, prometheus exporter, procfs probes and
improved looping structures

= Where to get it

  https://sourceware.org/systemtap/ - Project Page
  https://sourceware.org/systemtap/ftp/releases/
  https://koji.fedoraproject.org/koji/packageinfo?packageID...
  git tag release-4.2 (commit 044a0640985ef0)

  There have been over 110 commits since the last release.
  There have been over 25 bugs fixed / features added since the last
release.

= SystemTap frontend (stap) changes

- When the -v option is set along with -L option, the output includes
  duplicate probe points which are distinguished by their PC address.

- Now it is possible to issue a backtrace using user specified pc, sp,
  and fp which can be used to generate backtraces of different contexts.
  This was introduced to get backtraces of user code from within the go
  runtime but it can also be used to do things like generating backtraces
  of user code from within signal handlers.

- The automatic printing implementation now differentiates between
  pointer and integer types, which are printed as hex or decimal
  respectively.

= SystemTap backend changes

- Initial support for multi-dimensional supports has been added to
  the stapbpf backend. Note that these arrays cannot be iterated upon
  with a foreach loop.

- The stapbpf backend now supports sorting by value in foreach loops.

- The stapbpf backend now supports the concatenation operator for
  userspace probes.

- The stapbpf backend now supports the target() function and -x option.

- The gettimeofday_* functions are now provided for the stapbpf backend.

- The stapbpf backend now supports order parameterization for begin
  and end probes.

- The stapbpf backend now supports stap-exporter extensions.

- The stapbpf backend now supports procfs probes. The implementation
  uses FIFO special files in /var/tmp/systemtap-$EFFUSER/MODNAME instead
  of the proc filesystem files.

- The eBPF backend now uses bpf raw tracepoints for kernel.trace("*")
  probes.  These have target variable arguments that match the
  arguments available for the traditional linux kernel modules
  tracepoints.  Support for the older bpf tracepoint arguments can be
  forced with a --compatible=4.1 option on the command line.

- The compiler optimizes out probes with empty handlers. Previously,
  warnings were issued but, the probe was not internally removed. For
  example, this script now outputs a warning and an error as the only
  probe handler is empty:

      probe begin {}

  Additionally, probe handlers that evaluate to empty are also removed.
  For example, in this script, the begin probe is elided as $foo does
  not exist, however, an error won't be outputted because atleast one
  probe with a non-empty handler exists (probe begin):

      probe begin {
          print("Protected from elision")
      }

      probe end {
          if (@defined($foo)) { print("Evaluates to empty handler") }
      }

- The sys/sdt.h file changes the way i386 registers operands are
  sometimes named, due to an ambiguity.  A comment block explains.

= SystemTap tapset changes

- New backtracing functions print_[u]backtrace_fileline() have been added
  to the tapset. These functions behave similarly to print_[u]backtrace(),
  the only difference being that file names and line numbers are added
  to the backtrace.

= SystemTap sample scripts

All 180+ examples can be found at https://sourceware.org/systemtap/examples/
.

- Several sample scripts have been enabled to run on the stapbpf backend:

apps/libguestfs_log.stp
network/sk_stream_wait_memory.stp
memory/mmfilepage.meta
memory/mmwriteback.meta
general/ansi_colors.meta

- New stap-exporter sample script for the stapbpf backend:

syscallsrw.stp    Tallies the read and write syscalls.

= Examples of tested kernel versions

2.6.32 (RHEL6 x86_64)
4.15.0 (Ubuntu 18.04 x86_64)
4.18.0 (RHEL8 x86_64, aarch64, ppc64le, s390x)
5.0.7  (Fedora 29 x86_64)
5.3.8  (Fedora 30 i686)
5.3.9  (Fedora 31 x86_64)
5.4.0-rc  (Fedora 32 x86_64)

= Known issues with this release

- The array dump macros which are used with prometheus probes do not
entirely
  work with stapbpf as the macros use foreach loops which cannot be used
with
  multi-dimensional arrays yet.

- The user_string() function in the BPF tapsets uses the BPF
probe_read_str()
  helper, which only works correctly when there is no address translation
  between user and kernel address spaces. It has been restricted to x86_64
  only until the BPF infrastructure provides separate helpers for reading
user
  and kernel data.

= Coming soon

- More stapbpf functionality including full statistics aggregate support
and
  try-catch blocks.

= Contributors for this release

*Carlos O'Donell, Frank Ch. Eigler, Jafeer Uddin,
*Richard Purdie, Ross Burton, *Sagar Patel, Serhei Makarov
Stan Cox, *Wenzong Fan, William Cohen

Special thanks to new contributors, marked with '*' above.

Special thanks to Sagar for assembling these notes.

= Bugs fixed for this release &tl;https://sourceware.org/PR#####>

9922    need to configure with --disable-pie on ubuntu
25174   string auto-concat doesn't work in @var / @cast module parameter
25169   strcpy overlap between transport arg and string on-stack
25133   stapbpf foreach loop crashing
24953   foreach (v = v1,v2) syntax not behaving correctly in stapbpf
24812   stapbpf: support order-parametrized begin/end probes
25113   Explanation and "code" mismatch in section ⁠2.3.1.2. File Flight
Recorder
25107   need -L variant that doesn't merge duplicate probe points
23285   stapbpf procfs probes
24946   printing hex sequences causes crash
24947   valid hex and octal sequences not checked for
24926   non-ascii characters not printing on stapbpf
24934   stapbpf stack-smash on EXIT message processing
23879   print_ubacktrace can not print function name
24875   VMA tracker is broken on Fedora 29
24904   stack_trace struct undefined on kernel 5.2
23858   sorted iteration on bpf arrays can't sort values
24885   add test_{,install}check_dyninst tag to check.exp
23866   dissonance between kernel tracepoint parametrization, lkm vs bpf
24811   stapbpf segfault: nested foreach loops can corrupt sorted key data
when limit==0
11353   elide side-effect-free probes
24528   stapbpf-next housekeeping: bpf-translate.cxx should distinguish
codegen for kernel/userspace targets
24543   stapbpf breaks when cpu0 is disabled
12025   Have appropriate selection of hex and decimal formatted output for
automatic output
24639   "next" statement not recognized by stap bpf backend
24343   Some syscall.*.return missing name and retstr variables

Read more

More in Tux Machines

digiKam 7.7.0 is released

After three months of active maintenance and another bug triage, the digiKam team is proud to present version 7.7.0 of its open source digital photo manager. See below the list of most important features coming with this release. Read more

Dilution and Misuse of the "Linux" Brand

Samsung, Red Hat to Work on Linux Drivers for Future Tech

The metaverse is expected to uproot system design as we know it, and Samsung is one of many hardware vendors re-imagining data center infrastructure in preparation for a parallel 3D world. Samsung is working on new memory technologies that provide faster bandwidth inside hardware for data to travel between CPUs, storage and other computing resources. The company also announced it was partnering with Red Hat to ensure these technologies have Linux compatibility. Read more

today's howtos

  • How to install go1.19beta on Ubuntu 22.04 – NextGenTips

    In this tutorial, we are going to explore how to install go on Ubuntu 22.04 Golang is an open-source programming language that is easy to learn and use. It is built-in concurrency and has a robust standard library. It is reliable, builds fast, and efficient software that scales fast. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel-type systems enable flexible and modular program constructions. Go compiles quickly to machine code and has the convenience of garbage collection and the power of run-time reflection. In this guide, we are going to learn how to install golang 1.19beta on Ubuntu 22.04. Go 1.19beta1 is not yet released. There is so much work in progress with all the documentation.

  • molecule test: failed to connect to bus in systemd container - openQA bites

    Ansible Molecule is a project to help you test your ansible roles. I’m using molecule for automatically testing the ansible roles of geekoops.

  • How To Install MongoDB on AlmaLinux 9 - idroot

    In this tutorial, we will show you how to install MongoDB on AlmaLinux 9. For those of you who didn’t know, MongoDB is a high-performance, highly scalable document-oriented NoSQL database. Unlike in SQL databases where data is stored in rows and columns inside tables, in MongoDB, data is structured in JSON-like format inside records which are referred to as documents. The open-source attribute of MongoDB as a database software makes it an ideal candidate for almost any database-related project. This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the MongoDB NoSQL database on AlmaLinux 9. You can follow the same instructions for CentOS and Rocky Linux.

  • An introduction (and how-to) to Plugin Loader for the Steam Deck. - Invidious
  • Self-host a Ghost Blog With Traefik

    Ghost is a very popular open-source content management system. Started as an alternative to WordPress and it went on to become an alternative to Substack by focusing on membership and newsletter. The creators of Ghost offer managed Pro hosting but it may not fit everyone's budget. Alternatively, you can self-host it on your own cloud servers. On Linux handbook, we already have a guide on deploying Ghost with Docker in a reverse proxy setup. Instead of Ngnix reverse proxy, you can also use another software called Traefik with Docker. It is a popular open-source cloud-native application proxy, API Gateway, Edge-router, and more. I use Traefik to secure my websites using an SSL certificate obtained from Let's Encrypt. Once deployed, Traefik can automatically manage your certificates and their renewals. In this tutorial, I'll share the necessary steps for deploying a Ghost blog with Docker and Traefik.