Linux kernel > 4.14 requires systemtap 3.2

Bug #1766754 reported by paulcd2000
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemtap (Ubuntu)
Fix Released
High
Tyler Hicks

Bug Description

[Impact]

systemtap cannot be used in Ubuntu 18.04 due to kernel ABI incompatibilities with the 4.15 based kernel. The upstream kernel changes are:

- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7eeb6b893bd28c68b6d664de1d3120e49b855cdb
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d3a024abbc43827785

[Test Case]

Load an example systemtap script to verify that it can be built and used with the Ubuntu 18.04 kernel.

$ sudo stap -v -e 'probe kernel.function("proc_dostring") {printf("proc_dostring() called\n"); exit()}'

In another terminal, execute 'cat /proc/sys/kernel/hostname' and the stap command should print "proc_dostring() called" and exit. See the stap-bad.txt and stap-good.txt attachments for example output.

[Regression Potential]

Low regression potential since the package does not currently work as-is.

[Original Bug Report]

Per https://sourceware.org/bugzilla/show_bug.cgi?id=22158 , Systemtap 3.1 is broken on kernel versions > 4.14. It looks like they're aware of this in the debian package : https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892995 . With Bionic Beaver about to ship with kernel 4.15 and systemtap 3.1-3, systemtap will be unusable on the LTS of Ubuntu.

$ lsb_release -rd
Description: Ubuntu Bionic Beaver (development branch)
Release: 18.04
$ uname -a
Linux appliance 4.15.0-19-generic #20-Ubuntu SMP Sun Apr 22 00:03:34 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ apt-cache policy systemtap
systemtap:
  Installed: 3.1-3
  Candidate: 3.1-3
  Version table:
 *** 3.1-3 500
        500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
        100 /var/lib/dpkg/status

paulcd2000 (paulcd2000)
description: updated
Revision history for this message
Tyler Hicks (tyhicks) wrote :

The Debian bug report mentions two upstream commits:

 https://sourceware.org/git/gitweb.cgi?p=systemtap.git;a=commitdiff;h=fbb26e17a
 https://sourceware.org/git/gitweb.cgi?p=systemtap.git;a=commitdiff;h=0643ca2b7

They both cherry-picked cleanly to the Bionic package so I prepared a test build of systemtap with those two patches applied in this PPA:

 https://launchpad.net/~tyhicks/+archive/ubuntu/testing/+packages

Please let me know if the new package works for you and we can start the process of getting the update into Ubuntu 18.04.

Tyler Hicks (tyhicks)
description: updated
description: updated
Revision history for this message
Tyler Hicks (tyhicks) wrote :

Here's the output from systemtap 3.1-3, under the Ubuntu 4.15.0-20.21-generic kernel, showing failure to build the module.

description: updated
Revision history for this message
Tyler Hicks (tyhicks) wrote :

Here's the output from systemtap 3.1-3 patched with the two upstream fixes mentioned in the [Impact] section, under the Ubuntu 4.15.0-20.21-generic kernel, showing success.

Revision history for this message
Tyler Hicks (tyhicks) wrote :

Sorry, the last comment was incorrect. The two upstream fixes are mentioned in comment #1, not the [Impact] section.

Tyler Hicks (tyhicks)
Changed in systemtap (Ubuntu):
importance: Undecided → High
status: New → In Progress
assignee: nobody → Tyler Hicks (tyhicks)
Revision history for this message
Tyler Hicks (tyhicks) wrote :

I tested systemtap 3.1-3ubuntu0.1 from bionic-proposed and have verified that it works as described in the [Test Case] section. Its output matches what I previously attached in stap-good.txt.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemtap - 3.1-3ubuntu0.1

---------------
systemtap (3.1-3ubuntu0.1) bionic-proposed; urgency=medium

  * Fix errors seen with Bionic's 4.15 based kernel due to upstream
    kernel changes (LP: #1766754)
    - PR22158-Fix-missing-spin_unlock_wait-declaration.patch
    - PR22551-Fix-reworked-timer-usage.patch

 -- Tyler Hicks <email address hidden> Wed, 25 Apr 2018 20:56:22 +0000

Changed in systemtap (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.