Date: Mon, 9 Apr 2018 12:01:44 +0200 From: Daniel Dettlaff <dmilith@gmail.com> To: freebsd-hackers@freebsd.org Subject: Tracing with DTrace, when custom probe provider is running as regular user Message-ID: <1D449DD6-4D38-4561-8BD0-B6E581AB53A8@gmail.com> References: <B7FD6BB4-D74A-4C7F-8C9A-487A25FFCA43@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_83BA4A4D-3533-4C18-A6A3-E7B8BB571557 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hello FreeBSD hackers. I have question about real world Dtrace tracing = on our favourite platform. Yesterday did enable dtrace for my builds of Erlang*, Php*, Node and = Postgresql9x on my x86_64 11.1 system. It works very well in general, = with one exception - I'm unable to get probes from software running as = regular user. So for example - I can launch Erlang 19.3.x REPL as root (`erl`), and do = `dtrace -l | grep beam` - to see new provider with Erlang probes.. but = if I launch exactly same Erlang REPL as regular user ("www" in my case) = - I cannot see published probes when invoking `dtrace -l` (as root). I = also can't invoke `dtrace -l` as regular user obviously. Here's example on a single screenshot: http://s.verknowsys.com/38a22eb93f473a0bac43e5e56f3d7f35.png =E2=87=92 red lambda =E2=87=92 root, gray lambda =E2=87=92 = regular user. =E2=87=92 Erlang REPL running as root =E2=87=92 probes are = there.. but when as regular user =E2=87=92 nothing Issue is critical for tracing Postgresql which demands to run with NON = privileged user, but in general launching any server software as root = should be considered to be "harmful" / "a bad idea" right? So question is - is there a way to work around this? I wish to be able = to trace user software as root using dtrace. Is there a way to do it? I = build whole system from source so I can even do custom patch if I'd know = where to look :) Thanks in advance! -- Daniel (dmilith) Dettlaff --Apple-Mail=_83BA4A4D-3533-4C18-A6A3-E7B8BB571557 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iF0EARECAB0WIQTRxYhlHcH16So4S7KBOC9Vj5almgUCWss6CAAKCRCBOC9Vj5al msv6AJ0eOeEVZ1S5Fuik8hqsR7C+NMVD4QCdHNnk05HsfXpQ21Ub9rmh6daD5dQ= =IsEv -----END PGP SIGNATURE----- --Apple-Mail=_83BA4A4D-3533-4C18-A6A3-E7B8BB571557--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1D449DD6-4D38-4561-8BD0-B6E581AB53A8>