dunglas / frankenphp

🧟 The modern PHP app server
https://frankenphp.dev
MIT License
6.64k stars 218 forks source link

Random PHP errors when in worker mode (extremely rare) #114

Closed withinboredom closed 1 year ago

withinboredom commented 1 year ago

I'm seeing random (but extremely rare: <0.5% of requests) fatal PHP errors in worker mode:

There's no interface or trait specified in the error, just to be clear, those errors are the literal messages given. The error occurs on random lines/files.

This never happens outside of worker mode and I cannot reproduce it in a smaller sample.

The relevant error messages are coming from these lines in php-src. It smells like some memory shenanigans but it isn't clear if it is a frankenphp bug or a PHP/extension bug.

dunglas commented 1 year ago

Could you try running PHP with the debug mode and core dumps enabled, and crash in the function you pointed out so we can get a stack trace?

danilopolani commented 1 year ago

Hey, this was a bug from PHP 8.2.1 and fixed in 8.2.2: https://github.com/php/php-src/issues/9675#issuecomment-1385057885

withinboredom commented 1 year ago

Nice! Frankenphp is currently on 8.2.2, so closing!