From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by sourceware.org (Postfix) with ESMTPS id 87EC43858C00 for ; Sat, 29 Jul 2023 12:46:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 87EC43858C00 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-3fbab0d0b88so28837645e9.0 for ; Sat, 29 Jul 2023 05:46:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690634776; x=1691239576; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=MJ+IyL3g9NQK/BM+qaswBh4EvWfWRsktFP+cx200sQ8=; b=CB9ELkvZaNjXmWCp8eJbtULDSeh85HR3LpneGinXNbJMxLv7DOjRgodzzKygf6YJlk wrAVynnl+4q54Fg/KUmFKGTRXRYyhcbnvSCGTDEFyt02ossBOqa6Oi4bqUQFjaSZ8l4d trhpFTltVpU0pJycFwKLNuUi9PBau4vXGZzbhQHXEYAqGnyIEXzsY90QnX2DzLS/T0Tu nHDI54bWM/8rmxuQaYSYS9S140WfelbIU8yB2lWqUVZu6hC5jy/miwq1PpBHhCjGt+B6 U4o+8FLfAIShDgD6gJaCA1r1Hy4noMyNz4Ue0iBi/v5/nuBzdetJLq+/2sKSaIewREq0 M0yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690634776; x=1691239576; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MJ+IyL3g9NQK/BM+qaswBh4EvWfWRsktFP+cx200sQ8=; b=Ehjyh9gYAlkr5lunEw3x0j680xmdrmN27OHRVgmD69uB6gMs5nVuuvpALeVHLmfqe6 Ina2k1hW0SWd2xjkoN8UZxxnQV3hRsY3yHhODEv7rPjNndxIoR0wsP0nhzbNQKNxmoY5 m2b8ZbkofoFOK8ftRaoZ6gErEXEFwS4kACDtuTsJVGLyTV7GhkYqtDq+6fZ9RpIRWfks tVUyHgufnZTj3x22hCs/A8+z2WzaO9LGMFHrQVyTSFUYdg6dgHKztQy4pD2ysAVFKSTq bKncsBAW7C0Lhpn4ZmuGd6KwK+ioWr6aGTBUSC9m6eHF2zd5CupgDsxlG6jswQjiT6Ci TG2g== X-Gm-Message-State: ABy/qLbcQGQCuR/3b1w0idIfC2nsEIVBBf7eUHEnlcEuE/mi935cHSwL NlXQSPLSAsG2qZs7NqEtAinZ1nbnXoZxcyCf0WppIk3dG8UqwEaF X-Google-Smtp-Source: APBJJlHxl9htDWs5XRg5EogZVanCA5mG6VbG8LxzDqFn5tabFOIsZ6mtPEFqh1cjxEqkuIgWasIHUBatWI+B7WGXjxw= X-Received: by 2002:a5d:4292:0:b0:313:e2e3:d431 with SMTP id k18-20020a5d4292000000b00313e2e3d431mr6642944wrq.12.1690634775832; Sat, 29 Jul 2023 05:46:15 -0700 (PDT) MIME-Version: 1.0 References: <87cz0bu9g4.fsf@redhat.com> In-Reply-To: <87cz0bu9g4.fsf@redhat.com> From: wei gong Date: Sat, 29 Jul 2023 20:46:04 +0800 Message-ID: Subject: Re: Using systemtap in an Environment with Multiple Versions of glibc To: "Frank Ch. Eigler" Cc: systemtap@sourceware.org Content-Type: multipart/alternative; boundary="000000000000422b5f06019f95f6" X-Spam-Status: No, score=1.2 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --000000000000422b5f06019f95f6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Frank Ch. Eigler =E4=BA=8E2023=E5=B9=B47=E6=9C=8829=E6=97= =A5=E5=91=A8=E5=85=AD 03:23=E5=86=99=E9=81=93=EF=BC=9A > > wei gong writes: > > > [...] > > I am currently experiencing challenges using SystemTap in an environment > > that includes multiple versions of glibc. I am hoping someone here may > have > > encountered a similar issue and might be able to provide guidance. > > [...] > > Currently, my environment has glibc-2.17-326.el7_9.x86_64. Because I wa= nt > > to use a newer version of GCC, I installed an additional version of GCC > and > > matched it with glibc 2.21, which I placed in the /opt/compiler/gcc-8.2/ > > directory. My software is compiled using this newly installed version of > > gcc-8.2. > > [...] > > > ./stap -d /path/myapp-DDEBUG_UNWIND -e 'probe > > process("/path/myapp").function("funtion_name").call > {print_ubacktrace()}' > > WARNING: Missing unwind data for a module, rerun with 'stap -d (unknown; > > retry with -DDEBUG_UNWIND)' > > One possibility is that this program, being compiled with your other > gcc/glibc toolchain, is not getting identified to systemtap for purpose > of extracting unwind/symbol data. > > > WARNING: Missing unwind data for a module, rerun with 'stap -d > /usr/lib64/ > > libc-2.17.so' > > WARNING: too many pending (warning) messages > > Yeah, that's a hint. The "-d FILE" and "--ldd" options should let you > give systemtap enough hints to find the alternate toolchain shared > libraries. Try: > > # stap --ldd -d /opt/compiler/gcc-8.2/usr/lib/libc.so.6 -e 'probe > ("myapp").......' > > If more missing library names come up as runtime warnings, rerun, and > add them as -d PATHs too. > > > stap --ldd -d /opt/compiler/gcc-8.2/usr/lib/libc.so.6 -d /opt/compiler/gcc-8.2/lib/ld-linux-x86-64.so.2 -d /opt/compiler/gcc-8.2/lib64/ld-linux-x86-64.so.2 -e 'probe process("myapp").function("func_name").call {print_ubacktrace()}' WARNING: module /home/opt/compiler/gcc-8.2/lib/libc-2.21.so --ldd skipped: unsupported interpreter: /opt/compiler/gcc-8.2/lib/ld-linux-x86-64.so.2 WARNING: module myapp --ldd skipped: unsupported interpreter: /opt/compiler/gcc-8.2/lib64/ld-linux-x86-64.so.2 Trigger probe point function WARNING: Missing unwind data for a module, rerun with 'stap -d (unknown; retry with -DDEBUG_UNWIND)' 0x8789b6 > - FChE > > --000000000000422b5f06019f95f6--