-
Notifications
You must be signed in to change notification settings - Fork 160
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]: Segmentation fault when using fibers in php 8.1 #2471
Comments
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. |
Aah yes, I was just checking |
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. |
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 |
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 :-) |
Yes, looks like it's not segfaulting anymore!
|
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:
Working:
|
Bug report
When running a CLI script with a Fiber in it, the php process crashes with a Segmentation Fault. When disabling the datadog modules, this issue is gone.
This is happening both on amd64 and arm64 platforms.
Test script:
Error in GDB:
PHP version
8.1.2-1ubuntu2.14
Tracer or profiler version
0.96.0
Installed extensions
[PHP Modules]
calendar
Core
ctype
datadog-profiling
date
ddappsec
ddtrace
exif
FFI
fileinfo
filter
ftp
gettext
hash
iconv
json
libxml
openssl
pcntl
pcre
PDO
Phar
posix
readline
Reflection
session
shmop
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
Zend OPcache
zlib
[Zend Modules]
Zend OPcache
datadog-profiling
ddappsec
ddtrace
Output of
phpinfo()
Upgrading from
No response
The text was updated successfully, but these errors were encountered: