-
Notifications
You must be signed in to change notification settings - Fork 155
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 8.3.13 ftp_fput() gets "Interrupted system call error" unless we use '-d ddtrace.disabled=1' as agument to PHP process call #2952
Comments
Hey @bravoman, thanks for bringing this to my attention. From a preliminary analysis of the ftp extension code, it seems like PHP uses poll(2) internally, which will be interrupted by any signal arriving and return EINTR, which is what you observe. There's no built-in resumption on EINTR in the ftp extension code, which I'd classify as a bug within the ftp extension. The tracer uses a signal to notify about new events being available, which triggers this behaviour. In particular it's used for remote config delivery. This can be disabled via I'll open a bug report on the php-src repository to have this properly fixed for ftp. |
I've opened php/php-src#16800. |
datadog.remote_config_enabled=0 so this could be another workaround for us? |
@bravoman Yes. We also identified a workaround we can implement in dd-trace: mask signal handling as long as ftp functions are being run. I'll check tomorrow how easy it is to just quickly implement that. |
These are sensitive to EINTR, so block the signal during their execution. Fixes #2952. Signed-off-by: Bob Weinand <[email protected]>
Seems it was easy enough (see #2957). We'll release that early next week. |
These are sensitive to EINTR, so block the signal during their execution. Fixes #2952. Signed-off-by: Bob Weinand <[email protected]>
These are sensitive to EINTR, so block the signal during their execution. Fixes #2952. Signed-off-by: Bob Weinand <[email protected]>
These are sensitive to EINTR, so block the signal during their execution. Fixes #2952. Signed-off-by: Bob Weinand <[email protected]>
Bug report
These were our logs when we started out investigating our FTP upload issue:
This consistently went wrong in our process unless used something like this as we workaround
php -d ddtrace.disabled=1 some-script-handling-ftp-upload.php
.PHP version
8.3.13
Tracer or profiler version
1.4.2
Installed extensions
No response
Output of
phpinfo()
[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
ddappsec
ddtrace
dom
exif
FFI
fileinfo
filter
ftp
gettext
hash
iconv
imap
intl
json
libxml
mbstring
mongodb
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
random
readline
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache
ddappsec
ddtrace
Upgrading from
not applicable
The text was updated successfully, but these errors were encountered: