From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1131 invoked by alias); 19 Jul 2016 15:01:24 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 1107 invoked by uid 89); 19 Jul 2016 15:01:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*f:sk:b3c9dd0, resolving, UD:stp, kprobe X-HELO: mail-io0-f170.google.com Received: from mail-io0-f170.google.com (HELO mail-io0-f170.google.com) (209.85.223.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 19 Jul 2016 15:01:22 +0000 Received: by mail-io0-f170.google.com with SMTP id b62so21267016iod.3 for ; Tue, 19 Jul 2016 08:01:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=3pYEvjzYohbyX7Jp9iAbG0xwqL8EBvmdMASzHgyfDlE=; b=Hwslwt8S4ZcnNN/NLx9Bh6qOsTsF+Lmk8KSbh9phrbeGpvW9mZvEz8cR2wagRYWvlS xs+2J2n8Nncq6LqQnshYFj2va51x7g18QWI+DvtHQycCLuxasJnjxiXlzjK/P6xNQphv Pk52JkYK8QX9f/osRmY87yCduGl/xV4wTi1Fyg/4IrVbnxrCg67JS4Bcdds3YcaWnGF0 Getd5py3E1E+S5mBerT/f3GwCGY7szOBWRUDzcwFQpjZmz9/3jYGlvOv4CaXDOXxpEwM SPD8ADFY4i3mXV9UUxQQezRfos71Bw05BPs8ofZjtCHIwraXdl/hLPh/inHWWWishkwW dWFg== X-Gm-Message-State: ALyK8tIiEkdwzMbD8GbyMxZDJWZLsIjzjX2FvHK6X14W40zOjLD9rkp1PuJKzlHvhtQdOrM7/YCmA1hQWTgVGg== X-Received: by 10.107.132.199 with SMTP id o68mr38449687ioi.118.1468940480028; Tue, 19 Jul 2016 08:01:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.129.24 with HTTP; Tue, 19 Jul 2016 08:01:19 -0700 (PDT) In-Reply-To: References: From: buddhika chamith Date: Tue, 19 Jul 2016 15:01:00 -0000 Message-ID: Subject: Re: Systemtap user space probing issue - Unknown symbol in module To: David Smith Cc: systemtap@sourceware.org Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2016-q3/txt/msg00061.txt.bz2 Thanks. So I tried the following. The basic call that you've given works (I was also able to get a similar one working before). # stap -ve 'probe begin { printf("hello world\n"); exit() }' Pass 1: parsed user script and 113 library scripts using 65884virt/29736res/4868shr/25512data kb, in 170usr/10sys/176real ms. Pass 2: analyzed script: 1 probe, 1 function, 0 embeds, 0 globals using 66676virt/31068res/5444shr/26304data kb, in 0usr/0sys/3real ms. Pass 3: using cached /u/budkahaw/.systemtap/cache/36/stap_3678792131e4a93931146ace8f2569d0_1020.c Pass 4: using cached /u/budkahaw/.systemtap/cache/36/stap_3678792131e4a93931146ace8f2569d0_1020.ko Pass 5: starting run. hello world Pass 5: run completed in 0usr/40sys/367real ms. But the next one fails. Missing kernel symbols? # stap -ve 'probe nd_syscall.read { printf("hello world\n"); exit() }' WARNING: Kernel function symbol table missing [man warning::symbols] Pass 1: parsed user script and 113 library scripts using 65884virt/29804res/4936shr/25512data kb, in 130usr/0sys/132real ms. semantic error: while resolving probe point: identifier 'kprobe' at /opt/systemtap/3.0/share/systemtap/tapset/linux/nd_syscalls2.stp:1021:27 source: probe __nd_syscall.read = kprobe.function("sys_read") ^ semantic error: no match semantic error: while resolving probe point: identifier '__nd_syscall' at :1011:2 source: __nd_syscall.read ^ semantic error: no match semantic error: while resolving probe point: identifier 'nd_syscall' at :1:7 source: probe nd_syscall.read { printf("hello world\n"); exit() } ^ semantic error: no match Pass 2: analyzed script: 0 probes, 0 functions, 0 embeds, 0 globals using 66676virt/31136res/5512shr/26304data kb, in 0usr/0sys/3real ms. Pass 2: analysis failed. [man error::pass2] Interestingly the call # stap -vL 'process("./h264ref").function("*")' seem to be working with it spitting out some information on probe points. I am building this with debugging symbols. Thanks On Mon, Jul 18, 2016 at 2:11 PM, David Smith wrote: > On 07/18/2016 05:58 AM, buddhika chamith wrote: >> Hi All, >> >> Not sure if this has been addressed before. Checked the archive and >> couldn't find a solution there. I tried user space probing with >> Systemtap 3.0. But it gives me the following error. >> >> $ sudo stap -e 'probe process("./h264ref").function("*") { printf("hello\n"); }' >> ERROR: Couldn't insert module >> '/tmp/stapsPVPF2/stap_b964ab648506800b700ce82c4e1cf5cd_167937.ko': >> Unknown symbol in module >> WARNING: /usr/bin/staprun exited with status: 1 >> Pass 5: run failed. [man error::pass5] >> Tip: /usr/share/doc/systemtap/README.Debian should help you get started. > > ... stuff deleted ... > >> What do I need to do in order to fix this? > > The first thing to try would be to see if your systemtap installation > can run simple systemtap scripts. The error you see of "Unknown symbol > in module" makes me doubt that it can. Can you look in your kernel logs > to see if the unknown symbol is actually listed? > > Let's try the most basic systemtap script possible: > > # stap -ve 'probe begin { printf("hello world\n"); exit() }' > > Let's try a bit more challenging script: > > # stap -ve 'probe nd_syscall.read { printf("hello world\n"); exit() }' > > If those 2 scripts work, then we'll look at your executable you are > trying to probe. Was your 'h264ref' executable compiled with debugging > info (-g)? > > Try the following: > > # stap -vL 'process("./h264ref").function("*")' > > -- > David Smith > dsmith@redhat.com > Red Hat > http://www.redhat.com > 256.217.0141 (direct) > 256.837.0057 (fax)