Code Monkey home page Code Monkey logo

Comments (7)

bwoebi avatar bwoebi commented on May 25, 2024 1

Hey, we know about this issue and have a fix for this ready already: #2446.

We'll release it soon, in the meantime, feel free to download and install with this generated installer for the bugfix branch: https://output.circle-artifacts.com/output/job/4429d2ad-e1ab-486b-b7c5-17006d5ed0e2/artifacts/0/datadog-setup.php

EDIT: Read too fast, I saw PHP 8.1.2 and a similar backtrace to that issue, but it's different, sorry. I'm looking at it more closely.

from dd-trace-php.

DuckThom avatar DuckThom commented on May 25, 2024

Aah yes, I was just checking v0.96.0+6fc83d6357315310881ff7a7fb0067e27620839c and the segfault is indeed still there, no worries 😄

from dd-trace-php.

bwoebi avatar bwoebi commented on May 25, 2024

I can confirm the issue, it should be broken between 8.1.0 and 8.1.3.

Given that you are using Fibers, I'd like to point out that fibers do have problems with garbage collection in early 8.1 and 8.2 versions, see php/php-src#10496 (< 8.1.17, <8.2.4).

Anyhow, I'll look at how we can fix this.

from dd-trace-php.

DuckThom avatar DuckThom commented on May 25, 2024

I see, thanks for looking into it. We're unfortunately not able to update to a newer PHP version as this is the one provided by Ubuntu's latest LTS (22.04.3) when installing php8.1.

from dd-trace-php.

bwoebi avatar bwoebi commented on May 25, 2024

Hey @DuckThom,

please try https://output.circle-artifacts.com/output/job/ae5cabd4-20fc-4602-88b2-d5d9dd2bdfe2/artifacts/0/datadog-setup.php (#2473) - this should actually fix your issue :-)

from dd-trace-php.

DuckThom avatar DuckThom commented on May 25, 2024

Yes, looks like it's not segfaulting anymore!

root@da900e3e96d7:/# php -v
PHP 8.1.2-1ubuntu2.14 (cli) (built: Aug 18 2023 11:41:11) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.2-1ubuntu2.14, Copyright (c), by Zend Technologies
    with ddtrace v0.96.0+cc0141a367abcf01b32ed2c50e166edb2255baa8, Copyright Datadog, by Datadog
    with datadog-profiling v0.96.0+cc0141a367abcf01b32ed2c50e166edb2255baa8, Copyright Datadog, by Datadog
    with ddappsec v0.96.0, Copyright Datadog, by Datadog
root@da900e3e96d7:/# php script.php

from dd-trace-php.

DuckThom avatar DuckThom commented on May 25, 2024

For reference, I've been using this Dockerfile for testing:

FROM ubuntu:jammy

ARG DD_SETUP_URL

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update -y \
 && apt-get install -y wget curl php8.1 \
 && wget $DD_SETUP_URL \
 && php datadog-setup.php --php-bin all --enable-profiling \
 && echo "<?php \$fiber = new Fiber( function() { \$a = 1; } ); \$return = \$fiber->start();" > script.php

CMD php script.php

Broken setup:

docker build --build-arg DD_SETUP_URL="https://github.com/DataDog/dd-trace-php/releases/download/0.96.0/datadog-setup.php" -t dd-test . && docker run --rm dd-test; echo $?
Segmentation fault
139

Working:

docker build --build-arg DD_SETUP_URL="https://output.circle-artifacts.com/output/job/ae5cabd4-20fc-4602-88b2-d5d9dd2bdfe2/artifacts/0/datadog-setup.php" -t dd-test . && docker run --rm dd-test; echo $?
0

from dd-trace-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.