Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Segfault while adding a trace inside a trace callback #200

Open
iamacarpet opened this issue Sep 3, 2018 · 3 comments
Open

Segfault while adding a trace inside a trace callback #200

iamacarpet opened this issue Sep 3, 2018 · 3 comments

Comments

@iamacarpet
Copy link

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

@iamacarpet
Copy link
Author

:( 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

@chingor13
Copy link
Member

Thanks for the report! Do you know what version of the extension that is running?

@iamacarpet
Copy link
Author

phpinfo() says 0.2.2

@iamacarpet iamacarpet changed the title Segfault with blank callback Segfault while adding a trace inside a trace callback Aug 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants