On Jan 3, 2008 10:25 PM, Matty <[EMAIL PROTECTED]> wrote:
> I am not 100% sure what the PID was, but I am certain there were no
> Java processes running (at least according to ps). After I rebooted
> the server, everything worked flawlessly. Unless anyone has any ideas,
> I will open up a ticket with Sun support. This appears to be some sort
> of bug.

C programs that have USDT probes get linked with drti.o.  Notice that
to register and unregister the USDT probes, drti.c[1] does the
following in ini and fini functions.

   fd = open(/dev/dtrace/helper, ...)
   ioctl(fd, ...)
   close(fd)

Assuming that Java is using this same mechanism, it suggests to me
that the fini function was not called or failed.  Would it be called
if the java process was killed in a bad way (e.g. SIGSEGV, SIGKILL)?
Is it possible that the process could be out of file descriptors when
the open() call happens in fini?

Perhaps there is a need (maybe already exists) a hook in the kernel
code called during process cleanup to do the equivalent of
ioctl(fd, DTRACEHIOC_REMOVE, gen) from within the kernel just in case
the user space code fails.

1.http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libdtrace/common/drti.c

-- 
Mike Gerdts
http://mgerdts.blogspot.com/
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to