davepacheco/mod_usdt — Issue #3: mod_usdt not working inside zones [[SmartOS]]
Author: leowmjw
Created: 2011-12-26 06:28:39+00:00
State: open

Hi Dave,

Tried to run the mod_usdt example scripts inside the latest SmartOS zones but does not seem to work. mod_usdt compield as 32-bit. Details below:
========================================================================
[root@percona0 ~/DTRACE_APACHE/mod_usdt]# uname -a
SunOS percona0.joyent.us 5.11 joyent_20111219T225629Z i86pc i386 i86pc Solaris
[root@percona0 ~/DTRACE_APACHE/mod_usdt]# dtrace -ln 'httpd*:::'
ID PROVIDER MODULE FUNCTION NAME
3376 httpd4628 mod_usdt.so dtp_request_done request-done
3377 httpd4628 mod_usdt.so dtp_request_start request-start
3378 httpd4627 mod_usdt.so dtp_request_done request-done
3379 httpd4627 mod_usdt.so dtp_request_start request-start
3380 httpd4629 mod_usdt.so dtp_request_done request-done
3381 httpd4629 mod_usdt.so dtp_request_start request-start
3382 httpd4630 mod_usdt.so dtp_request_done request-done
3383 httpd4630 mod_usdt.so dtp_request_start request-start
3384 httpd4631 mod_usdt.so dtp_request_done request-done
3385 httpd4631 mod_usdt.so dtp_request_start request-start
3386 httpd4632 mod_usdt.so dtp_request_done request-done
3387 httpd4632 mod_usdt.so dtp_request_start request-start
3388 httpd4633 mod_usdt.so dtp_request_done request-done
3389 httpd4633 mod_usdt.so dtp_request_start request-start

[root@percona0 ~/DTRACE_APACHE/mod_usdt]# dtrace -L trans/ -s ./examples/http-requests.d
time latency sta local remote method uri
dtrace: error on enabled probe ID 13 (ID 3380: httpd4629:mod_usdt.so:dtp_request_done:request-done): invalid kernel access in action #5 at DIF offset 8
dtrace: error on enabled probe ID 13 (ID 3380: httpd4629:mod_usdt.so:dtp_request_done:request-done): invalid kernel access in action #5 at DIF offset 8
=================================================================================

Read that somewhere that it could possibly be due to the fact that user running the script must match the user running the daemon (e.g www) when inside a Zone. So tried to run the example DTrace script as user www but was unable to find the provider httpd*. Details below:
================================================================================
-bash-4.1$ whoami
www
-bash-4.1$ uname -a
SunOS percona0.joyent.us 5.11 joyent_20111219T225629Z i86pc i386 i86pc Solaris
-bash-4.1$ dtrace -ln 'httpd*:::'
ID PROVIDER MODULE FUNCTION NAME
dtrace: failed to match httpd*:::: No probe matches description
====================================================================================

Cheers,
Michael Leow