systemtap does not work on xenial, struct module changes

Bug #1557673 reported by Dan Streetman on 2016-03-15
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
systemtap (Ubuntu)
High
Dan Streetman
Xenial
High
Dan Streetman

Bug Description

[Impact]

Attempting to use systemtap on xenial with the 4.4 kernel results in:

ubuntu@xenial:~$ sudo stap test.stap
In file included from /usr/share/systemtap/runtime/print.c:17:0,
                 from /usr/share/systemtap/runtime/runtime_context.h:22,
                 from /tmp/stapxvNfgC/stap_2e27f5927a5796b18cb7b3c2abd24ec4_812_src.c:50:
/usr/share/systemtap/runtime/linux/print.c: In function ‘_stp_print_kernel_info’:
/usr/share/systemtap/runtime/linux/print.c:242:20: error: ‘struct module’ has no member named ‘module_core’
         THIS_MODULE->module_core,
                    ^
/usr/share/systemtap/runtime/linux/print.c:243:37: error: ‘struct module’ has no member named ‘core_size’
         (unsigned long) (THIS_MODULE->core_size - THIS_MODULE->core_text_size)/1024,
                                     ^
/usr/share/systemtap/runtime/linux/print.c:243:62: error: ‘struct module’ has no member named ‘core_text_size’
         (unsigned long) (THIS_MODULE->core_size - THIS_MODULE->core_text_size)/1024,
                                                              ^
/usr/share/systemtap/runtime/linux/print.c:244:44: error: ‘struct module’ has no member named ‘core_text_size’
                (unsigned long) (THIS_MODULE->core_text_size)/1024,
                                            ^
scripts/Makefile.build:258: recipe for target '/tmp/stapxvNfgC/stap_2e27f5927a5796b18cb7b3c2abd24ec4_812_src.o' failed
make[1]: *** [/tmp/stapxvNfgC/stap_2e27f5927a5796b18cb7b3c2abd24ec4_812_src.o] Error 1
Makefile:1396: recipe for target '_module_/tmp/stapxvNfgC' failed
make: *** [_module_/tmp/stapxvNfgC] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compilation failed. [man error::pass4]
Tip: /usr/share/doc/systemtap/README.Debian should help you get started.

[Test Case]

on a xenial system with the 4.4 kernel installed, and systemtap and kernel dbgsyms installed, simply create a dummy stap script and try to run it, e.g.:

$ cat test.stap
#!/usr/bin/stap

probe begin {
  println("hello")
}
$ sudo stap test.stap

the above compilation failure will result.

[Regression Potential]

The commit updates stap to use the kernel module header correctly based on a small test program, so there should be no regression, but possible regression is breaking stap on the xenial 4.3 kernel.

[Other Info]

this requires upstream stap commit
3f040971e7efb4d323fcb63d83b4337f355c60db

Dan Streetman (ddstreet) on 2016-03-15
tags: added: bot-stop-nagging
Dan Streetman (ddstreet) on 2016-03-15
Changed in systemtap (Ubuntu):
assignee: nobody → Dan Streetman (ddstreet)
status: New → In Progress
Frank Ch. Eigler (fche) wrote :

Upstream commit 3f040971e7e should fix this.
(Also, we plan to have a systemtap 3.0 release shortly, with this and other fixes.)

Dan Streetman (ddstreet) wrote :

> Upstream commit 3f040971e7e should fix this.

yep

> (Also, we plan to have a systemtap 3.0 release shortly, with this and other fixes.)

great; does that cover wily also? because this is broken there also with wily/lts-xenial kernel. (As well as lp bug 1547644.)

Frank Ch. Eigler (fche) wrote :

> does that cover wily also?

Pre-release systemtap is also being tested with pre-release 4.6 linux, so should work fine on wily etc.
I can only speak as upstream, not for ubuntu packaging though.

Dan Streetman (ddstreet) on 2016-03-16
description: updated
tags: added: sts-sru
removed: bot-stop-nagging
Dan Streetman (ddstreet) wrote :

debdiff with backported systemtap upstream commit 3f040971e7efb4d323fcb63d83b4337f355c60db.

Note the upstream commit also changes tapset/linux/context.stp, but the current xenial systemtap source does not include other commits that require this patch to update context.stp, so I removed the context.stp section of the patch.

The attachment "lp1557673.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Mathew Hodson (mhodson) on 2016-03-16
Changed in systemtap (Ubuntu):
importance: Undecided → High
tags: added: xenial
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemtap - 2.9-2ubuntu2

---------------
systemtap (2.9-2ubuntu2) xenial; urgency=medium

  * d/p/0001-Fix-PR9497-by-updating-the-runtime-to-handle-linux-4.patch:
    Fix stap compilation after kernel 4.4 commit 7523e4dc50. (LP: #1557673)

 -- Dan Streetman <email address hidden> Wed, 16 Mar 2016 18:46:37 +0000

Changed in systemtap (Ubuntu Xenial):
status: In Progress → Fix Released
Yang Wei (wyang8) wrote :

 sudo dpkg -l | grep systemtap
ii systemtap 2.3-1ubuntu1.4 amd64 instrumentation system for Linux
ii systemtap-common 2.3-1ubuntu1.4 all instrumentation system for Linux (common component)
ii systemtap-runtime 2.3-1ubuntu1.4 amd64 instrumentation system for Linux (runtime component)
ii systemtap-sdt-dev 2.3-1ubuntu1 amd64 statically defined probes development files

➜ cv uname -r
4.4.0-21-generic

The latest systemtap package is still not fixed until now.

Yang Wei (wyang8) wrote :

I am using Trusty, so when is it fixed on Trusty?

Louis Bouchard (louis) on 2016-11-09
tags: removed: sts-sru
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers