[dtrace-discuss] Newbie Question

Adam Leventhal ahl at eng.sun.com
Sat Jul 28 18:45:34 PDT 2007


On Tue, Jul 24, 2007 at 01:28:21PM -0700, Daniel Templeton wrote:
> It works fine, mostly.  In certain places, I get output like the following:
> 
> dtrace: error on enabled probe ID 1397 (ID 12048: 
> dsge4164:sge_execd:mconf_get_simulate_hosts:exit): invalid address 
> (0x5e1b87) in action #2 at DIF offset 28
> 
> Clearly, dtrace couldn't resolve one of the char *'s.  It happens every 
> time this probe gets called.  It also happens more randomly with some 
> other probes.  Is dtrace finding pointer problems in the source code, or 
> is this problem related to memory getting paged around?  In other words, 
> should I be debugging my project or the DTrace end of things?

I'd wager the problem is that the string at 0x5e1b87 hasn't been paged in
since DTrace is the first thing touching it. This is a long-standing issue
and one that's not easily resolved in DTrace. If you could arrange to
'touch' those strings either once during your program's initialization or
before the DTrace probe it should fix the problem.

You can confirm that this is the issue by using mdb to print the address as
a string:

$ mdb -p `pgrep myapp`
> 0x5e1b87/s
...

Adam

-- 
Adam Leventhal, Solaris Kernel Development       http://blogs.sun.com/ahl


More information about the dtrace-discuss mailing list