-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
SIGABRT malloc(): unaligned tcache chunk detected and corrupted double-linked list #798
Comments
Are your servers running ECC ram? This smells like memory corruption of some kind, either by the hardware or some extension doing invalid pointer arithmetic. |
I'm running docker images on virtual machines handled by AWS. It was reproduced multiple times with different VM that probably landed on different hardware. |
With latest image the error seems to be more verbose :
|
Yeah, it's very unlikely this is hardware failure related (it wouldn't be the first time I'd ever seen hardware fail in AWS, but they're pretty good at flagging the machine and telling you it is broken). The stack trace indicates the error is happening on the C side of the code and not the Go side. Looking at your phpinfo, the only thing that stands out to me is the Tideways extension. You can try to disable the Tideways extension and see if the error still shows up, or a better solution would be to run both and see if the problem only shows up on Tideways enabled systems; if we wanted to play a game of disabling things until we're sure which component is causing the problem. If you can keep the container running, I'm reasonably sure that the kernel will do a core dump on this error which we can load in a debugger, but you need to make sure you set |
The phpinfo in the first comment comes from my first test with tideways enabled, but I've removed it since, and I still have this error (I'll edit my first post). |
Just to be clear, you are only seeing this in aws and cannot reproduce it locally? |
I was unable to reproduce locally indeed. I've tried to deactivate pcntl extension (because I've seen a recent bug about it), and still the same crash. I'll try to see if I can collect a crash dump (but it's not an easy task because AWS terminates the container automatically so I need some code to upload it to s3 or something). |
If you can take a shell on the server, you can use GDB and attach it to the process and gather a stack trace directly. |
Will do this ! I'll keep in touch |
We refactored some code and it seems that similar issues are gone. Would you mind testing if the crash still happens for you? |
I'll try again today. Thanks |
Still the same issue with image |
Sad! Could you try to gather a stack trace? |
What happened?
Hi,
I'm deploying a PHP 8.3 symfony (7.0) app on AWS ECS (with Fargate).
I'm running it in worker mode with the base image
dunglas/frankenphp:1.1-php8.3.7
.Every few hours I have error
malloc(): unaligned tcache chunk detected
and more rarelycorrupted double-linked list
.No other error logs, but it seems that the app becomes unresponsive and the ECS Task is shutdown and restarted.
When opening an issue I've just seen
Before submitting a bug, please double-check that your problem is not a known issue (especially if you use XDebug or Tideways
Tideways extension is not listed anymore in the known issues (https://frankenphp.dev/docs/known-issues/). I'm loading this extension. Can this be a problem? (I'm currently running another test without it)
[edit] I've removed tideways and still have errors
Thanks.
Build Type
Docker (Debian Bookworm)
Worker Mode
Yes
Operating System
GNU/Linux
CPU Architecture
x86_64
PHP configuration
Relevant log output
The text was updated successfully, but these errors were encountered: