Bug 1150166

Summary: Change between f20 and f21 in module()
Product: [Fedora] Fedora Reporter: Christophe Fergeau <cfergeau>
Component: systemtapAssignee: Josh Stone <jistone>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: brolley, dsmith, fche, jistone, lberk, mjw, mjw, nathans, scox, wcohen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: systemtap-2.6-3.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-11 07:02:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Christophe Fergeau 2014-10-07 14:43:43 UTC
In fedora 20, I used to be able to use
stap -l 'module("qxl").function("*")'
to list functions I can trace in the qxl module.

In fedora 21 (i686), this always returns an empty list. If I change it to:
stap -l 'module("qxl*").function("*")'
then I get what I expect, ie a list with entries like:
module("qxl").function("qxl_pci_remove@drivers/gpu/drm/qxl/qxl_drv.c:74") 

I tested with 
systemtap-2.6-2.fc21.i686
kernel-3.16.3-302.fc21.i686

This could be a kernel-side issue, but I'm very unfamiliar with systemtap in general, so filing it here.

Comment 1 Josh Stone 2014-10-07 18:18:35 UTC
Confirmed, module("qxl") works with kernel-3.16.3-200.fc20.x86_64 and fails on kernel-3.16.3-302.fc21.x86_64, yet both work with module("qxl*").  The primary difference I see is that fc21's modules are compressed, like "qxl.ko.xz".

Comment 2 Mark Wielaard 2014-10-07 18:33:17 UTC
This might be elfutils, which didn't handle .ko.xz before:

commit 9d29ed2989b6691457bbd602de740c4423ac8781
Author: Mark Wielaard <mjw>
Date:   Thu Aug 14 22:07:44 2014 +0200

    libdwfl: Handle LZMA .ko.xz compressed kernel modules.
    
    Linux kernel modules can not just be compressed with gz and bz2, but also
    with xz.
    
    Signed-off-by: Mark Wielaard <mjw>

But that commit is in elfutils 0.160, which is in both f20 and f21.
Could you double check the elfutils version in use?
stap -V 2>&1 | head -1

Comment 3 Josh Stone 2014-10-07 19:00:37 UTC
Elfutils is fine.  In the non-wildcard case, we're comparing based on modname_from_path(), which basically takes basename and drops one extension, so "/path/to/qxl.ko.xz" returns "qxl.ko".  That doesn't match "qxl", of course.

The reason we use elfutils' filename rather than its modname is for PR14454:
https://sourceware.org/bugzilla/show_bug.cgi?id=14454

At a minimum, we can improve the extension stripping in modname_from_path(), but I'm looking if anything else should be done...

Comment 4 Fedora Update System 2014-10-07 21:31:37 UTC
systemtap-2.6-3.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/systemtap-2.6-3.fc21

Comment 5 Christophe Fergeau 2014-10-08 08:39:37 UTC
Thanks a lot for the quick investigation! I've tested the new build and it fixes my issue.

Comment 6 Fedora Update System 2014-10-08 19:01:28 UTC
Package systemtap-2.6-3.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemtap-2.6-3.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-12346/systemtap-2.6-3.fc21
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2014-10-11 07:02:18 UTC
systemtap-2.6-3.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.