public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Lee Eric <openlinuxsource@gmail.com>
To: Martin Cermak <mcermak@redhat.com>
Cc: systemtap@sourceware.org
Subject: Re: stap server is not able to use
Date: Mon, 4 Dec 2023 20:08:50 -0500	[thread overview]
Message-ID: <CAOJJ1ZqBWaUp31o9Y48FBrrm-_WM7509p5X26EaxqGfV3FrS_A@mail.gmail.com> (raw)
In-Reply-To: <20231204205323.3jbqqvkpsftlrexq@lida.tpb.lab.eng.brq.redhat.com>

Thanks Martin.

However, it seems the latest Fedora 39 kernel-debuginfo package is not working:

$ uname -r
6.6.3-200.fc39.x86_64
$ sudo stap-prep
Configuring for kernel release 6.6.3-200.fc39.x86_64
Debuginfo automatic downloading is not configured via $DEBUGINFOD_URLS
$ echo $?
0
$ sudo stap --use-server=127.0.0.1:36863 -v sock_traffic_mntr.stp 5
Using a compile server.
Pass 1: parsed user script and 531 library scripts using
539356virt/293212res/15744shr/276808data kb, in 690usr/70sys/760real
ms.
error: cannot open Packages database in
WARNING: cannot find module kernel debuginfo: invalid ELF file [man
warning::debuginfo]
Out of memory.   Please check --rlimit-as and memory availability.
std::bad_alloc
Passes: via server  host=unknown address=127.0.0.1 port=36863
sysinfo="unknown" version=unknown certinfo="unknown" using
269840virt/24840res/20616shr/3244data kb, in 20usr/0sys/1662real ms.
Passes: via server failed.  Try again with another '-v' option.
The kernel on your system requires modules to be signed for loading.
The module created by compiling your script must be signed by a
systemtap compile-server.  [man stap-server]
--use-server was automatically selected in order to request
compilation by a compile-server.

Do we know if any method we can fix this issue?

Thanks.

Eric

On Mon, Dec 4, 2023 at 3:53 PM Martin Cermak <mcermak@redhat.com> wrote:
>
> Hi Eric,
>
> systemtap packages come with stap-prep command that should do it for you:
>
> https://sourceware.org/systemtap/SystemTap_Beginners_Guide/using-systemtap.html#using-setup
>
> Depending on your environment, modern stap-prep may use debuginfod
> for you.  That way you might have needed debugging information
> available without actually installing the debuginfo RPMs.
>
> https://sourceware.org/elfutils/Debuginfod.html
>
> Hope this helps,
>
> Martin
>
>
> On  Mon  2023-12-04  13:57 , Lee Eric wrote:
> > Hi Martin,
> >
> > Thanks for your reply and it seems no connection error on the compile
> > server. However, do we have any updated steps on how to install kernel
> > debuginfo RPM packages? I searched a lot and seems old methods to use
> > debuginfo-install command does not work.
> >
> > Hui
> >
> > On Mon, Dec 4, 2023 at 4:08 AM Martin Cermak <mcermak@redhat.com> wrote:
> > >
> > > Hi Eric,
> > >
> > > On  Sun  2023-12-03  13:03 , Lee Eric via Systemtap wrote:
> > > > Hi,
> > > >
> > > > I just noticed my stap scripts need to run via stap-server and I
> > > > followed the doc link https://sourceware.org/systemtap/wiki/SecureBoot
> > > > to set up stap server. However, I feel like the error messages from
> > > > the stap command is really odd:
> > > >
> > > > # stap --list-server=all
> > > > ...
> > > >  host=thinkpad01.local address=127.0.0.1 port=44621
> > > > sysinfo="6.5.10-300.fc39.x86_64 x86_64" version=5.0
> > > > certinfo="00:c1:73:c9:a1"
> > > >  host=thinkpad01.local address=127.0.0.1 port=44621
> > > > sysinfo="6.5.10-200.fc38.x86_64 x86_64" version=5.0
> > > > certinfo="00:c1:73:c9:a1"
> > > >  host=thinkpad01.local address=127.0.0.1 port=44621
> > > > sysinfo="6.3.8-200.fc38.x86_64 x86_64" version=5.0
> > > > certinfo="00:c1:73:c9:a1"
> > > >  host=thinkpad01.local address=127.0.0.1 port=44621
> > > > sysinfo="6.3.8-100.fc37.x86_64 x86_64" version=5.0
> > > > certinfo="00:c1:73:c9:a1"
> > > >  host=thinkpad01.local address=127.0.0.1 port=44621
> > > > sysinfo="6.3.12-200.fc38.x86_64 x86_64" version=5.0
> > > > certinfo="00:c1:73:c9:a1"
> > > >  host=thinkpad01.local address=127.0.0.1 port=44621
> > > > sysinfo="6.5.9-200.fc38.x86_64 x86_64" version=5.0
> > > > certinfo="00:c1:73:c9:a1"
> > > > ...
> > > >
> > > > And I'm using Fedora 39, so I would like to test if stap can connect
> > > > to a server regardless the stap command ONLY accepting
> > > > hostname/ip/cert serial which they are all the same.
> > > >
> > > > # stap -vvv --use-server=127.0.0.1:44621 -e 'probe begin { exit() }'
> > > > ...
> > > > Session arch: x86_64 release: 6.5.10-300.fc39.x86_64
> > > > Build tree: "/lib/modules/6.5.10-300.fc39.x86_64/build"
> > > > Using a compile server.
> > > > Running sh -c cd '/tmp/stapvTSXTA/client' && zip -qr
> > > > '/tmp/stapvTSXTA/client.zip' *
> > > > Spawn waitpid result (0x0): 0
> > > > Servers matching 127.0.0.1:44621:
> > > >  host=unknown address=127.0.0.1 port=44621 sysinfo="unknown"
> > > > version=unknown certinfo="unknown"
> > > > All specified servers:
> > > >  host=unknown address=127.0.0.1 port=44621 sysinfo="unknown"
> > > > version=unknown certinfo="unknown"
> > > > Unable to connect to a server.
> > > > Passes: via server ? using 264956virt/19200res/16128shr/2424data kb,
> > > > in 0usr/0sys/4real ms.
> > > > Passes: via server failed.  Try again with another '-v' option.
> > > > The kernel on your system requires modules to be signed for loading.
> > > > The module created by compiling your script must be signed by a
> > > > systemtap compile-server.  [man stap-server]
> > > > ...
> > > >
> > > > What's the meaning of that error exactly? Why stap cannot match one
> > > > server in this case? I also did wireshark and I'm sure stap didn't
> > > > talk to the tcp port 44621
> > > >
> > > > Is there any clue about this usage? Any help would be appreciated.
> > >
> > > I think you are missing a `stap --trust-servers ...` step.  We
> > > have a simple testcase for stap server in Fedora CI:
> > >
> > > https://src.fedoraproject.org/rpms/systemtap/blob/rawhide/f/tests/Sanity/stap-server-basic-sanity/runtest.sh
> > >
> > > One of relatively fresh logs showing how it worked on Fedora 39
> > > is here:
> > >
> > > https://artifacts.dev.testing-farm.io/9d3c8552-145d-424f-a4fb-ddda1f5ef58e/work-ci1wn81l3u/plans/ci/execute/data/guest/default-0/tests/Sanity/stap-server-basic-sanity-32/output.txt
> > >
> > > Hope this helps,
> > > Martin
> > >
> >
>

  reply	other threads:[~2023-12-05  1:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-03 18:03 Lee Eric
2023-12-04  9:08 ` Martin Cermak
2023-12-04 18:57   ` Lee Eric
2023-12-04 20:53     ` Martin Cermak
2023-12-05  1:08       ` Lee Eric [this message]
2023-12-06 15:03       ` Martin Cermak
2023-12-06 16:00         ` Lee Eric

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOJJ1ZqBWaUp31o9Y48FBrrm-_WM7509p5X26EaxqGfV3FrS_A@mail.gmail.com \
    --to=openlinuxsource@gmail.com \
    --cc=mcermak@redhat.com \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).