Systemtap broken on Intrepid

Bug #293235 reported by f3a97
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
systemtap (Fedora)
Fix Released
High
systemtap (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Intrepid by Matt Ginzton
Nominated for Jaunty by Ulrik Mikaelsson
Nominated for Karmic by Stefan Lesicnik

Bug Description

Binary package hint: systemtap

Hi,
      in Intrepid I cannot run any systemtap script, since each one fails with this error:

Running make -C "/lib/modules/2.6.27-7-generic/build" M="/tmp/stapy5xLfx" modules >/dev/null
In file included from /usr/share/systemtap/runtime/transport/transport.c:20,
                 from /usr/share/systemtap/runtime/print.c:17,
                 from /usr/share/systemtap/runtime/runtime.h:82,
                 from /tmp/stapy5xLfx/stap_924da4375b80b1c6e0f56a8c9ede2ed3_53982.c:41:
/usr/share/systemtap/runtime/time.c: In function '_stp_init_time':
/usr/share/systemtap/runtime/time.c:240: error: too many arguments to function 'on_each_cpu'
make[1]: *** [/tmp/stapy5xLfx/stap_924da4375b80b1c6e0f56a8c9ede2ed3_53982.o] Error 1
make: *** [_module_/tmp/stapy5xLfx] Error 2
Pass 4: compiled C into "stap_924da4375b80b1c6e0f56a8c9ede2ed3_53982.ko" in 3430usr/730sys/5398real ms.
Pass 4: compilation failed. Try again with more '-v' (verbose) options.

It seems to be a known problem, which has been patched this summer:

http://groups.google.com/group/linux.kernel/browse_thread/thread/823e9c47714d5835

Can you please update systemtap package to reflect this API change?

Thanks!

ste@ste-ubuntu:~$ apt-cache policy systemtap
systemtap:
  Installed: 0.0.20080705-2ubuntu1
  Candidate: 0.0.20080705-2ubuntu1
  Version table:
 *** 0.0.20080705-2ubuntu1 0
        500 http://sm.archive.ubuntu.com intrepid/universe Packages
        100 /var/lib/dpkg/status

ste@ste-ubuntu:~$ lsb_release -rd
Description: Ubuntu 8.10
Release: 8.10

Revision history for this message
In , Jeff (jeff-redhat-bugs) wrote :

I'm looking at an upstream problem, and wrote a simple systemtap script to do a probe on module_put():

probe kernel.function("module_put")
{
 print_backtrace();
}

...it fails to compile with something that looks like an internal systemtap problem.

In file included from /usr/share/systemtap/runtime/transport/transport.c:20,
                 from /usr/share/systemtap/runtime/print.c:17,
                 from /usr/share/systemtap/runtime/runtime.h:82,
                 from /tmp/stapUEZQ00/stap_67a9a6be0a4462f6441f740715946de0_479.c:41:
/usr/share/systemtap/runtime/time.c: In function '_stp_init_time':
/usr/share/systemtap/runtime/time.c:240: error: too many arguments to function 'on_each_cpu'
make[1]: *** [/tmp/stapUEZQ00/stap_67a9a6be0a4462f6441f740715946de0_479.o] Error 1

Some relevant info:

# rpm -qa systemtap\*
systemtap-0.7-1.fc10.x86_64
systemtap-runtime-0.7-1.fc10.x86_64

# rpm -qa kernel\* | grep 27-13
kernel-debug-2.6.27-13.fc10.x86_64
kernel-debug-debuginfo-2.6.27-13.fc10.x86_64
kernel-firmware-2.6.27-13.fc10.noarch
kernel-debug-devel-2.6.27-13.fc10.x86_64
kernel-headers-2.6.27-13.fc10.x86_64
kernel-debuginfo-common-2.6.27-13.fc10.x86_64

...full output from stap -vvv module_put.stap is attached.

Revision history for this message
In , Frank (frank-redhat-bugs) wrote :

It has been reported that this bug is fixed in git systemtap
(via a runtime autoconf test); we just need to spin an update
for fedora.

Revision history for this message
In , Jeff (jeff-redhat-bugs) wrote :

Setting sev/pri to high for purely selfish reasons :)

Revision history for this message
In , Mark (mark-redhat-bugs) wrote :

Upstream fix is:

commit c2ffad100c432176c537aca673b796a7605cad1c
Author: Josh Stone <email address hidden>
Date: Thu Jul 24 12:40:45 2008 -0700

    Fix on_each_cpu() call for kernels >2.6.26.

    This is a generalization of the patch from James Bottomley:
    http://sources.redhat.com/ml/systemtap/2008-q3/msg00220.html

    The on_each_cpu() change was merged *after* the 2.6.26 release, so I'm
    using an autoconf test instead of James' version check.

Revision history for this message
John Kozyrakis (ikoz) wrote :

I can confirm this behaviour. Systemtap is completely unusable right now on Intrepid.

Revision history for this message
f3a97 (f3a97) wrote : Re: [Bug 293235] Re: Systemtap broken on Intrepid

Hello Giannis,
       it is very easy to fix the problem.

As it is shown here:

http://groups.google.com/group/linux.kernel/browse_thread/thread/823e9c47714d5835?pli=1

It is enough to edit the file:

/usr/share/systemtap/runtime/time.c

locate the following line:

     ret = on_each_cpu(__stp_init_time, NULL, 0, 1);

and substitute it with this line:

    ret = on_each_cpu(__stp_init_time, NULL, 1);

Then you'll be able to use systemtap on Intrepid!

Let's wait for the official fix now :)

BTW great work guys, as usual!

2008/11/17 Giannis Kozyrakis <email address hidden>

> I can confirm this behaviour. Systemtap is completely unusable right now
> on Intrepid.
>
> --
> Systemtap broken on Intrepid
> https://bugs.launchpad.net/bugs/293235
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in "systemtap" source package in Ubuntu: New
>
> Bug description:
> Binary package hint: systemtap
>
> Hi,
> in Intrepid I cannot run any systemtap script, since each one fails
> with this error:
>
> Running make -C "/lib/modules/2.6.27-7-generic/build" M="/tmp/stapy5xLfx"
> modules >/dev/null
> In file included from
> /usr/share/systemtap/runtime/transport/transport.c:20,
> from /usr/share/systemtap/runtime/print.c:17,
> from /usr/share/systemtap/runtime/runtime.h:82,
> from
> /tmp/stapy5xLfx/stap_924da4375b80b1c6e0f56a8c9ede2ed3_53982.c:41:
> /usr/share/systemtap/runtime/time.c: In function '_stp_init_time':
> /usr/share/systemtap/runtime/time.c:240: error: too many arguments to
> function 'on_each_cpu'
> make[1]: ***
> [/tmp/stapy5xLfx/stap_924da4375b80b1c6e0f56a8c9ede2ed3_53982.o] Error 1
> make: *** [_module_/tmp/stapy5xLfx] Error 2
> Pass 4: compiled C into "stap_924da4375b80b1c6e0f56a8c9ede2ed3_53982.ko" in
> 3430usr/730sys/5398real ms.
> Pass 4: compilation failed. Try again with more '-v' (verbose) options.
>
> It seems to be a known problem, which has been patched this summer:
>
>
> http://groups.google.com/group/linux.kernel/browse_thread/thread/823e9c47714d5835
>
> Can you please update systemtap package to reflect this API change?
>
> Thanks!
>
> ste@ste-ubuntu:~$ apt-cache policy systemtap
> systemtap:
> Installed: 0.0.20080705-2ubuntu1
> Candidate: 0.0.20080705-2ubuntu1
> Version table:
> *** 0.0.20080705-2ubuntu1 0
> 500 http://sm.archive.ubuntu.com intrepid/universe Packages
> 100 /var/lib/dpkg/status
>
> ste@ste-ubuntu:~$ lsb_release -rd
> Description: Ubuntu 8.10
> Release: 8.10
>

Revision history for this message
John Kozyrakis (ikoz) wrote :

Thank you stek79, it was easy indeed.

Good to have this info on this bug too, so people can fix this without waiting for new packages. Nevertheless, this should be marked as Confirmed and the package updated sometime before 9.04 :)

Revision history for this message
Matt Ginzton (matt-ginzton) wrote :

Yup. The systemtap package currently included with Intrepid isn't compatible with the 2.6.27 kernel, due to the on_each_cpu change, and of course Intrepid does use a 2.6.27 kernel! There's little point in packaging a systemtap that's incompatible with the kernel you ship; everyone who tries to use systemtap on Intrepid is going to run into this.

Who maintains this systemtap package for Ubuntu; can you please either update to a newer upstream package if applicable, or patch in the obvious change?

Revision history for this message
In , Bug (bug-redhat-bugs) wrote :

This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Changed in systemtap:
status: New → Confirmed
Revision history for this message
In , Mark (mark-redhat-bugs) wrote :

The patch from comment #3 was incorporated in a newer version of the systemtap package for Fedora.

Revision history for this message
Guillaume Giroux (gug-microflex) wrote :

from fedora's bug (https://bugzilla.redhat.com/show_bug.cgi?id=467279)

Upstream fix is:

commit c2ffad100c432176c537aca673b796a7605cad1c
Author: Josh Stone <email address hidden>
Date: Thu Jul 24 12:40:45 2008 -0700

    Fix on_each_cpu() call for kernels >2.6.26.

    This is a generalization of the patch from James Bottomley:
    http://sources.redhat.com/ml/systemtap/2008-q3/msg00220.html

    The on_each_cpu() change was merged *after* the 2.6.26 release, so I'm
    using an autoconf test instead of James' version check.

Changed in systemtap:
status: Unknown → Fix Released
Revision history for this message
Stefan Lesicnik (stefanlsd) wrote :

Karmic and Jaunty are fixed and the tasks can be marked as fix released. I will prepare an SRU for Intrepid.

Revision history for this message
Stefan Lesicnik (stefanlsd) wrote :

I've prepared the patch for Intrepid but am just unsure how to test it. Stek79 / anyone - could you explain how I can reproduce the failure in Intrepid?

Thanks

Revision history for this message
f3a97 (f3a97) wrote :

Hi Stefan,
  thanks for fixing this.

It should be quite easy to trigger this, just try to execute some random
systemtap example scripts (located in /usr/share/systemtap).

You should get the reported error on the function on_each_cpu.

Too bad I'm using Jaunty now, so I've not access to Intrepid machines
anymore.

Thanks

2009/4/30 Stefan Lesicnik <email address hidden>

> I've prepared the patch for Intrepid but am just unsure how to test it.
> Stek79 / anyone - could you explain how I can reproduce the failure in
> Intrepid?
>
> Thanks
>
> --
> Systemtap broken on Intrepid
> https://bugs.launchpad.net/bugs/293235
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “systemtap” source package in Ubuntu: Confirmed
> Status in “systemtap” source package in Fedora: Fix Released
>
> Bug description:
> Binary package hint: systemtap
>
> Hi,
> in Intrepid I cannot run any systemtap script, since each one fails
> with this error:
>
> Running make -C "/lib/modules/2.6.27-7-generic/build" M="/tmp/stapy5xLfx"
> modules >/dev/null
> In file included from
> /usr/share/systemtap/runtime/transport/transport.c:20,
> from /usr/share/systemtap/runtime/print.c:17,
> from /usr/share/systemtap/runtime/runtime.h:82,
> from
> /tmp/stapy5xLfx/stap_924da4375b80b1c6e0f56a8c9ede2ed3_53982.c:41:
> /usr/share/systemtap/runtime/time.c: In function '_stp_init_time':
> /usr/share/systemtap/runtime/time.c:240: error: too many arguments to
> function 'on_each_cpu'
> make[1]: ***
> [/tmp/stapy5xLfx/stap_924da4375b80b1c6e0f56a8c9ede2ed3_53982.o] Error 1
> make: *** [_module_/tmp/stapy5xLfx] Error 2
> Pass 4: compiled C into "stap_924da4375b80b1c6e0f56a8c9ede2ed3_53982.ko" in
> 3430usr/730sys/5398real ms.
> Pass 4: compilation failed. Try again with more '-v' (verbose) options.
>
> It seems to be a known problem, which has been patched this summer:
>
>
> http://groups.google.com/group/linux.kernel/browse_thread/thread/823e9c47714d5835
>
> Can you please update systemtap package to reflect this API change?
>
> Thanks!
>
> ste@ste-ubuntu:~$ apt-cache policy systemtap
> systemtap:
> Installed: 0.0.20080705-2ubuntu1
> Candidate: 0.0.20080705-2ubuntu1
> Version table:
> *** 0.0.20080705-2ubuntu1 0
> 500 http://sm.archive.ubuntu.com intrepid/universe Packages
> 100 /var/lib/dpkg/status
>
> ste@ste-ubuntu:~$ lsb_release -rd
> Description: Ubuntu 8.10
> Release: 8.10
>

Revision history for this message
Bryan Quigley (bryanquigley) wrote :

This should have been fixed by a newer version on a new Ubuntu release. Please reopen if I am mistaken.

Changed in systemtap (Ubuntu):
status: Confirmed → Fix Released
Changed in systemtap (Fedora):
importance: Unknown → High
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.