dd-trace-php icon indicating copy to clipboard operation
dd-trace-php copied to clipboard

PHP CLI segmentation faults with datadog-php-tracer 0.67.0 in Octane

Open semalley opened this issue 3 years ago • 11 comments

We trying to configure DataDog APM, in our PHP Laravel project. First installation was succeed (instead of some non traceable cli kafka listeners), but after we add new feature Laravel Octane based on swoole, it stops working.

PHP version: 8.0.12 Laravel: v8.58.0 Laravel octane: v1.0.12

datadog-php-tracer: 0.67.0

Running in docker container, here is installation example

ENV DD_ENV="local"
ENV DD_SERVICE "service-name"
ENV DD_VERSION="some-new-version"

ENV DD_AGENT_HOST dd-host
ENV DD_TRACE_AGENT_PORT "8126"
ENV DD_PROFILING_ENABLED true
ENV DD_LOGS_INJECTION true
ENV DD_TRACE_DEBUG true
ENV DD_TRACE_CLI_ENABLED true

ARG DD_TRACER_VERSION=0.67.0
RUN curl -o /tmp/dd-trace-php.deb -L https://github.com/DataDog/dd-trace-php/releases/download/${DD_TRACER_VERSION}/datadog-php-tracer_${DD_TRACER_VERSION}_amd64.deb
RUN dpkg -i /tmp/dd-trace-php.deb

Example of running command: DD_TRACE_GENERATE_ROOT_SPAN=0 DD_TRACE_AUTO_FLUSH_ENABLED=1 php artisan octane:start --port=8099 --max-requests=500 --workers=2

The output is: Segmentation fault

semalley avatar Nov 18 '21 11:11 semalley

Hello @semalley, thank you for the report. We will be looking into this as soon as possible. If my understanding of Octane is correct it relies on async frameworks under the hood. We are currently not officially supporting this programming paradigm (but we want to support it soon, though) and the results might be unpredictable.

We will post here as soon as we have news. For now I am marking this as a Severity 1 issue, it might become a feature request.

labbati avatar Nov 18 '21 11:11 labbati

Thanks for fast response @labbati , will wait for any news. Yes you right about Octane understanding.

semalley avatar Nov 18 '21 11:11 semalley

Looking forward for Laravel Octane support. Thanks!

andreisusanu avatar Feb 05 '22 18:02 andreisusanu

Hi @labbati, is there any further news on async framework support, specifically related to Laravel Octane (with Roadrunner or Swoole)?

matthewnessworthy avatar Nov 13 '22 23:11 matthewnessworthy

cc @pierotibou which can bring to the table more up-to-date news than myself.

labbati avatar Nov 14 '22 10:11 labbati

Same here. We are not able to make the agent works with Laravel + Octane.

deniscsz avatar Jul 20 '23 21:07 deniscsz

Absolutely the same. We really need this feature on our project. Pleeeaaaseeee!

AratKruglik avatar Nov 21 '23 10:11 AratKruglik

Would be great if this feature were implemented ASAP! Please and thank you

pikolo-z avatar Nov 21 '23 11:11 pikolo-z

Same here, looking for forward to it

neverSeen1993 avatar Nov 22 '23 09:11 neverSeen1993

Hello, we do support RoadRunner since v0.83.1. So you should get for tracing Laravel Octane with RoadRunner. If you have any feedback for that setup, we'd be glad to hear it. Sorry for not communicating on this support earlier.

We don't support Swoole yet. It's in the books since we're supporting Fibers but we didn't have the time to work on it yet. This work will likely be shipped in the second quarter of 2024.

cc @PROFeNoM for visibility.

pierotibou avatar Nov 22 '23 13:11 pierotibou

@pierotibou could you tell about how to instrumentate with roadrunner? i tried to use the APM and doesn't worked

sneycampos avatar Apr 11 '24 11:04 sneycampos