Description
Q | A |
---|---|
Bug report? | yes (?) |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Symfony version | 3.4.5 |
We have run into a peculiar issue that only occurs under certain conditions, but due to the nature of a closed-source third party extension, we are not entirely sure what these conditions are. We can only see it happening (from time to time).
We use Sentry to track errors in our application (sentry/sentry@1.8.3
& sentry/sentry-symfony@1.0.0
). We also have a new relic extension installed (monitoring agent). Both of these register exception handlers. Most of the time, all is well, the sentry handler handles an exception and reports it to their API. End of process.
But sometimes, we end up in a loop where we see the new relic exception handler appear in the call stack (closed source unfortunately), and at this point we end up with some odd/peculiar circular reference where the sentry handler will see the symfony debug errorhandler as the prev handler, which in turn somehow ends up calling the sentry handler again, and this then repeats infinitely.
Normally the callstack/timeline would end at the 1.25s marker. But in this screenshot you can see the loop start after this marker.
Not quite sure what to do with this, or how to provide more useful details 🤔
Original error/exception that gets reported once (in healthy/good flow):
Argument 2 passed to Foo::bar() must be an instance of X, null given, called in Y
Error being logged infinitely (until process is killed, in unhealthy/bad flow):
Error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Argument 2 passed to Foo::bar() must be an instance of X, null given, called in Y