[DTrace-devel] [PATCH 3/4] consume: ustack: handle errors from dt_Pobjname() better

Nick Alcock nick.alcock at oracle.com
Mon Mar 4 22:25:48 UTC 2024


On 4 Mar 2024, Eugene Loh via DTrace-devel stated:

> Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
>
> Out of curiosity, could the failure be triggered intentionally? That
> is, does it make sense to introduce a test that fails without this
> patch but passes with it?

You have to be unlucky, I think: the process has to die at just the
wrong instant (and exec() doesn't count as dying for this application,
since libproc will latch the execed child happily and the caller will
never know). Once we have fork support in USDT we can do it with a test
that fork()s constantly, the parent dies, and the child gets ustacked
constantly -- but we don't have that yet.

But it's quite easy to replicate if you can slow down DTrace enough,
like, say, with valgrind :)



More information about the DTrace-devel mailing list