public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/29801] New: --monitor mode gets 2 hits to procfs("monitor_control").write for every 1 write
@ 2022-11-17 19:19 rgoldber at redhat dot com
  2022-11-17 19:38 ` [Bug translator/29801] " fche at redhat dot com
  2022-11-18 15:58 ` rgoldber at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: rgoldber at redhat dot com @ 2022-11-17 19:19 UTC (permalink / raw)
  To: systemtap

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

            Bug ID: 29801
           Summary: --monitor mode gets 2 hits to
                    procfs("monitor_control").write for every 1 write
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
          Assignee: systemtap at sourceware dot org
          Reporter: rgoldber at redhat dot com
  Target Milestone: ---

When running monitor mode it looks like for every one write_command call there
are 2 hits to the procfs("monitor_control").write probe. This isn't really an
issue for things like resume and pause, but it causing an issue with quit,
causing the module to lockup

So it turns out that elaborate.cxx::monitor_mode_write derives the procfs write
probe and has it join(and init) the procfs_derived_probe_group. Which enrolls
the probe (adding it to the write_probes set)

Then in semantic_pass_optimize1 the probe is added to the group (and enrolled)
again which causes the second copy of the probe to be added to write_probes
(leading to the above issue)

So to fix this I can either just remove the join_group in monitor_mode_write
(or add some join_group internal conditional to avoid repeats) or I could do a
non-null check on groups before joining them in semantic_pass_optimize1 (but
this could result in new issues with probes which may rely on this underlying
behavior but also would lead to the widest covering solution)

Is their a preference for which fix I go with?

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug translator/29801] --monitor mode gets 2 hits to procfs("monitor_control").write for every 1 write
  2022-11-17 19:19 [Bug translator/29801] New: --monitor mode gets 2 hits to procfs("monitor_control").write for every 1 write rgoldber at redhat dot com
@ 2022-11-17 19:38 ` fche at redhat dot com
  2022-11-18 15:58 ` rgoldber at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: fche at redhat dot com @ 2022-11-17 19:38 UTC (permalink / raw)
  To: systemtap

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

Frank Ch. Eigler <fche at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fche at redhat dot com

--- Comment #1 from Frank Ch. Eigler <fche at redhat dot com> ---
Nice analysis.

I suspect the problem originates from the setup_timeout() code that implements
the stap -T NNN function.  Its join_group etc. stuff was probably buggy, and
was copy-pasted into the monitor-related synthetic probe stuff.

I think the right fix there is to drop the dp->join_group(s); in each of those
clones, because synthetic derived_probe objects are joined at the other area
you found.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug translator/29801] --monitor mode gets 2 hits to procfs("monitor_control").write for every 1 write
  2022-11-17 19:19 [Bug translator/29801] New: --monitor mode gets 2 hits to procfs("monitor_control").write for every 1 write rgoldber at redhat dot com
  2022-11-17 19:38 ` [Bug translator/29801] " fche at redhat dot com
@ 2022-11-18 15:58 ` rgoldber at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: rgoldber at redhat dot com @ 2022-11-18 15:58 UTC (permalink / raw)
  To: systemtap

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

Ryan Goldberg <rgoldber at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Ryan Goldberg <rgoldber at redhat dot com> ---
Closed with commit 92e8ecb3329820992756bbbd3decd3d2ef4f490a

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-18 15:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-17 19:19 [Bug translator/29801] New: --monitor mode gets 2 hits to procfs("monitor_control").write for every 1 write rgoldber at redhat dot com
2022-11-17 19:38 ` [Bug translator/29801] " fche at redhat dot com
2022-11-18 15:58 ` rgoldber at redhat dot com

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).