This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [EXTERNAL] Re: Help
Fieck,
Make sure that you install at least 3 RPM packages
kernel-debuginfo-2.6.32-642.el6.x86_64.rpm
kernel-debuginfo-common-x86_64-2.6.32-642.el6.x86_64.rpm
kernel-devel-2.6.32-642.el6.x86_64.rpm
Try something like
mkdir -p /lib/modules/$KERNEL_VERSION/
rm -f /lib/modules/$KERNEL_VERSION/build
ln -s /usr/src/kernels/$KERNEL_VERSION /lib/modules/$KERNEL_VERSION/build
On Thu, Jun 14, 2018 at 6:49 PM, Fieck, Brennan
<Brennan_Fieck@comcast.com> wrote:
> Arkady,
>
> As you can see in the output of my `yum list installed` command, I do have the debuginfo package (and headers and devel)
> for my kernel installed, but systemtap can't seem to find them for some reason.
>
> Also, idk if it makes a difference, but I'm actually running CentOS 7.4, not 6
> ________________________________________
> From: larytet@gmail.com <larytet@gmail.com> on behalf of Arkady <arkady.miasnikov@gmail.com>
> Sent: Thursday, June 14, 2018 9:33 AM
> To: Fieck, Brennan
> Cc: Vratislav Bendel; systemtap@sourceware.org
> Subject: Re: [EXTERNAL] Re: Help
>
> Fieck,
>
> Assuming CentOS look for the RPM package with the debuginfo
>
> http://debuginfo.centos.org/6/x86_64/
> http://mirror.centos.org/centos-6/6.8/updates/x86_64/Packages/
> http://vault.centos.org/6.4/updates
>
> On Thu, Jun 14, 2018 at 6:16 PM, Fieck, Brennan
> <Brennan_Fieck@comcast.com> wrote:
>> Whoops, it left out my screenfetch info, here's a hosted link: http://pix.toile-libre.org/upload/original/1528989347.png
>>
>> ________________________________
>> From: Fieck, Brennan
>> Sent: Thursday, June 14, 2018 8:51 AM
>> To: Vratislav Bendel
>> Cc: systemtap@sourceware.org
>> Subject: Re: [EXTERNAL] Re: Help
>>
>>
>> Bendel,
>>
>>
>> Thanks for responding. I installed the 'systemtap' package via yum, but it wasn't working, so I built from source
>>
>> to get a more up-to-date version (3.1 -> 3.3). The problem I'm having is that systemtap can't find my kernel's
>>
>> debug symbols. Here's some relevant information:
>>
>>
>> $ stap --version
>>
>> Systemtap translator/driver (version 3.3/0.168, non-git sources)
>> Copyright (C) 2005-2018 Red Hat, Inc. and others
>> This is free software; see the source for copying conditions.
>> tested kernel versions: 2.6.18 ... 4.18-rc0
>> enabled features: BPF JAVA PYTHON2 PYTHON3 LIBRPM LIBVIRT LIBXML2 NLS
>>
>>
>> $ screenfetch
>>
>> [X]
>>
>>
>> $ yum list installed | grep kernel
>>
>> kernel-debug.x86_64 3.10.0-693.21.1.el7 @centos-base
>> kernel-devel.x86_64 3.10.0-693.21.1.el7 @centos-base/7.4.1708
>> kernel-lt.x86_64 4.9.67-1.el7.centos @cdn-Addons
>> kernel-lt.x86_64 4.9.70-1.el7.centos installed
>> kernel-lt-debuginfo.x86_64 4.9.70-1.el7.centos installed
>> kernel-lt-devel.x86_64 4.9.70-1.el7.centos installed
>> kernel-lt-headers.x86_64 4.9.70-1.el7.centos installed
>> kernel-lt-tools.x86_64 4.9.70-1.el7.centos installed
>> kernel-lt-tools-libs.x86_64
>> kernel-lt-tools-libs-devel.x86_64
>>
>>
>> $ repoquery -l kernel-lt-debuginfo
>>
>> 29407
>>
>>
>> $ repoquery -l kernel-lt-debuginfo | cut -d '/' --fields=1,2,3,4,5 | sort | uniq
>>
>> /usr/lib/debug
>> /usr/lib/debug/.build-id
>> /usr/lib/debug/.dwz
>> /usr/lib/debug/lib
>> /usr/lib/debug/usr
>> /usr/src/debug/kernel-lt-4.9.70
>>
>>
>> $ sudo stap -e 'probe vfs.read { exit(); }'
>>
>> semantic error: while resolving probe point: identifier 'kernel' at /usr/local/share/systemtap/tapset/linux/vfs.stp:962:18
>> source: probe vfs.read = kernel.function("vfs_read")
>> ^
>>
>> semantic error: missing x86_64 kernel/module debuginfo [man warning::debuginfo] under '/lib/modules/4.9.70-1.el7.centos.x86_64/build'
>>
>> semantic error: while resolving probe point: identifier 'vfs' at <input>:1:7
>> source: probe vfs.read { exit(); }
>> ^
>>
>> semantic error: no match
>>
>> Pass 2: analysis failed. [man error::pass2]
>>
>>
>>
>> ________________________________
>> From: Vratislav Bendel <vbendel@redhat.com>
>> Sent: Thursday, June 14, 2018 8:03 AM
>> To: Fieck, Brennan
>> Cc: systemtap@sourceware.org
>> Subject: [EXTERNAL] Re: Help
>>
>> Hello Fieck,
>>
>> Firstly you need to install the systemtap package via package manager
>> (depending on what linux-distro you have the command would be for example 'yum' or 'dnf' or 'apt-get' ...)
>>
>> Then the basics are pretty easy. I'd recommend you to read through the Tutorial available at sourceware.org<http://sourceware.org>
>> and try out some of the simple scripts described there (At least that's how I started learning how to use it :) ).
>>
>> The tutorial:
>> https://sourceware.org/systemtap/tutorial.pdf<https://sourceware.org/systemtap/tutorial.pdf>
>>
>> Additionally, systemtap is very well documented in it's "man-pages"
>> and also in other documents at https://sourceware.org/systemtap/documentation.html
>>
>> Also note that there might be additional packages you'd need to install like 'kernel-devel' and 'kernel-debuginfo',
>> however systemtap itself will tell you exactly when you run it.
>>
>> I hope this will be helpful to you.
>>
>> Best regards,
>> Vratislav Bendel
>>
>