-
Notifications
You must be signed in to change notification settings - Fork 159
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]: Segfault when profiling is enabled in php 8.4.1 on Ubuntu #3012
Comments
Hello @SanderVerkuil 👋 |
@realFlowControl Thanks for getting back to me. Running it with valgrind showed me the following:
Not sure what causes this, but when I disable the profile.so I see no errors. |
Thank you for the report. I noticed that excimer is also loaded. If you load profiling and not excimer, do you have issues? Sometimes these intrusive tools can mess with each other--I'm not aware of any current issues but it's happened some times in the past that two profilers/tracers/debuggers/observer things conflict. |
Unfortunately disabling excimer didn't work. So at least it's not a conflict between those tools. I did see it happening in our Docker container as well, so I might be able to reproduce it locally as well. I could also see whether I can create a demo repository where this issue can be reproduced, though with the holidays coming up I might not have time for that unfortunately. |
@SanderVerkuil Based on the stack trace, I think if you disable allocation profiling that it may not crash anymore. There is a config mode you use to set the INI: php datadog-setup.php config set \
-d datadog.profiling.allocation_enabled=0 \
--php-bin all # or whatever binaries you want I am continuing to look at the data you provided to try and evaluate the root cause. If you continue to have crashes after disabling memory allocation profiling, I'd like the stack traces! If you can create it with a demo repo, that would be even more helpful, of course! |
@morrisonlevi Thanks for the response, but unfortunately the allocation_enabled setting was already set to I did see something related to |
The default is not 0. If setting it to zero doesn't solve the crash, I'd very much like stack traces from each thread! The high level description of the stack trace you posted above is:
So if it fails without allocation profiling, the stack will be different and hopefully illuminating. |
Ah alright, I've disabled the profiling, and running it with Valgrind (which was the easiest to get a stacktrace, hopefully it is sufficient), I get the following stacktrace:
This was with
Not sure which of these is easier to read/follow. I've just updated PHP to 8.4.2, unfortunately the issue exists there as well. |
I am able to reproduce this somewhat reliably now and am investigating. |
That's great to hear! If you need any more information, or any more help, please do let me know, I'll be happy to help. |
@morrisonlevi I see that you've created an MR, and I'd be happy to test it. Is there a way for me to compile the PR and test it on my environment? |
Hey @SanderVerkuil, |
Thanks @realFlowControl ! I managed to install it. @morrisonlevi After using that version, the initial page was loading properly, but after one request I got the following stacktrace. So I did get a bit further, but there are still some small issues unfortunately.
|
Hey @SanderVerkuil, |
The linked PR fixes an issue on PHP 8.4 which I believe you were hitting. I will work to get a release out soon. Let me know if this does not fix your issue. |
@morrisonlevi Splendid! That did it. Thanks for the help everyone! |
Hey @SanderVerkuil 👋 |
FYI, @SanderVerkuil, other fixes for PHP 8.4 were shipped today in v1.6.3. You should upgrade! |
Bug report
When running Symfony 6.4 in PHP8.4 with the profiler enabled, the PHP-FPM process exits with a segfault.
The output of
dmesg | grep segfault | tail -10
is:The application works properly with PHP 8.3, but is just fails with PHP 8.4. When I disable the
datadog-profiling.so
package, FPM works properly, but the profiling is disabled which we use quite extensively.If more information is necessary, please let me know and I'll be happy to provide.
PHP version
8.4.1
Tracer or profiler version
1.5.1
Installed extensions
Output of
phpinfo()
Upgrading from
I'm upgrading from PHP8.3, and there it worked properly. I used to have PHP8.4.0RC4 installed, but now php 8.4.1 is installed. I did redownload the installer, and ran the installer once more.
The text was updated successfully, but these errors were encountered: