Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: PHP message: [ddtrace] [error] Failed signaling lifecycle end: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" } #2991

Open
piotrekkr opened this issue Dec 11, 2024 · 2 comments
Labels
🐛 bug Something isn't working

Comments

@piotrekkr
Copy link

piotrekkr commented Dec 11, 2024

Bug report

Seems like this bug reappeared in 1.5.1 on Cloud Run in GCP. After deploy we had a lot of those errors today. Revert to 1.1.0 helped.

Errors:

PHP message: [ddtrace] [error] Failed sending remote config data: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }

PHP message: [ddtrace] [error] Failed signaling lifecycle end: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }

Docker image we use

FROM php:8.2.26-fpm-bookworm@sha256:f9bee1c4e181e5d8f3ba06b00763210982c927dcd4df86435b24b9bcc10aac1c 

# ......

COPY --from=datadog/serverless-init:1.5.1 /datadog-init /app/datadog-init
ADD https://github.com/DataDog/dd-trace-php/releases/download/1.5.1/datadog-setup.php /datadog-setup.php
RUN php /datadog-setup.php --php-bin=all --enable-profiling

ARG APP_VERSION
ENV APP_VERSION="${APP_VERSION}"

ENV DD_VERSION="${APP_VERSION}"
ENV DD_LOGS_ENABLED=true
ENV DD_TRACE_ENABLED=false
ENV DD_TRACE_PROPAGATION_STYLE=datadog
ENV DD_APM_ENABLED=false
ENV DD_SERVICE=my-service
ENV DD_SITE=datadoghq.eu
ENV DD_DOGSTATSD_PORT=8125

ENTRYPOINT ["/app/datadog-init"]

CMD ["/usr/local/sbin/php-fpm"]

When running container we set

DD_ENV=production
DD_APM_ENABLED=true
DD_TRACE_ENABLED=true

PHP version

8.2.26

Tracer or profiler version

1.5.1

Installed extensions

bcmath
bz2
Core
ctype
curl
datadog-profiling
date
ddappsec
ddtrace
dom
fileinfo
filter
gd
gmp
hash
iconv
imagick
intl
json
libxml
mbstring
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
random
readline
Reflection
session
SimpleXML
sodium
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache
datadog-profiling
ddappsec
ddtrace

Output of phpinfo()



Datadog PHP tracer extension
For help, check out the documentation at https://docs.datadoghq.com/tracing/languages/php/
(c) Datadog 2020

Datadog tracing support => enabled
Version => 1.5.1
DATADOG TRACER CONFIGURATION => {
    "date": "2024-12-11T17:56:29Z",
    "os_name": "Linux d68a4bc6aca3 6.8.0-47-generic #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Oct  2 16:16:55 UTC 2 x86_64",
    "os_version": "6.8.0-47-generic",
    "version": "1.5.1",
    "lang": "php",
    "lang_version": "8.2.25",
    "env": null,
    "enabled": true,
    "service": "api-core",
    "enabled_cli": true,
    "agent_url": "http:\/\/localhost:8126",
    "debug": false,
    "analytics_enabled": false,
    "sample_rate": -1,
    "sampling_rules": [],
    "tags": [],
    "service_mapping": [],
    "distributed_tracing_enabled": true,
    "dd_version": "1.1862.0",
    "architecture": "x86_64",
    "instrumentation_telemetry_enabled": false,
    "sapi": "cli",
    "datadog.trace.sources_path": "\/opt\/datadog\/dd-library\/1.5.1\/dd-trace-sources\/src",
    "open_basedir_configured": false,
    "uri_fragment_regex": null,
    "uri_mapping_incoming": null,
    "uri_mapping_outgoing": null,
    "auto_flush_enabled": true,
    "generate_root_span": true,
    "http_client_split_by_domain": false,
    "measure_compile_time": true,
    "report_hostname_on_root_span": false,
    "traced_internal_functions": null,
    "enabled_from_env": false,
    "opcache.file_cache": null,
    "sidecar_trace_sender": false,
    "agent_error": "Failed to connect to localhost port 8126 after 0 ms: Couldn't connect to server"
}

Upgrading from

Upgrading from 1.1.0

@piotrekkr piotrekkr added the 🐛 bug Something isn't working label Dec 11, 2024
@piotrekkr
Copy link
Author

Could it be because I set DD_DOGSTATSD_PORT=8125 and it is not used by ddtrace and it fails with Failed to connect to localhost port 8126 after 0 ms: Couldn't connect to server?

@piotrekkr
Copy link
Author

Just happened on some other services we deploy. Same serverless-init and ddtrace version. I was forced to revert to 1.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant