opencensus-php
opencensus-php copied to clipboard
Segfault while adding a trace inside a trace callback
Hello,
During some testing, I noticed we got a segfault with a callback that returns an empty array.
opencensus_trace_method($name, 'handle', function() { return []; });
WARNING: [pool app] child 45 exited on signal 11 (SIGSEGV) after 1.594899 seconds from start
That was running on the App Engine Standard environment (PHP 7.2).
Regards, iamacarpet
:( looks like it isn't the blank callback, or at-least not just that.
For a bit of context, I'm trying to automatically trace all the middleware in Laravel as we process a request.
Middleware doesn't inherit a single root class, so it's hard to make sure all of it is traced, but each place that runs it does so via Illuminate\Pipeline\Pipeline with a chained method call to through that contains an array of class names to execute, before the point they begin to be executed.
I'm trying to intercept that call with an initial trace, then set up tracing on those other classes in the callback, which looks like it is resulting in the segfault.
https://github.com/a1comms/GaeSupportLaravel/blob/php72-laravel55/src/A1comms/GaeSupportLaravel/Trace/Integration/LaravelExtended.php#L103
@chingor13 can you help please?
Regards, iamacarpet
Thanks for the report! Do you know what version of the extension that is running?
phpinfo() says 0.2.2