This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug runtime/16861] probes aren't re-registered after module reload
- From: "jlebon at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Thu, 19 Jun 2014 20:33:38 +0000
- Subject: [Bug runtime/16861] probes aren't re-registered after module reload
- Auto-submitted: auto-generated
- References: <bug-16861-6586 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=16861
Jonathan Lebon <jlebon at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jlebon at redhat dot com
--- Comment #1 from Jonathan Lebon <jlebon at redhat dot com> ---
OK, I've looked into this a bit more. It seems like we do register and
unregister when it "makes sense", i.e.
- Upon MODULE_STATE_COMING, we update all the addresses, and then register all
kprobes.
- Upon MODULE_STATE_LIVE, we zero out any init section, and then unregister any
init kprobes.
- Upon MODULE_STATE_GOING, we zero out all sections, and then unregister all
kprobes.
However, it looks like kprobes doesn't like it when we unregister things during
the MODULE_STATE_LIVE and MODULE_STATE_GOING events. This may be due to the
fact that kprobes already checks for these events as well (and is notified
before us) and accordingly disarms no longer valid kprobes (see
kprobes_module_callback()). For that reason, unregistration for no longer valid
module addresses is not necessary.
If we instead unregister and re-register during the MODULE_STATE_COMING event,
then everything works as expected. Note by the way that this is the approach
also done in trace_kprobe.c (see trace_kprobe_module_callback()).
Tentative patch to follow.
--
You are receiving this mail because:
You are the assignee for the bug.