Open moerkey opened 10 months ago
Hey @moerkey,
the correct parent process of datadog-ipc-helper would be systemd itself, being pid 1; i.e. that's what happens when a process is daemonized (forks itself twice and kills the first fork).
Systemd thinks the datadog-ipc-helper belongs to php8.0-fpm.service as both share the same cgroup, given that a php-fpm process is starting it.
I'm not sure why systemd puts the datadog-ipc-helper into /system.slice/salt-minion.service for you though, after the original cgroup terminates.
As far as I have researched, it doesn't seem to be possible to put the datadog-ipc-helper into another cgroup (generally) as the fpm and apache processes are running as www-data, but nearly everything needs root and it's not like there's an user session active for www-data either, which could inherit it.
I am not sure what or whether we're able to do about this.
The process can currently be disabled by disabling telemetry, but for example ASM also relies on that telemetry, and in future more things will be sent through it.
Hey @bwoebi,
thank you for the explanation. At first, I would fix that the process does not run as root (user who installed the app) after an installation or update of Datadog PHP tracer. It should run as www-data right? Currently, I need to reboot the system that it runs as this user.
Out of curiosity. How does the process start itself, or who starts it? And where is the binary? I could not find it on disk.
Cheers
It does not matter as which user the daemon runs, and can be communicated with by any user over its shared memory unix socket. It simply is spawned by the first php process, i.e. the first time php with the extension code is executed.
Bug report
Hello,
I have the pleasure to administrate some web servers where I have to update the Datadog PHP tracer from time to time.
Since version 0.90.0 I have trouble with the added process datadog-ipc-helper and needrestart. After installing the new version, some services want to get restarted all the time. After the update of Datadog PHP Tracer the tool needrestart complains about salt-minion.
But why salt-minion do you ask, because the systemd thinks datadog-ipc-helper is correlated to the salt-minion daemon.
But this behaviour changes after a reboot. Then a PHP process should be restarted over and over again.
Some version infos.
So I would question how data datadog-ipc-helper will be started. Can it be deactivated? Why can systemd not get the correct parent of datadog-ipc-helper? Should there be a parent? And last but not least, why is needrestart thinking that datadog-ipc-helper needs to get restarted?
PHP version
8.0.30
Tracer or profiler version
0.93.2
Installed extensions
[PHP Modules] amqp bcmath calendar Core ctype curl date ddappsec ddtrace dom exif FFI fileinfo filter ftp gd gettext hash iconv igbinary imagick intl json libxml mbstring mongodb openssl pcntl pcre PDO pdo_sqlsrv Phar posix readline redis Reflection session shmop SimpleXML sockets sodium SPL sqlsrv standard sysvmsg sysvsem sysvshm tidy tokenizer xml xmlreader xmlrpc xmlwriter xsl Zend OPcache zip zlib
[Zend Modules] Zend OPcache ddappsec ddtrace
Output of
phpinfo()
No response
Upgrading from
0.89.0 > 0.90.0 > 0.91.2 > 0.93.1 > 0.93.2