public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "mcermak at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug runtime/30131] Testcase at_var_timer_profile.exp regressed
Date: Fri, 17 Feb 2023 08:36:46 +0000	[thread overview]
Message-ID: <bug-30131-6586-mOl90vDK5c@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-30131-6586@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=30131

--- Comment #1 from Martin Cermak <mcermak at redhat dot com> ---
Created attachment 14689
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14689&action=edit
a demo patch

My sense is that it might be a testcase problem:

> Here's the testcase script as of today:
> https://sourceware.org/git/?p=systemtap.git;a=blob;f=testsuite/systemtap.
> base/at_var_timer_profile.stp;h=479f74941a9fd739ea05b0d566c52d8929af7d03;
> hb=HEAD

The testcase has two probes that fire asynchronously:

global active = 0

probe process.function("sub")
{
  active = 1
}

probe timer.profile {
  if (active && pid() == target()) {
      printf("@var(\"foo\", @1)->bar: %d\n", @var("foo", @1)->bar);
      printf("@var(\"foo@at_var_timer_profile.c\", @1)->bar: %d\n",
             @var("foo@at_var_timer_profile.c", @1)->bar);
      printf("@var(\"foo@at_var_timer_profile.c\", @2)->bar: %d\n",
             @var("foo@at_var_timer_profile.c", @2)->bar);
      printf("@var(\"foo\", @1)$: %s\n", @var("foo", @1)$);
      printf("@var(\"foo\", @1)$$: %s\n", @var("foo", @1)$$);
      printf("@defined(@var(\"foo\", \"badmodle\")): %s\n",
             @defined(@var("foo", "badmodule")) ? "YES" : "NO")
      printf("@defined(@var(\"foo\", @3)): %s\n",
             @defined(@var("foo", @3)) ? "YES" : "NO")
      exit()
  }
}


The failure is caused by a fail to read variables that were available in the
first probe process.function (I've checked that), within the second probe -
timer.profile.  My hypothesis is that the second probe simply fires too late,
and the data are gone by then.  IMHO The mentioned kernel update possibly only
impacted the probe timing, indirectly causing this testcase failure. The
attached patch "fixes the failure" and demonstrates this hypothesis.

-- 
You are receiving this mail because:
You are the assignee for the bug.

  reply	other threads:[~2023-02-17  8:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17  8:27 [Bug runtime/30131] New: " mcermak at redhat dot com
2023-02-17  8:36 ` mcermak at redhat dot com [this message]
2023-02-17  8:56 ` [Bug runtime/30131] " mcermak at redhat dot com

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=bug-30131-6586-mOl90vDK5c@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --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).