apm-agent-php icon indicating copy to clipboard operation
apm-agent-php copied to clipboard

[Util] [util_for_PHP.c:145] [callPhpFunction] call_user_function failed. Return value: -1. PHP function name: `\Elastic\Apm\Impl\AutoInstrument\PhpPartFacade::shutdown'. argsCount: 0.

Open calvin2021y opened this issue 4 years ago • 5 comments

with today ext with 7.3, get this error:

2021-07-31 18:26:17.976446+08:00 [ERROR]    [Util] [util_for_PHP.c:145] [callPhpFunction] call_user_function failed. Return value: -1. PHP function name: `\Elastic\Apm\Impl\AutoInstrument\PhpPartFacade::bootstrap'. argsCount: 2.
Configuration File (php.ini) Path: /usr/local/etc/php
Loaded Configuration File:         /usr/local/etc/php/php.ini

2021-07-31 18:26:17.980848+08:00 [ERROR]    [Util] [util_for_PHP.c:145] [callPhpFunction] call_user_function failed. Return value: -1. PHP function name: `\Elastic\Apm\Impl\AutoInstrument\PhpPartFacade::shutdown'. argsCount: 0.

calvin2021y avatar Jul 31 '21 10:07 calvin2021y

After I change the folder from ElasticApm into Elastic/Apm, I get Segmentation fault.

calvin2021y avatar Jul 31 '21 13:07 calvin2021y

I have encountered a similar error, not sure if they are related. I'm installing v1.3 from the package provided here. It's a container setup and in one project everything works well, in another built and run in exactly the same way I get the error. Both on PHP 7.4.23.

2021-09-03 20:35:45.938158+00:00 [ERROR]    [Util] [util_for_PHP.c:145] [callPhpFunction] call_user_function failed. Return value: -1. PHP function name: `\Elastic\Apm\Impl\AutoInstrument\PhpPartFacade::interceptedCallPostHook'. argsCount: 2.
2021-09-03 20:35:45.938254+00:00 [ERROR]    [C-to-PHP] [tracer_PHP_part.c:213] [tracerPhpPartInterceptedCallPostHook] Exiting: resultCode: resultFailure (4)

krystalcode avatar Sep 04 '21 00:09 krystalcode

I have encountered a similar error, not sure if they are related. I'm installing v1.3 from the package provided here. It's a container setup and in one project everything works well, in another built and run in exactly the same way I get the error. Both on PHP 7.4.23.

2021-09-03 20:35:45.938158+00:00 [ERROR]    [Util] [util_for_PHP.c:145] [callPhpFunction] call_user_function failed. Return value: -1. PHP function name: `\Elastic\Apm\Impl\AutoInstrument\PhpPartFacade::interceptedCallPostHook'. argsCount: 2.
2021-09-03 20:35:45.938254+00:00 [ERROR]    [C-to-PHP] [tracer_PHP_part.c:213] [tracerPhpPartInterceptedCallPostHook] Exiting: resultCode: resultFailure (4)

Same error here:

Sep 21 15:29:03 ae35945ea9d9 apache2: Elastic APM PHP Tracer [PID: 1200] 2021-09-21 15:29:03.917762+00:00 [ERROR] [Util] [util_for_PHP.c:146] [callPhpFunction] call_user_function failed. Return value: -1. PHP function name:\Elastic\Apm\Impl\AutoInstrument\PhpPartFacade::interceptedCallPostHook'. argsCount: 2. Sep 21 15:29:03 ae35945ea9d9 apache2: Elastic APM PHP Tracer [PID: 1200] 2021-09-21 15:29:03.917917+00:00 [ERROR] [C-to-PHP] [tracer_PHP_part.c:214] [tracerPhpPartInterceptedCallPostHook] Exiting: resultCode: resultFailure (4) `

Running on a dockericed environment

sergiosanchezalvarez avatar Sep 21 '21 15:09 sergiosanchezalvarez

Hi, i have the same following error as above. Even though the errors, request in is made in background.

2022-04-28 22:44:41.166475+00:00 [PID: 13] [TID: 13] [ERROR]    [Util] [util_for_PHP.c:189] [callPhpFunction] call_user_function failed. Return value: -1. PHP function name: `\Elastic\Apm\Impl\AutoInstrument\PhpPartFacade::interceptedCallPostHook'. argsCount: 2.
2022-04-28 22:44:41.166904+00:00 [PID: 13] [TID: 13] [ERROR]    [Util] [util_for_PHP.c:202] [callPhpFunction] Exiting...; resultCode: resultFailure (4);
2022-04-28 22:44:41.167051+00:00 [PID: 13] [TID: 13] [ERROR]    [C-to-PHP] [tracer_PHP_part.c:208] [tracerPhpPartInterceptedCallPostHook] Exiting...; resultCode: resultFailure (4); dbgInterceptRegistrationId: 9; interceptedCallRetValOrThrown type: 2.

PHP 8.0.18, Apm agent runs in Docker, version 1.5.

JanMikes avatar Apr 28 '22 22:04 JanMikes

Hey @calvin2021y

Did you tried it with latest (https://github.com/elastic/apm-agent-php/releases/tag/v1.10.0) release?

intuibase avatar Oct 09 '23 10:10 intuibase