[DynInst_API:] DYNINSTuserMessage() in a function called with oneTimeCode()


Date: Mon, 11 Feb 2013 12:49:25 -0600
From: David Smith <dsmith@xxxxxxxxxx>
Subject: [DynInst_API:] DYNINSTuserMessage() in a function called with oneTimeCode()
I'm working with Josh Stone on using dyninst as a systemtap backend, and
I've got a question. As he's mentioned on this list, we're interested in
using DYNINSTuserMessage() to implement a data channel between
mutator/mutatee.

First some background. We've got several types of probes in systemtap.
For this discussion, I'll limit them to 'location based' and 'process
event' probes.

An example of a 'location based' probe would be a function entry or exit
probe. For these probes we use insertSnippet() to add a probe at the
right spot.

An example of a 'process event' probe would be a process fork, process
death, etc. probe. For these probes I've used the various callback
functions provided by dyninst, like registerThreadEventCallback(),
registerExitCallback(), etc. When the event happens, the code stops the
mutatee and then uses oneTimeCode() to call the probe's handler. (In
systemtap all probes run in the context of the mutatee.)

OK, that is hopefully enough background (feel free to ask for more) to
describe the problem I'm seeing. When DYINSTuserMessage() is called from
a snippet used to implement a 'location based' probe, it works just
fine. However, when DYNINSTuserMessage() is called from a function
called by oneTimeCode(), I get the following error:

  IRPC on terminated process, ret false!

My uneducated guess would be there is some back-and-forth oddity with a
oneTimeCode IRPC itself sending a DYNINSTuserMessage.

So, my question would be is this error just a bug that needs fixing or a
design limitation (that isn't likely be changed)?

Thanks for the help.

-- 
David Smith
dsmith@xxxxxxxxxx
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)
[← Prev in Thread] Current Thread [Next in Thread→]