Dtrace is disabled in PHP8.3 package

Asked by Sohei Iwahori

Until PHP 8.1.2-1ubuntu2.19 in 22.04 Jammy, Dtrace option is enables like below:

$ php -i|grep -i dtrace
DTrace Support => available, disabled

I have noticed PHP8.3 package(8.3.6-0ubuntu0.24.04.2) in 24.04 Noble is not compiled with --enable-dtrace option.

$ php -i |grep -i dtrace
DTrace Support => disabled

That means, we can't use any USDT probe point without recompiling PHP by ourselves.

I think it is not an actual bug though, dtrace should be enabled for users who want to trace their applications using this probe points with eBPF etc.
The overhead for tracing is negligible since just enabling dtrace doesn't change code path in PHP unless USE_ZEND_DTRACE environment variable specified.
So I believe re-enabling dtrace could make better futures for PHP users and want to suggest it for upcoming PHP packages, too.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu php8.3 Edit question
Assignee:
No assignee Edit question
Solved by:
Sohei Iwahori
Solved:
Last query:
Last reply:
Revision history for this message
slaters (slaters5050) said :
#1

It seems that in PHP 8.3, the DTrace option is disabled by default, which means you can't use USDT probes without recompiling PHP. While this isn't necessarily a bug, re-enabling DTrace could benefit users who rely on tracing tools like eBPF. Enabling DTrace has minimal overhead since it only activates when the `USE_ZEND_DTRACE` variable is set, and doesn't affect PHP’s code path otherwise. It’s worth suggesting to the PHP maintainers that DTrace be re-enabled in future releases to better support tracing needs.
https://slaters5050.com/locations/torrance/

Revision history for this message
Bernard Stafford (bernard010) said :
#2
Revision history for this message
Sohei Iwahori (egmc) said :
#3

Hi Bernard,
Thank you for the reply!

Though it's not the answer.
Of course I know how I can I enable DTrace by compiling PHP myself.

This is more like a request for PHP package maintainers.
So please let me know if more proper place to request(I posted here because it is not the actual bug).

If it takes the form of a question, does anyone know why `--enable-dtrace ` flag has been dropped that was (at least) enabled in Bionic, Focal? and can I request re-enable it or send patch to do that?

Thanks

Revision history for this message
Bernard Stafford (bernard010) said (last edit ):
#4

I suggest filing a bug report.
sudo ubuntu-bug php8.3
This will start apport to collect extra data for the bug report.
Otherwise the bug report will be incomplete.
Since this is a security package the developers may re-compile it with `--enable-dtrace `.

https://packages.ubuntu.com/noble/php8.3
Reference this question on your bug report, please.

Revision history for this message
Sohei Iwahori (egmc) said :
#5

Hi Bernard,
OK, I have posted a bug report through reporting command.

Thanks!