Giter VIP home page Giter VIP logo

php-xhprof-extension's People

Contributors

beberlei avatar billf avatar c0refast avatar c9s avatar davidsklar avatar enumag avatar erikwebb avatar glennpratt avatar imageoptimiser avatar joedevon avatar kdambekalns avatar killerbishop avatar krakjoe avatar larsways avatar lionsad avatar martinsupiot avatar oerdnj avatar oliworx avatar rarst avatar remicollet avatar robocoder avatar scottmac avatar sebastianbergmann avatar stof avatar teameh avatar therealgilles avatar tolry avatar vincent-- avatar webarchitect609 avatar webdevel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-xhprof-extension's Issues

Timer Tests (tideways_005.phpt) is flaky

For the past few commits, this test is proving to be flaky. Failing or passing between builds for no apparent reason.

https://travis-ci.org/tideways/php-profiler-extension/builds

The failures are:

#  Job 506.6 (PHP 7.1)
002+ Failed sleep_10000_micro. Expected: 10000 microsecs. Actual: 13932 microsecs.
FAIL Tideways: Timer Tests [tests/tideways_005.phpt] 
...
Tideways: Timer Tests [tests/tideways_005.phpt]
# Job 505.1 (PHP 5.3)
002+ Failed sleep_10000_micro. Expected: 10000 microsecs. Actual: 12981 microsecs.

# Job 505.2 (PHP 5.4)
002+ Failed sleep_10000_micro. Expected: 10000 microsecs. Actual: 13162 microsecs.

# Job 505.3 (PHP 5.5)
002+ Failed sleep_10000_micro. Expected: 10000 microsecs. Actual: 12708 microsecs.

Error in tideways-daemon

Ok, first i am use this in the alpinelinux. So i fllow the steps in "Other Linux" section. When i download the file of "tideways-daemon_linux_amd64-1.2.5.tar.gz" and then run by the command and there was an error occurred.

useradd command not found in alpinelinux, because we use adduser instead.

Ok, i changed the command by myself and run it again, another error occurred.

/usr/bin/tideways-daemon No such file

Well, when i use this command

ld /usr/bin/tideways-daemon

it return something like this:

/lib64/ld-linux-x86-64.so.2 (0x7fbbc0dc4000)
libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7fbbc0dc4000)
libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7fbbc0dc4000)
Error relocating /usr/bin/tideways-daemon: __fprintf_chk: symbol not found

So, how could i fix it?

ld: 1 duplicate symbol for architecture x86_64

I'm having the following issue when trying to make in OSX El Capitan 10.11.3 using PHP 5.6.18.

$ make
/bin/sh /tmp/php-profiler-extension/libtool --mode=compile cc  -I. -I/tmp/php-profiler-extension -DPHP_ATOM_INC -I/tmp/php-profiler-extension/include -I/tmp/php-profiler-extension/main -I/tmp/php-profiler-extension -I/usr/local/Cellar/php56/5.6.18/include/php -I/usr/local/Cellar/php56/5.6.18/include/php/main -I/usr/local/Cellar/php56/5.6.18/include/php/TSRM -I/usr/local/Cellar/php56/5.6.18/include/php/Zend -I/usr/local/Cellar/php56/5.6.18/include/php/ext -I/usr/local/Cellar/php56/5.6.18/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/php-profiler-extension/php5/spans.c -o php5/spans.lo 
mkdir php5/.libs
 cc -I. -I/tmp/php-profiler-extension -DPHP_ATOM_INC -I/tmp/php-profiler-extension/include -I/tmp/php-profiler-extension/main -I/tmp/php-profiler-extension -I/usr/local/Cellar/php56/5.6.18/include/php -I/usr/local/Cellar/php56/5.6.18/include/php/main -I/usr/local/Cellar/php56/5.6.18/include/php/TSRM -I/usr/local/Cellar/php56/5.6.18/include/php/Zend -I/usr/local/Cellar/php56/5.6.18/include/php/ext -I/usr/local/Cellar/php56/5.6.18/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/php-profiler-extension/php5/spans.c  -fno-common -DPIC -o php5/.libs/spans.o
/bin/sh /tmp/php-profiler-extension/libtool --mode=compile cc  -I. -I/tmp/php-profiler-extension -DPHP_ATOM_INC -I/tmp/php-profiler-extension/include -I/tmp/php-profiler-extension/main -I/tmp/php-profiler-extension -I/usr/local/Cellar/php56/5.6.18/include/php -I/usr/local/Cellar/php56/5.6.18/include/php/main -I/usr/local/Cellar/php56/5.6.18/include/php/TSRM -I/usr/local/Cellar/php56/5.6.18/include/php/Zend -I/usr/local/Cellar/php56/5.6.18/include/php/ext -I/usr/local/Cellar/php56/5.6.18/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/php-profiler-extension/tideways.c -o tideways.lo 
mkdir .libs
 cc -I. -I/tmp/php-profiler-extension -DPHP_ATOM_INC -I/tmp/php-profiler-extension/include -I/tmp/php-profiler-extension/main -I/tmp/php-profiler-extension -I/usr/local/Cellar/php56/5.6.18/include/php -I/usr/local/Cellar/php56/5.6.18/include/php/main -I/usr/local/Cellar/php56/5.6.18/include/php/TSRM -I/usr/local/Cellar/php56/5.6.18/include/php/Zend -I/usr/local/Cellar/php56/5.6.18/include/php/ext -I/usr/local/Cellar/php56/5.6.18/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/php-profiler-extension/tideways.c  -fno-common -DPIC -o .libs/tideways.o
/tmp/php-profiler-extension/tideways.c:975:66: warning: passing 'const char *' to parameter of type 'char *' discards
      qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        return tw_trace_callback_record_with_cache("view", 4, _ZCE_NAME(ce), _ZCE_NAME_LENGTH(ce), 1 TSRMLS_CC);
                                                              ~~~~~~~~~~^~~
/tmp/php-profiler-extension/tideways.c:135:23: note: expanded from macro '_ZCE_NAME'
#define _ZCE_NAME(ce) ce->name
                      ^
/tmp/php-profiler-extension/tideways.c:559:82: note: passing argument to parameter 'summary' here
long tw_trace_callback_record_with_cache(char *category, int category_len, char *summary, int summary_len, in...
                                                                                 ^
/tmp/php-profiler-extension/tideways.c:1225:12: warning: assigning to 'char *' from 'const char *' discards
      qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        className = _ZCE_NAME(query_ce);
                  ^ ~~~~~~~~~~~~~~~~~~~
2 warnings generated.
/bin/sh /tmp/php-profiler-extension/libtool --mode=link cc -DPHP_ATOM_INC -I/tmp/php-profiler-extension/include -I/tmp/php-profiler-extension/main -I/tmp/php-profiler-extension -I/usr/local/Cellar/php56/5.6.18/include/php -I/usr/local/Cellar/php56/5.6.18/include/php/main -I/usr/local/Cellar/php56/5.6.18/include/php/TSRM -I/usr/local/Cellar/php56/5.6.18/include/php/Zend -I/usr/local/Cellar/php56/5.6.18/include/php/ext -I/usr/local/Cellar/php56/5.6.18/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -o tideways.la -export-dynamic -avoid-version -prefer-pic -module -rpath /tmp/php-profiler-extension/modules  php5/spans.lo tideways.lo 
cc ${wl}-flat_namespace ${wl}-undefined ${wl}suppress -o .libs/tideways.so -bundle  php5/.libs/spans.o .libs/tideways.o  
duplicate symbol _hp_globals in:
    php5/.libs/spans.o
    .libs/tideways.o
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [tideways.la] Error 1

Is there any workaround?
Thanks

Crashing Apache after Windows 7 to 10 updgrade

I've upgraded my desktop from Windows 7 to 10, without any changes to my portable Apache/MySQL/PHP web stack.

After the update having tideways_xhprof binary enabled started to crash Apache on general browsing of PHP pages (not trying to profile) with following message:

AH00428: Parent: child process 1700 exited with status 3221225477 -- Restarting.

Binary version php_tideways_xhprof-5.0.0-master-39806cc8-7.3-vc15-x86_64.dll

Any pointers how can I try tweak or troubleshoot this?

PHP_MSHUTDOWN_FUNCTION

php7-only verify
PHP_MSHUTDOWN_FUNCTION plus gc_collect_cycles = tw original gc_collect_cycles;

(gdb) bt
#0 0x00007ffff0312a1a in tw_span_create (category=0x7ffff031b17c "gc",

category_len=2)
at /home/longxinhui/php-src/php70/ext/php-profiler-extension-php7-only/tideways.c:722
#1 0x00007ffff03196c0 in tw_gc_collect_cycles ()

at /home/longxinhui/php-src/php70/ext/php-profiler-extension-php7-only/tideways.c:3545
#2 0x0000000000ac4234 in shutdown_executor ()

at /home/longxinhui/Desktop/php70/php-7.0.1/Zend/zend_execute_API.c:352
#3 0x0000000000adf1d0 in zend_deactivate ()

at /home/longxinhui/Desktop/php70/php-7.0.1/Zend/zend.c:967
#4 0x0000000000a1e904 in php_request_shutdown (dummy=0x0)

at /home/longxinhui/Desktop/php70/php-7.0.1/main/main.c:1810
#5 0x0000000000baffae in do_cli (argc=2, argv=0x14f78d0)

at /home/longxinhui/Desktop/php70/php-7.0.1/sapi/cli/php_cli.c:1142
#6 0x0000000000bb0958 in main (argc=2, argv=0x14f78d0)

at /home/longxinhui/Desktop/php70/php-7.0.1/sapi/cli/php_cli.c:1345

Ignoring call_user_func[_array]

PHP 7 broke this ability.

This morning I committed compiler option to allow it again.

ZEND_COMPILE_NO_BUILTINS

Will be available in 7.0.7+

Have a look at the commit, it effects other functions, you may want to exclude them from profiles by default (is_string etc, meaningless to profile that stuff).

I intend to do a PR to fix it, but don't want to completely break CI, so will wait until tomorrow so nightly will pass at least :)

Segfault on random requests

We have tried to use tideways xhprof on one of our servers, which for reasons outside our immediate control still runs on PHP 7.1.

The extension runs, but on every third request (as far as we could determine) we get a segfault. PHP is setup with FPM, and as far as I can see we had two children running. So every third request could well be the second request to a given FPM child. Apparently it doesn't matter which script we are calling, the same script can run fine and produce a profile and then segfault the next time.
We tried with version 4.1.7 (from ubuntu PPA of Ondrej Sury) and 5.0.1 downloaded from github release page. Both result in a segfault, although with different stack traces.

Stack trace from 4.1.7:

#0  0x0000563291c436c8 in zend_hash_destroy ()
#1  0x00007ff33bf15f54 in ?? () from /usr/lib/php/20160303/tideways.so
#2  0x00007ff33bf1cad2 in zif_tideways_enable () from /usr/lib/php/20160303/tideways.so
#3  0x0000563291cd51ba in ?? ()
#4  0x0000563291c7c11b in execute_ex ()
#5  0x0000563291cd73a0 in zend_execute ()
#6  0x0000563291c32313 in zend_execute_scripts ()
#7  0x0000563291bce310 in php_execute_script ()
#8  0x0000563291aac189 in main ()

Stack trace from 5.0.1:

#0  0x00007f4c0290c3cb in tideways_xhprof_execute_ex () from /usr/lib/tideways_xhprof/tideways_xhprof-7.1.so
#1  0x000055bc574e4ecb in zend_call_function ()
#2  0x000055bc575138a9 in zend_call_method ()
#3  0x000055bc573f010e in zif_spl_autoload_call ()
#4  0x00007f4c0290d166 in tideways_xhprof_execute_internal () from /usr/lib/tideways_xhprof/tideways_xhprof-7.1.so
#5  0x000055bc574e50d3 in zend_call_function ()
#6  0x000055bc574e5471 in zend_lookup_class_ex ()
#7  0x000055bc574e5e28 in zend_fetch_class_by_name ()
#8  0x000055bc57543d09 in ?? ()
#9  0x000055bc5753f11b in execute_ex ()
#10 0x00007f4c0290c287 in tideways_xhprof_execute_ex () from /usr/lib/tideways_xhprof/tideways_xhprof-7.1.so
#11 0x000055bc575947dc in ?? ()
#12 0x000055bc5753f11b in execute_ex ()
#13 0x00007f4c0290c402 in tideways_xhprof_execute_ex () from /usr/lib/tideways_xhprof/tideways_xhprof-7.1.so
#14 0x000055bc5759821a in ?? ()
#15 0x000055bc5753f11b in execute_ex ()
#16 0x00007f4c0290c402 in tideways_xhprof_execute_ex () from /usr/lib/tideways_xhprof/tideways_xhprof-7.1.so
#17 0x000055bc57597dae in ?? ()
#18 0x000055bc5753f11b in execute_ex ()
#19 0x00007f4c0290c287 in tideways_xhprof_execute_ex () from /usr/lib/tideways_xhprof/tideways_xhprof-7.1.so
#20 0x000055bc57594eac in ?? ()
#21 0x000055bc5753f11b in execute_ex ()
#22 0x00007f4c0290c287 in tideways_xhprof_execute_ex () from /usr/lib/tideways_xhprof/tideways_xhprof-7.1.so
#23 0x000055bc57594eac in ?? ()
#24 0x000055bc5753f11b in execute_ex ()
#25 0x00007f4c0290c287 in tideways_xhprof_execute_ex () from /usr/lib/tideways_xhprof/tideways_xhprof-7.1.so
#26 0x000055bc5759a3a0 in zend_execute ()
#27 0x000055bc574f5313 in zend_execute_scripts ()
#28 0x000055bc57491310 in php_execute_script ()
#29 0x000055bc5736f189 in main ()

As the stack traces are quite different I am not entirely sure it is the same issue or not, but from the outside view it shows the exact same symptoms.

My knowledge of gdb is pretty much exhausted at this point, so if we can provide more useful details, please advice us. I will leave the relevant stack traces lying around for the time being.

Module compiled with module API=20170718 - PHP compiled with module API=20180731

Following the post from XHGUI: perftools/xhgui#260

This is the error I get, seems like php compiles tideways_xhprof as an old php7.2 instead of 7.3

ubuntu@ip-172-666-66-666:/tmp/tideways/php-profiler-extension$ php -v
PHP Warning:  PHP Startup: tideways_xhprof: Unable to initialize module
Module compiled with module API=20170718
PHP    compiled with module API=20180731
These options need to match
 in Unknown on line 0
PHP 7.3.2-3+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Feb  8 2019 15:43:57) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.2, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.2-3+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

Although all my PHP configs sym-link to the right current version:

ubuntu@@ip-172-666-66-666:/usr/bin$ ls -la /etc/alternatives/php*
lrwxrwxrwx 1 root root 15 Feb 13 10:53 /etc/alternatives/php -> /usr/bin/php7.3
lrwxrwxrwx 1 root root 22 Mar  3 13:06 /etc/alternatives/php-config -> /usr/bin/php-config7.3
lrwxrwxrwx 1 root root 38 Mar  3 13:06 /etc/alternatives/php-config.1.gz -> /usr/share/man/man1/php-config7.3.1.gz
lrwxrwxrwx 1 root root 31 Feb 13 10:53 /etc/alternatives/php.1.gz -> /usr/share/man/man1/php7.3.1.gz
lrwxrwxrwx 1 root root 18 Mar  3 13:06 /etc/alternatives/phpize -> /usr/bin/phpize7.3
lrwxrwxrwx 1 root root 34 Mar  3 13:06 /etc/alternatives/phpize.1.gz -> /usr/share/man/man1/phpize7.3.1.gz
ubuntu@@ip-172-666-66-666:/usr/bin$ ls -la php*
lrwxrwxrwx 1 root root      21 Feb 13 10:53 php -> /etc/alternatives/php
lrwxrwxrwx 1 root root      13 Mar  4 07:17 php-config -> php-config7.3
lrwxrwxrwx 1 root root      28 Mar  3 07:34 php-config-old -> /etc/alternatives/php-config
-rwxr-xr-x 1 root root    4272 Feb  8 15:38 php-config7.2-old
-rwxr-xr-x 1 root root    4235 Feb  8 15:43 php-config7.3
-rwxr-xr-x 1 root root 4899864 Feb  8 15:38 php7.2
-rwxr-xr-x 1 root root 4675320 Feb  8 15:43 php7.3
lrwxrwxrwx 1 root root      24 Mar  3 07:34 phpize -> /etc/alternatives/phpize
-rwxr-xr-x 1 root root    4674 Feb  8 15:38 phpize7.2
-rwxr-xr-x 1 root root    4699 Feb  8 15:43 phpize7.3

The file: /etc/php/7.3/mods-available/tideways.ini content is set to the file /usr/lib/php/20180731/tideways_xhprof.so:

extension=tideways_xhprof.so

I'll just post my outputs when installing:

ubuntu@ip-172-666-66-666:/tmp/tideways/php-profiler-extension$ phpize
Configuring for:
PHP Api Version:         20180731
Zend Module Api No:      20180731
Zend Extension Api No:   320180731
ubuntu@ip-172-666-66-666:/tmp/tideways/php-profiler-extension$ ./configure
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20180731
checking for PHP installed headers prefix... /usr/include/php/20180731
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable tideways_xhprof support... yes, shared
checking whether to enable developer build flags... no
checking for gettimeofday... yes
checking for clock_gettime... yes
checking for clock_gettime... yes
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) gawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing libtool commands


ubuntu@ip-172-666-66-666:/tmp/tideways/php-profiler-extension$ make
/bin/bash /tmp/tideways/php-profiler-extension/libtool --mode=install cp ./tideways_xhprof.la /tmp/tideways/php-profiler-extension/modules
libtool: install: cp ./.libs/tideways_xhprof.so /tmp/tideways/php-profiler-extension/modules/tideways_xhprof.so
libtool: install: cp ./.libs/tideways_xhprof.lai /tmp/tideways/php-profiler-extension/modules/tideways_xhprof.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin" ldconfig -n /tmp/tideways/php-profiler-extension/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /tmp/tideways/php-profiler-extension/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.



ubuntu@ip-172-666-66-666:/tmp/tideways/php-profiler-extension$ sudo make install
Installing shared extensions:     /usr/lib/php/20180731/

Error in data format?

I'm trying to use the XHProf UI (the latest available, from back in 2015) to view data generated by Tideways (master branch, afc61bd). I'm following the instructions in the Tideways readme pretty much to the letter to capture data. Here's what gets written: 5bad2159280f2.Drush.xhprof.txt

XHProf is throwing this error when I try to view the data:

Got error 'PHP message: Error in Raw Data: parent & child are both: Drush\Commands\DrushCommands::getConfig\n

That seems to be coming from here (if I simply comment out the return statement after that error, everything seems to work fine):
https://github.com/phacility/xhprof/blob/0bbf2a2ac34f495e42aa852293fe0ed821659047/xhprof_lib/utils/xhprof_lib.php#L589

It would appear that Tideways is generating incompatible data, or I'm using it wrong somehow. Any idea what's up? I'm not really an expert on the XHProf data format.

Build fails on PHP 7.3 (beta)

Hi,

I've been doing some prep work for the upcoming PHP 7.3 release, and found that the latest 4.x (4.1.6) release of the extension fails to build, emitting the following errors:

 cc -I. -I/tmp/php-xhprof-extension-4.1.6 -DPHP_ATOM_INC -I/tmp/php-xhprof-extension-4.1.6/include -I/tmp/php-xhprof-extension-4.1.6/main -I/tmp/php-xhprof-extension-4.1.6 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/php-xhprof-extension-4.1.6/tideways.c  -fPIC -DPIC -o .libs/tideways.o
/tmp/php-xhprof-extension-4.1.6/tideways.c: In function 'tw_trace_callback_mongodb_connect':
/tmp/php-xhprof-extension-4.1.6/tideways.c:858:46: warning: passing argument 3 of 'tw_span_annotate_string' from incompatible pointer type [-Wincompatible-pointer-types]
         tw_span_annotate_string(idx, "host", url->host, 1 TSRMLS_CC);
                                              ^~~
In file included from /tmp/php-xhprof-extension-4.1.6/tideways.c:39:0:
/tmp/php-xhprof-extension-4.1.6/spans.h:6:6: note: expected 'char *' but argument is of type 'zend_string * {aka struct _zend_string *}'
 void tw_span_annotate_string(long spanId, char *key, char *value, int copy TSRMLS_DC);
      ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/php-xhprof-extension-4.1.6/tideways.c: In function 'tw_pcre_match':
/tmp/php-xhprof-extension-4.1.6/tideways.c:1729:8: error: dereferencing pointer to incomplete type 'pcre_cache_entry {aka struct _pcre_cache_entry}'
     pce->refcount++;
        ^~
/tmp/php-xhprof-extension-4.1.6/tideways.c: In function 'hp_init_trace_callbacks':
/tmp/php-xhprof-extension-4.1.6/tideways.c:2684:20: warning: implicit declaration of function 'GC_G' [-Wimplicit-function-declaration]
     TWG(gc_runs) = GC_G(gc_runs);
                    ^~~~
/tmp/php-xhprof-extension-4.1.6/tideways.c:2684:25: error: 'gc_runs' undeclared (first use in this function)
     TWG(gc_runs) = GC_G(gc_runs);
                         ^~~~~~~
/tmp/php-xhprof-extension-4.1.6/tideways.c:2684:25: note: each undeclared identifier is reported only once for each function it appears in
/tmp/php-xhprof-extension-4.1.6/tideways.c:2685:30: error: 'collected' undeclared (first use in this function)
     TWG(gc_collected) = GC_G(collected);
                              ^~~~~~~~~
/tmp/php-xhprof-extension-4.1.6/tideways.c: In function 'hp_get_file_summary':
/tmp/php-xhprof-extension-4.1.6/tideways.c:2998:32: warning: format '%s' expects argument of type 'char *', but argument 5 has type 'zend_string * {aka struct _zend_string *}' [-Wformat=]
         snprintf(ret, len, "%s%s://", ret, url->scheme);
                                ^
/tmp/php-xhprof-extension-4.1.6/tideways.c:3005:32: warning: format '%s' expects argument of type 'char *', but argument 5 has type 'zend_string * {aka struct _zend_string *}' [-Wformat=]
         snprintf(ret, len, "%s%s", ret, url->host);
                                ^
/tmp/php-xhprof-extension-4.1.6/tideways.c:3013:32: warning: format '%s' expects argument of type 'char *', but argument 5 has type 'zend_string * {aka struct _zend_string *}' [-Wformat=]
         snprintf(ret, len, "%s%s", ret, url->path);
                                ^
/tmp/php-xhprof-extension-4.1.6/tideways.c: In function 'hp_stop':
/tmp/php-xhprof-extension-4.1.6/tideways.c:3814:19: error: 'gc_runs' undeclared (first use in this function)
         if ((GC_G(gc_runs) - TWG(gc_runs)) > 0) {
                   ^~~~~~~
/tmp/php-xhprof-extension-4.1.6/tideways.c:3816:50: error: 'collected' undeclared (first use in this function)
             tw_span_annotate_long(0, "gcc", GC_G(collected) - TWG(gc_collected) TSRMLS_CC);
                                                  ^~~~~~~~~
/tmp/php-xhprof-extension-4.1.6/tideways.c: In function 'zif_tideways_span_callback':
/tmp/php-xhprof-extension-4.1.6/tideways.c:4128:36: error: lvalue required as increment operand
             GC_REFCOUNT(fci.object)++;
                                    ^~
make: *** [Makefile:197: tideways.lo] Error 1

Obviously some stuff may change between now and the actual 7.3 release, but there probably won't be significant changes. It builds without any errors or warnings through 7.2.9.

Build environment: Official PHP 7.3-rc-fpm-alpine Docker image:

FROM php:7.3-rc-fpm-alpine as env
RUN apk add --update \
        $PHPIZE_DEPS \
        icu-dev \
        postgresql-dev \
        zlib-dev \
    && pecl install apcu \
    && docker-php-ext-enable apcu \
    && docker-php-ext-install intl \
    && rm -rf /var/cache/apk/*
ENV XHPROF_VERSION=4.1.6
RUN wget https://github.com/tideways/php-xhprof-extension/archive/v$XHPROF_VERSION.tar.gz -O /tmp/xhprof.tar.gz \
    && cd /tmp \
    && tar -xzvf xhprof.tar.gz \
    && cd /tmp/php-xhprof-extension-$XHPROF_VERSION \
    && phpize \
    && ./configure \
    && make \
    && make install \
    && cd - \
    && rm /tmp/xhprof.tar.gz \
    && rm -rf /tmp/php-xhprof-extension-$XHPROF_VERSION \
    && echo 'extension=tideways.so' > /usr/local/etc/php/conf.d/tideways.ini
# rest removed, not relevant

Execution time (wt) missing with 5.0.0, working perfectly 4.1.7 (MacOS)

Not sure if this has been already commented, but have failed to find any reference.

Using locally compiled 5.0.0 all execution times are zero. Previous, also locally compiled 4.1.7 returns wt properly.

macOS 10.14.6 18G103
Xcode 11.1 11A1027
PHP 7.3

Just detected when creating a Portfile for MacPorts: https://github.com/stronk7/macports-ports/blob/php-tideways_xhprof/php/php-tideways_xhprof/Portfile

(that one is working perfectly, but its 5.0.0 counterpart is not)

Ciao :-)

Issues with PHP 7.1.10 on macOS

I've upgraded PHP to 7.1.10 on macOS High Sierra and the tideways extension broke. I've tried to reinstall the extension and even built it from source without luck.

$ brew reinstall php71-tideways --env=std --build-from-source
==> Reinstalling tideways/profiler/php71-tideways
==> Downloading https://github.com/tideways/php-profiler-extension/archive/v4.1.2.zip
Already downloaded: /Users/xxxxx/Library/Caches/Homebrew/php71-tideways-v4.1.2.zip
==> /usr/local/opt/php71/bin/phpize
==> ./configure --prefix=/usr/local/Cellar/php71-tideways/v4.1.2 --with-php-config=/usr/local/opt/php71/bin/php-config
==> make
Error: Operation not permitted @ dir_s_mkdir - /usr/local/Cellar/php71/7.1.10_21/lib/php/extensions

Any suggestions?

CPU time exceeds wall time on PHP 7.2 and is zero on PHP 7.3

In case of nested function calls with both 4.1.7 and 5.0.0-beta3 and PHP 7.2.18 CPU time is zero or exceeds wall time (v4, v5):

"nestedCPU==>nestedCPU@1": {
    "ct": 1,
    "wt": 5223,
    "cpu": 15625,
    "mu": 3208,
    "pmu": 0
}
"nestedCPU@1==>nestedCPU@2": {
    "ct": 1,
    "wt": 4052,
    "cpu": 0,
    "mu": 2624,
    "pmu": 0
},

In case of PHP 7.3.5 CPU time has zero value for all nodes (v4, v5).

Reproducible with run_cpu.sh and php_cpu.php.

Tideways in Freebsd

we testing the tideway extension in freebsd now, we encounter some problem.

Server Information:

background info:

root@trunk:~ # uname -a
FreeBSD trunk.stage.xxx.com 10.1-RELEASE-p9 FreeBSD 10.1-RELEASE-p9 #0: Tue Apr  7 01:09:46 UTC 2015     [email protected]:/usr/obj/usr/src/sys/GENERIC  amd64
root@trunk:~ # php -v
PHP 5.6.7 (cli) (built: Apr 29 2015 09:49:04)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
    with XCache v3.2.0, Copyright (c) 2005-2014, by mOo
    with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies
    with XCache Cacher v3.2.0, Copyright (c) 2005-2014, by mOo

compile tideways:

fetch https://github.com/tideways/php-profiler-extension/archive/v2.0.8.zip
unzip v2.0.8.zip
rm v2.0.8.zip
cd php-profiler-extension-2.0.8/
phpize
./configure CFLAGS="-I/usr/local/include/"
make
make install

config php

root@trunk:~ # tail -n 3 /usr/local/etc/php.ini

extension=tideways.so
auto_prepend_file=/xxx/www/profiling.php
root@trunk:~ # php -m | grep tideways
tideways
root@trunk:~ # php -i | grep tideways
tideways
tideways => 2.0.8
Connection (tideways.connection) => unix:///var/run/tideways/tidewaysd.sock
UDP Connection (tideways.udp_connection) => 127.0.0.1:8135
Default API Key (tideways.api_key) =>
Default Sample-Rate (tideways.sample_rate) => 30
Framework Detection (tideways.framework) =>
Automatically Start (tideways.auto_start) => Yes
Tideways Collect Mode (tideways.collect) => tracing
Tideways Monitoring Mode (tideways.monitor) => basic
Allowed Distributed Tracing Hosts (tideways.distributed_tracing_hosts) => 127.0.0.1
Load PHP Library (tideways.auto_prepend_library) => Yes

profiling.php

root@trunk:~ # cat /xxx/www/profiling.php
<?php
 /**
 * Make sure the path for profiling output is writable!
 * We use the tideways profiler which is a modern fork of xhprof.
 */

if (!isset($_COOKIE['*****']) || $_COOKIE['profile'] != '****')
{
    return;
}

if (!extension_loaded('tideways'))
{
    return;
}

tideways_enable(TIDEWAYS_FLAGS_CPU + TIDEWAYS_FLAGS_MEMORY);

register_shutdown_function(function () {
    $filename = '/xxx/profiler_output/' . uniqid() . '.xhprof';
    file_put_contents($filename, serialize(tideways_disable()));
});

enable tideways:

 /usr/local/etc/rc.d/apache24 restart

Problem encountered:

  1. it create files for a while, and then no new file create anymore
  2. i have curl a webpage with cookie set, for every 5 sec, supposing i can get 12 files, but i only get about 2-4 files.
  3. if i stop querying for a while, and do it again later, like 2 hours, then its not working anymore.

maybe you have any idea, or direction for us to check. thank you

Extension setup

I'm having trouble getting the extension to work properly. I am on Ubuntu 16.04.1 LTS with PHP 7. I ran through the installation on the downloads page:

ubuntu@dev:~/src$ php -m | grep tideways
tideways
ubuntu@dev:~/src$ php --info|grep -i tideways
/etc/php/7.0/cli/conf.d/40-tideways.ini
tideways
tideways => 4.0.5
Connection (tideways.connection) => unix:///var/run/tideways/tidewaysd.sock
UDP Connection (tideways.udp_connection) => 127.0.0.1:8135
Default API Key (tideways.api_key) =>  
Default Sample-Rate (tideways.sample_rate) => 25
Framework Detection (tideways.framework) =>  
Automatically Start (tideways.auto_start) => Yes
Tideways Collect Mode (tideways.collect) => tracing
Tideways Monitoring Mode (tideways.monitor) => basic
Allowed Distributed Tracing Hosts (tideways.distributed_tracing_hosts) => 127.0.0.1
Load PHP Library (tideways.auto_prepend_library) => No
Tideways.php found => Yes
ubuntu@dev:~/src$ cat /etc/php/7.0/mods-available/tideways.ini 
extension=tideways.so
tideways.auto_prepend_library=0
tideways.sample_rate=25

EDIT: More config:

ubuntu@dev:~/src$ php --info | grep open_basedir
open_basedir => no value => no value

I've restarted nginx and php7.0-fpm.

I have this line at the beginning of my index.php:

tideways_enable(TIDEWAYS_FLAGS_NO_SPANS);

Then I have a Silex finish middleware to write the file after the response:

$app->finish(function () {
    $data = tideways_disable();
    file_put_contents('/home/ubuntu/src/' . uniqid() . '.api.xhprof', serialize($data));
});

The files are being written and saved... but the contents are simply:

ubuntu@dev:~/src$ cat 57ecaff63286d.api.xhprof 
N;

I would love to test the product before deciding to purchase... Thank you in advance.

Latest master (v4.0.4) doesn't load

When I built from master and tested with php7, I got the following error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/tideways.so' - /usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/tideways.so: undefined symbol: zval_used_for_init in Unknown on line 0

Syncing to the last release v4.0.3 and re-building worked.

Segmentation fault when Smarty::fetch() is called on a Smarty_Internal_Template object

From the smarty code documentation for Smarty_Internal_TemplateBase::fetch() the $template parameter can be null, a string or a template object:

    /**
     * fetches a rendered Smarty template
     *
     * @param  string $template   the resource handle of the template file or template object
     * @param  mixed  $cache_id   cache id to be used with this template
     * @param  mixed  $compile_id compile id to be used with this template
     * @param  object $parent     next higher level of Smarty variables
     *
     * @throws Exception
     * @throws SmartyException
     * @return string rendered template output
     */
    public function fetch($template = null, $cache_id = null, $compile_id = null, $parent = null)

tw_trace_callback_smarty3_template() does not account for passing a Smarty_Internal_Template object as the $template parameter. If I'm reading it correctly it assumes that either $template is a string, or fetch() was called on a Smarty_Internal_Template.

Works:

$smarty->fetch($template_string);

Also works:

$template_object = $smarty->createTemplate($template_string, $cache_id, $compile_id, $smarty);
$template_object->fetch();

Crashes:

$template_object = $smarty->createTemplate($template_string, $cache_id, $compile_id, $smarty);
$smarty->fetch($template_object);

Crash trace:

Process:               php-cgi [97896]
Path:                  /Applications/MAMP/*/php-cgi
Identifier:            php-cgi
Version:               0
Code Type:             X86-64 (Native)
Parent Process:        php-cgi [97368]
Responsible:           php-cgi [97896]
User ID:               502

Date/Time:             2017-12-05 16:56:49.107 -0500
OS Version:            Mac OS X 10.13.1 (17B1003)
Report Version:        12
Anonymous UUID:        B341CCF6-5D1C-42CB-4AE5-CB93D10D7716


Time Awake Since Boot: 110000 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000008
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [0]

VM Regions Near 0x8:
--> 
    __TEXT                 000000010e57d000-000000010f541000 [ 15.8M] r-x/rwx SM=COW  /Applications/MAMP/*

Application Specific Information:
crashed on child side of fork pre-exec

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   php-cgi                         0x000000010ee91e20 zend_std_read_property + 3136
1   php-cgi                         0x000000010ee19276 zend_read_property + 646
2   tideways.so                     0x0000000112c11cdc tw_trace_callback_smarty3_template + 204
3   tideways.so                     0x0000000112c1706f hp_mode_hier_beginfn_cb + 95
4   tideways.so                     0x0000000112c0fc37 hp_execute_ex + 1079
5   php-cgi                         0x000000010eef35b3 ZEND_DO_FCALL_SPEC_HANDLER + 3523
6   php-cgi                         0x000000010eeac034 execute_ex + 36
7   tideways.so                     0x0000000112c0fc49 hp_execute_ex + 1097
8   php-cgi                         0x000000010eef35b3 ZEND_DO_FCALL_SPEC_HANDLER + 3523
9   php-cgi                         0x000000010eeac034 execute_ex + 36
10  tideways.so                     0x0000000112c0fc49 hp_execute_ex + 1097
11  php-cgi                         0x000000010eef35b3 ZEND_DO_FCALL_SPEC_HANDLER + 3523
12  php-cgi                         0x000000010eeac034 execute_ex + 36
13  tideways.so                     0x0000000112c0fc49 hp_execute_ex + 1097
14  php-cgi                         0x000000010eef35b3 ZEND_DO_FCALL_SPEC_HANDLER + 3523
15  php-cgi                         0x000000010eeac034 execute_ex + 36
16  tideways.so                     0x0000000112c0fc49 hp_execute_ex + 1097
17  php-cgi                         0x000000010eef35b3 ZEND_DO_FCALL_SPEC_HANDLER + 3523
18  php-cgi                         0x000000010eeac034 execute_ex + 36
19  tideways.so                     0x0000000112c0fc49 hp_execute_ex + 1097
20  php-cgi                         0x000000010eef35b3 ZEND_DO_FCALL_SPEC_HANDLER + 3523
21  php-cgi                         0x000000010eeac034 execute_ex + 36
22  tideways.so                     0x0000000112c0fc49 hp_execute_ex + 1097
23  php-cgi                         0x000000010eef35b3 ZEND_DO_FCALL_SPEC_HANDLER + 3523
24  php-cgi                         0x000000010eeac034 execute_ex + 36
25  tideways.so                     0x0000000112c0fc49 hp_execute_ex + 1097
26  php-cgi                         0x000000010eef35b3 ZEND_DO_FCALL_SPEC_HANDLER + 3523
27  php-cgi                         0x000000010eeac034 execute_ex + 36
28  tideways.so                     0x0000000112c0fc49 hp_execute_ex + 1097
29  php-cgi                         0x000000010eef35b3 ZEND_DO_FCALL_SPEC_HANDLER + 3523
30  php-cgi                         0x000000010eeac034 execute_ex + 36
31  tideways.so                     0x0000000112c0fc49 hp_execute_ex + 1097
32  php-cgi                         0x000000010eef35b3 ZEND_DO_FCALL_SPEC_HANDLER + 3523
33  php-cgi                         0x000000010eeac034 execute_ex + 36
34  tideways.so                     0x0000000112c0fc49 hp_execute_ex + 1097
35  php-cgi                         0x000000010eef35b3 ZEND_DO_FCALL_SPEC_HANDLER + 3523
36  php-cgi                         0x000000010eeac034 execute_ex + 36
37  tideways.so                     0x0000000112c0fc49 hp_execute_ex + 1097
38  php-cgi                         0x000000010eef35b3 ZEND_DO_FCALL_SPEC_HANDLER + 3523
39  php-cgi                         0x000000010eeac034 execute_ex + 36
40  tideways.so                     0x0000000112c0fc49 hp_execute_ex + 1097
41  php-cgi                         0x000000010eef35b3 ZEND_DO_FCALL_SPEC_HANDLER + 3523
42  php-cgi                         0x000000010eeac034 execute_ex + 36
43  tideways.so                     0x0000000112c0fc49 hp_execute_ex + 1097
44  php-cgi                         0x000000010eef35b3 ZEND_DO_FCALL_SPEC_HANDLER + 3523
45  php-cgi                         0x000000010eeac034 execute_ex + 36
46  tideways.so                     0x0000000112c0fc49 hp_execute_ex + 1097
47  php-cgi                         0x000000010eef35b3 ZEND_DO_FCALL_SPEC_HANDLER + 3523
48  php-cgi                         0x000000010eeac034 execute_ex + 36
49  php-cgi                         0x000000010eeacb46 zend_execute + 2710
50  php-cgi                         0x000000010ee00347 zend_execute_scripts + 615
51  php-cgi                         0x000000010ed2426f php_execute_script + 1615
52  php-cgi                         0x000000010efea53c main + 8940
53  libdyld.dylib                   0x00007fff64542145 start + 1

Let me know if you need any additional information. In the meantime I have modified my code to call fetch() on the template object.

PHP 7.1

Hi,

Just wanted to check if you're planning to support PHP 7.1, and if there's any timeline?

Thanks!

SIGSEGV on tideways_span_annotate using TwExtensionSpan::annotate

hey,
we at InnoGames have really weird issues with the tideways extension
whenever we have multiple annotate() calls, the profiler extension tends to segfault immediately
it does not happen in all cases, just sometimes
however i was able to get a coredump, find the backtrace attached below
reproduced it locally, versions and configs may differ on our live systems, but same issues there
seems to fail when trying to merge the internal annotation arrays (_zend_hash_merge)
if you need any further details, please tell me
have a nice weekend :)

php code that causes the segfault:

$span = \Tideways\Profiler::createSpan(__METHOD__);
$span->annotate(['title' => __METHOD__]);
$span->startTimer();
...
$span->annotate(['iterations' => $iterations]);
$span->annotate(['skipped' => $skippedQuests]);
$span->annotate(['found normal quest' => 0]); // my guess is that it breaks HERE
$span->stopTimer();

i tried to use other keys and values, but it does not help at all. php code that works though:

$span = \Tideways\Profiler::createSpan(__METHOD__);
$span->annotate(['title' => __METHOD__]);
$span->startTimer();
...
$span->annotate([
    'iterations'                 => $iterations,
    'skipped'                    => $skippedQuests,
    'found normal quest' => 0,
]);
$span->stopTimer();

other useful information:

# php-fpm --version
PHP 7.0.17 (fpm-fcgi) (built: Mar 31 2017 07:40:35) (DEBUG)
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.17, Copyright (c) 1999-2017, by Zend Technologies
    with Xdebug v2.5.1, Copyright (c) 2002-2017, by Derick Rethans
# php-fpm -i | grep tideways
tideways
tideways => 4.0.5
Connection (tideways.connection) => tcp://tideways:8135
UDP Connection (tideways.udp_connection) => tideways:8135
Default API Key (tideways.api_key) => ******
Default Sample-Rate (tideways.sample_rate) => 100
Framework Detection (tideways.framework) =>
Automatically Start (tideways.auto_start) => Yes
Tideways Collect Mode (tideways.collect) => FULL
Tideways Monitoring Mode (tideways.monitor) => FULL
Allowed Distributed Tracing Hosts (tideways.distributed_tracing_hosts) => 127.0.0.1
Load PHP Library (tideways.auto_prepend_library) => Yes
(gdb) bt
#0  0x000055ce8c503e71 in ?? ()
#1  0x000055ce8c5047e3 in zval_add_ref ()
#2  0x000055ce8c51f927 in _zend_hash_merge ()
#3  0x00007f79b4942608 in tw_span_annotate (spanId=72, annotations=0x7f79b5016ff0) at /var/www/html/php-profiler-extension/php7/spans.c:74
#4  0x00007f79b494d0d6 in zif_tideways_span_annotate (execute_data=0x7f79b5016f80, return_value=0x7f79b5016f70)
    at /var/www/html/php-profiler-extension/tideways.c:4241
#5  0x000055ce8c5660a0 in execute_internal ()
#6  0x00007f79b494b84d in hp_execute_internal (execute_data=0x7f79b5016f80, return_value=0x7f79b5016f70)
    at /var/www/html/php-profiler-extension/tideways.c:3605
#7  0x00007f79b4b64dd9 in xdebug_execute_internal (current_execute_data=0x7f79b5016f80, return_value=0x7f79b5016f70)
    at /tmp/pear/temp/xdebug/xdebug.c:2145
#8  0x000055ce8c56894c in ?? ()
#9  0x000055ce8c56b062 in ?? ()
#10 0x000055ce8c5677aa in execute_ex ()
#11 0x00007f79b494b69a in hp_execute_ex (execute_data=0x7f79b5016f00) at /var/www/html/php-profiler-extension/tideways.c:3552
#12 0x00007f79b4b6482a in xdebug_execute_ex (execute_data=0x7f79b5016f00) at /tmp/pear/temp/xdebug/xdebug.c:1995
#13 0x000055ce8c568796 in ?? ()
#14 0x000055ce8c56b062 in ?? ()
#15 0x000055ce8c5677aa in execute_ex ()
#16 0x00007f79b494b69a in hp_execute_ex (execute_data=0x7f79b5016d50) at /var/www/html/php-profiler-extension/tideways.c:3552
#17 0x00007f79b4b6482a in xdebug_execute_ex (execute_data=0x7f79b5016d50) at /tmp/pear/temp/xdebug/xdebug.c:1995
#18 0x000055ce8c568796 in ?? ()
#19 0x000055ce8c56b062 in ?? ()
#20 0x000055ce8c5677aa in execute_ex ()
#21 0x00007f79b494b69a in hp_execute_ex (execute_data=0x7f79b5016c80) at /var/www/html/php-profiler-extension/tideways.c:3552
#22 0x00007f79b4b6482a in xdebug_execute_ex (execute_data=0x7f79b5016c80) at /tmp/pear/temp/xdebug/xdebug.c:1995
#23 0x000055ce8c568796 in ?? ()
#24 0x000055ce8c56b062 in ?? ()
#25 0x000055ce8c5677aa in execute_ex ()
#26 0x00007f79b494b69a in hp_execute_ex (execute_data=0x7f79b5016ba0) at /var/www/html/php-profiler-extension/tideways.c:3552
#27 0x00007f79b4b6482a in xdebug_execute_ex (execute_data=0x7f79b5016ba0) at /tmp/pear/temp/xdebug/xdebug.c:1995
#28 0x000055ce8c568796 in ?? ()
#29 0x000055ce8c56b062 in ?? ()
#30 0x000055ce8c5677aa in execute_ex ()
#31 0x00007f79b494b69a in hp_execute_ex (execute_data=0x7f79b5016a20) at /var/www/html/php-profiler-extension/tideways.c:3552
#32 0x00007f79b4b6482a in xdebug_execute_ex (execute_data=0x7f79b5016a20) at /tmp/pear/temp/xdebug/xdebug.c:1995
#33 0x000055ce8c568796 in ?? ()
#34 0x000055ce8c56b062 in ?? ()
#35 0x000055ce8c5677aa in execute_ex ()
#36 0x00007f79b494b69a in hp_execute_ex (execute_data=0x7f79b5016960) at /var/www/html/php-profiler-extension/tideways.c:3552
#37 0x00007f79b4b6482a in xdebug_execute_ex (execute_data=0x7f79b5016960) at /tmp/pear/temp/xdebug/xdebug.c:1995
#38 0x000055ce8c4ee89d in zend_call_function ()
#39 0x000055ce8c35a1dd in ?? ()
#40 0x000055ce8c5660a0 in execute_internal ()
#41 0x00007f79b494b84d in hp_execute_internal (execute_data=0x7f79b50168e0, return_value=0x7f79b50168a0)
    at /var/www/html/php-profiler-extension/tideways.c:3605
#42 0x00007f79b4b64dd9 in xdebug_execute_internal (current_execute_data=0x7f79b50168e0, return_value=0x7f79b50168a0)
    at /tmp/pear/temp/xdebug/xdebug.c:2145
#43 0x000055ce8c56894c in ?? ()
#44 0x000055ce8c56b062 in ?? ()
#45 0x000055ce8c5677aa in execute_ex ()
#46 0x00007f79b494b69a in hp_execute_ex (execute_data=0x7f79b50166e0) at /var/www/html/php-profiler-extension/tideways.c:3552
#47 0x00007f79b4b6482a in xdebug_execute_ex (execute_data=0x7f79b50166e0) at /tmp/pear/temp/xdebug/xdebug.c:1995
#48 0x000055ce8c568796 in ?? ()
#49 0x000055ce8c56b062 in ?? ()
#50 0x000055ce8c5677aa in execute_ex ()
#51 0x00007f79b494b69a in hp_execute_ex (execute_data=0x7f79b5016630) at /var/www/html/php-profiler-extension/tideways.c:3552
#52 0x00007f79b4b6482a in xdebug_execute_ex (execute_data=0x7f79b5016630) at /tmp/pear/temp/xdebug/xdebug.c:1995
#53 0x000055ce8c568796 in ?? ()
#54 0x000055ce8c56b062 in ?? ()
#55 0x000055ce8c5677aa in execute_ex ()
#56 0x00007f79b494b69a in hp_execute_ex (execute_data=0x7f79b5016540) at /var/www/html/php-profiler-extension/tideways.c:3552
#57 0x00007f79b4b6482a in xdebug_execute_ex (execute_data=0x7f79b5016540) at /tmp/pear/temp/xdebug/xdebug.c:1995
#58 0x000055ce8c568796 in ?? ()
#59 0x000055ce8c56b062 in ?? ()
#60 0x000055ce8c5677aa in execute_ex ()
#61 0x00007f79b494b69a in hp_execute_ex (execute_data=0x7f79b5016480) at /var/www/html/php-profiler-extension/tideways.c:3552
#62 0x00007f79b4b6482a in xdebug_execute_ex (execute_data=0x7f79b5016480) at /tmp/pear/temp/xdebug/xdebug.c:1995
#63 0x000055ce8c568796 in ?? ()
#64 0x000055ce8c56b062 in ?? ()
#65 0x000055ce8c5677aa in execute_ex ()
#66 0x00007f79b494b69a in hp_execute_ex (execute_data=0x7f79b50163c0) at /var/www/html/php-profiler-extension/tideways.c:3552
#67 0x00007f79b4b6482a in xdebug_execute_ex (execute_data=0x7f79b50163c0) at /tmp/pear/temp/xdebug/xdebug.c:1995
#68 0x000055ce8c568796 in ?? ()
#69 0x000055ce8c56b062 in ?? ()
#70 0x000055ce8c5677aa in execute_ex ()
#71 0x00007f79b494b69a in hp_execute_ex (execute_data=0x7f79b50162e0) at /var/www/html/php-profiler-extension/tideways.c:3552
#72 0x00007f79b4b6482a in xdebug_execute_ex (execute_data=0x7f79b50162e0) at /tmp/pear/temp/xdebug/xdebug.c:1995
#73 0x000055ce8c568796 in ?? ()
#74 0x000055ce8c56b062 in ?? ()
#75 0x000055ce8c5677aa in execute_ex ()
#76 0x00007f79b494b69a in hp_execute_ex (execute_data=0x7f79b5016250) at /var/www/html/php-profiler-extension/tideways.c:3552
#77 0x00007f79b4b6482a in xdebug_execute_ex (execute_data=0x7f79b5016250) at /tmp/pear/temp/xdebug/xdebug.c:1995
#78 0x000055ce8c568796 in ?? ()
#79 0x000055ce8c56b062 in ?? ()
#80 0x000055ce8c5677aa in execute_ex ()
#81 0x00007f79b494b69a in hp_execute_ex (execute_data=0x7f79b50161b0) at /var/www/html/php-profiler-extension/tideways.c:3552
#82 0x00007f79b4b6482a in xdebug_execute_ex (execute_data=0x7f79b50161b0) at /tmp/pear/temp/xdebug/xdebug.c:1995
#83 0x000055ce8c568796 in ?? ()
#84 0x000055ce8c56b062 in ?? ()
#85 0x000055ce8c5677aa in execute_ex ()
#86 0x00007f79b494b69a in hp_execute_ex (execute_data=0x7f79b50160f0) at /var/www/html/php-profiler-extension/tideways.c:3552
#87 0x00007f79b4b6482a in xdebug_execute_ex (execute_data=0x7f79b50160f0) at /tmp/pear/temp/xdebug/xdebug.c:1995
#88 0x000055ce8c568796 in ?? ()
#89 0x000055ce8c56b062 in ?? ()
#90 0x000055ce8c5677aa in execute_ex ()
#91 0x00007f79b494b541 in hp_execute_ex (execute_data=0x7f79b5016030) at /var/www/html/php-profiler-extension/tideways.c:3527
#92 0x00007f79b4b6482a in xdebug_execute_ex (execute_data=0x7f79b5016030) at /tmp/pear/temp/xdebug/xdebug.c:1995
#93 0x000055ce8c5678bb in zend_execute ()
#94 0x000055ce8c5081ee in zend_execute_scripts ()
#95 0x000055ce8c470563 in php_execute_script ()
#96 0x000055ce8c5e1057 in ?? ()
#97 0x00007f79b6885837 in __libc_start_main () from /lib/ld-musl-x86_64.so.1
#98 0x000055ce8bf8a718 in ?? ()
#99 0x00007fff4fc607f0 in ?? ()
#100 0x0000000000000000 in ?? ()

serialize() vs json_encode()

I've noticed that all the examples use serialize() to convert the arrays returned by tideways_xhprof_disable() to text.

Is there any reason for not serializing these arrays with json_encode() instead?

rpm for version 4.1.6

I use tideways-php at CentOS7 from yum repository defined like this:

[tideways]
baseurl = https://s3-eu-west-1.amazonaws.com/qafoo-profiler/rpm
enabled = 1
gpgcheck = 1
gpgkey = https://s3-eu-west-1.amazonaws.com/qafoo-profiler/packages/EEB5E8F4.gpg
name = Tideways

The new version tideways-php-5.0.36 is not compatible with xhgui. I don't know why, but the Error is Call to undefined function tideways_enable(). To quick fix I want to use older version 4.1.6, but I am not able to downgrade to this version from repository.
Please, how can I get tideways-php-4.1.6-1.x86_64.rpm? Yes, of course, I can build it myself...

Segmentation fault. php-fpm7.1 (xdebug-conflict)

After running xhgui under the nginx + fpm it crushes
Here is gdb core dump backtrace

Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `php-fpm: pool www '.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 zend_mm_alloc_small (bin_num=, size=, heap=0x7f80dda00040) at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_alloc.c:1273
1273 /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_alloc.c: No such file or directory.
(gdb) Quit
(gdb) bt
#0 zend_mm_alloc_small (bin_num=, size=, heap=0x7f80dda00040) at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_alloc.c:1273
#1 zend_mm_alloc_heap (size=, heap=0x7f80dda00040) at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_alloc.c:1344
#2 _emalloc (size=) at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_alloc.c:2433
#3 0x000055988865b49d in _safe_emalloc (nmemb=nmemb@entry=1, size=size@entry=120, offset=offset@entry=0) at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_alloc.c:2488
#4 0x000055988865b591 in _ecalloc (nmemb=nmemb@entry=1, size=120) at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_alloc.c:2511
#5 0x000055988858a78e in spl_array_object_new_ex (class_type=0x7f80ddac8580, orig=0x0, clone_orig=0) at /build/php7.1-Yssoz9/php7.1-7.1.19/ext/spl/spl_array.c:176
#6 0x00005598886846bb in _object_and_properties_init (arg=arg@entry=0x7ffd0b5d1150, class_type=, properties=properties@entry=0x0) at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_API.c:1302
#7 0x00005598886847c7 in _object_init_ex (arg=arg@entry=0x7ffd0b5d1150, class_type=) at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_API.c:1310
#8 0x00007f80cff6bf8e in php_phongo_bson_visit_document (iter=, key=0x559889c0dca2 "SERVER", v_document=, data=0x7ffd0b5d1380) at /home/agolovko/work/phplibs/mongodb-1.2.2/src/bson.c:670
#9 0x00007f80cff9063f in bson_iter_visit_all (iter=iter@entry=0x7ffd0b5d13d0, visitor=visitor@entry=0x7f80d02085a0 <php_bson_visitors>, data=data@entry=0x7ffd0b5d1380)
at /home/agolovko/work/phplibs/mongodb-1.2.2/src/libbson/src/bson/bson-iter.c:2004
#10 0x00007f80cff6bf56 in php_phongo_bson_visit_document (iter=, key=0x559889c0dc7e "meta", v_document=, data=0x7f80dda83328) at /home/agolovko/work/phplibs/mongodb-1.2.2/src/bson.c:648
#11 0x00007f80cff9063f in bson_iter_visit_all (iter=iter@entry=0x7ffd0b5d15b0, visitor=visitor@entry=0x7f80d02085a0 <php_bson_visitors>, data=data@entry=0x7f80dda83328)
at /home/agolovko/work/phplibs/mongodb-1.2.2/src/libbson/src/bson/bson-iter.c:2004
#12 0x00007f80cff6d769 in phongo_bson_to_zval_ex (data=, data_len=, state=0x7f80dda83328) at /home/agolovko/work/phplibs/mongodb-1.2.2/src/bson.c:1451
#13 0x000055988870d8d5 in ZEND_FE_RESET_R_SPEC_CV_HANDLER () at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_vm_execute.h:35624
#14 0x00005598886cb9fb in execute_ex (ex=) at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_vm_execute.h:429
#15 0x00007f80cc426399 in tideways_xhprof_execute_ex (execute_data=0x7f80dda77180) at /home/agolovko/work/phplibs/php-profiler-extension/tideways_xhprof.c:196
#16 0x00007f80dce8bbc1 in xdebug_execute_ex (execute_data=0x7f80dda77180) at /build/xdebug-OieJX3/xdebug-2.6.0+2.5.5/build-7.1/xdebug.c:1912
#17 0x00007f80dd3aedcc in ?? () from /usr/lib/php/20160303/ioncube_loader_lin_7.1.so
#18 0x00005598886afd4e in zend_generator_resume (orig_generator=orig_generator@entry=0x7f80dda78000) at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_generators.c:818
#19 0x00005598886b0d38 in zend_generator_ensure_initialized (generator=0x7f80dda78000) at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_generators.c:859
#20 zend_generator_rewind (generator=0x7f80dda78000) at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_generators.c:868
#21 zim_Generator_rewind (execute_data=, return_value=) at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_generators.c:888
#22 0x00007f80cc426979 in tideways_xhprof_execute_internal (execute_data=0x7f80dda14960, return_value=0x7ffd0b5d18e0) at /home/agolovko/work/phplibs/php-profiler-extension/tideways_xhprof.c:168
#23 0x00007f80dce8c68b in xdebug_execute_internal (current_execute_data=0x7f80dda14960, return_value=0x7ffd0b5d18e0) at /build/xdebug-OieJX3/xdebug-2.6.0+2.5.5/build-7.1/xdebug.c:2019
#24 0x00005598887249fa in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_vm_execute.h:972
#25 0x00005598886cb9fb in execute_ex (ex=) at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_vm_execute.h:429
#26 0x00007f80cc426399 in tideways_xhprof_execute_ex (execute_data=0x7f80dda14900) at /home/agolovko/work/phplibs/php-profiler-extension/tideways_xhprof.c:196
#27 0x00007f80dce8bbc1 in xdebug_execute_ex (execute_data=0x7f80dda14900) at /build/xdebug-OieJX3/xdebug-2.6.0+2.5.5/build-7.1/xdebug.c:1912
#28 0x00007f80dd3aedcc in ?? () from /usr/lib/php/20160303/ioncube_loader_lin_7.1.so
#29 0x00005598886719fb in zend_call_function (fci=fci@entry=0x7ffd0b5d1be0, fci_cache=fci_cache@entry=0x7ffd0b5d1bb0) at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_execute_API.c:855
#30 0x00005598886a03d9 in zend_call_method (object=object@entry=0x7f80dda67498, obj_ce=, fn_proxy=, function_name=function_name@entry=0x559888743c58 "rewind", function_name_len=function_name_len@entry=6,
retval_ptr=retval_ptr@entry=0x0, param_count=0, arg1=0x0, arg2=0x0) at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_interfaces.c:99
#31 0x00005598886a0ad7 in zend_user_it_rewind (_iter=0x7f80dda67460) at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_interfaces.c:239
#32 0x000055988870d8d5 in ZEND_FE_RESET_R_SPEC_CV_HANDLER () at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_vm_execute.h:35624
#33 0x00005598886cb9fb in execute_ex (ex=) at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_vm_execute.h:429
#34 0x00007f80cc426399 in tideways_xhprof_execute_ex (execute_data=0x7f80dda14860) at /home/agolovko/work/phplibs/php-profiler-extension/tideways_xhprof.c:196
#35 0x00007f80dce8bbc1 in xdebug_execute_ex (execute_data=0x7f80dda14860) at /build/xdebug-OieJX3/xdebug-2.6.0+2.5.5/build-7.1/xdebug.c:1912
#36 0x00007f80dd3aedcc in ?? () from /usr/lib/php/20160303/ioncube_loader_lin_7.1.so
#37 0x00005598887245ee in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_vm_execute.h:1076
#38 0x00005598886cb9fb in execute_ex (ex=) at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_vm_execute.h:429
#39 0x00007f80cc426399 in tideways_xhprof_execute_ex (execute_data=0x7f80dda14770) at /home/agolovko/work/phplibs/php-profiler-extension/tideways_xhprof.c:196
#40 0x00007f80dce8bbc1 in xdebug_execute_ex (execute_data=0x7f80dda14770) at /build/xdebug-OieJX3/xdebug-2.6.0+2.5.5/build-7.1/xdebug.c:1912
#41 0x00007f80dd3aedcc in ?? () from /usr/lib/php/20160303/ioncube_loader_lin_7.1.so
#42 0x00005598887245ee in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_vm_execute.h:1076
#43 0x00005598886cb9fb in execute_ex (ex=) at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_vm_execute.h:429
#44 0x00007f80cc426399 in tideways_xhprof_execute_ex (execute_data=0x7f80dda14700) at /home/agolovko/work/phplibs/php-profiler-extension/tideways_xhprof.c:196
#45 0x00007f80dce8bbc1 in xdebug_execute_ex (execute_data=0x7f80dda14700) at /build/xdebug-OieJX3/xdebug-2.6.0+2.5.5/build-7.1/xdebug.c:1912
#46 0x00007f80dd3aedcc in ?? () from /usr/lib/php/20160303/ioncube_loader_lin_7.1.so
#47 0x00005598887245ee in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_vm_execute.h:1076
#48 0x00005598886cb9fb in execute_ex (ex=) at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_vm_execute.h:429
#49 0x00007f80cc426399 in tideways_xhprof_execute_ex (execute_data=0x7f80dda145f0) at /home/agolovko/work/phplibs/php-profiler-extension/tideways_xhprof.c:196
#50 0x00007f80dce8bbc1 in xdebug_execute_ex (execute_data=0x7f80dda145f0) at /build/xdebug-OieJX3/xdebug-2.6.0+2.5.5/build-7.1/xdebug.c:1912
#51 0x00007f80dd3aedcc in ?? () from /usr/lib/php/20160303/ioncube_loader_lin_7.1.so
#52 0x0000559888724a5a in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_vm_execute.h:949
#53 0x00005598886cb9fb in execute_ex (ex=) at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_vm_execute.h:429
#54 0x00007f80cc426399 in tideways_xhprof_execute_ex (execute_data=0x7f80dda14570) at /home/agolovko/work/phplibs/php-profiler-extension/tideways_xhprof.c:196
#55 0x00007f80dce8bbc1 in xdebug_execute_ex (execute_data=0x7f80dda14570) at /build/xdebug-OieJX3/xdebug-2.6.0+2.5.5/build-7.1/xdebug.c:1912
#56 0x00007f80dd3aedcc in ?? () from /usr/lib/php/20160303/ioncube_loader_lin_7.1.so
#57 0x00005598886719fb in zend_call_function (fci=fci@entry=0x7ffd0b5d25b0, fci_cache=fci_cache@entry=0x7ffd0b5d2580) at /build/php7.1-Yssoz9/php7.1-7.1.19/Zend/zend_execute_API.c:855
#58 0x00005598885b897b in zif_call_user_func_array (execute_data=0x7f80dda14500, return_value=0x7f80dda144d0) at /build/php7.1-Yssoz9/php7.1-7.1.19/ext/standard/basic_functions.c:4895
#59 0x00007f80cc426979 in tideways_xhprof_execute_internal (execute_data=0x7f80dda14500, return_value=0x7f80dda144d0) at /home/agolovko/work/phplibs/php-profiler-extension/tideways_xhprof.c:168
#60 0x00007f80dce8c68b in xdebug_execute_internal (current_execute_data=0x7f80dda14500, return_value=0x7f80dda144d0) at /build/xdebug-OieJX3/xdebug-2.6.0+2.5.5/build-7.1/xdebug.c:2019

OS: Ubuntu 16.04.4 LTS
Php info:
PHP 7.1.19-1+ubuntu16.04.1+deb.sury.org+1 (fpm-fcgi) (built: Jul 9 2018 13:12:24)
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.1.1, Copyright (c) 2002-2017, by ionCube Ltd.
with Zend OPcache v7.1.19-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans

When I ran xhgui with php built-in server all worked fine. Only under php-fpm it started to crush.

Installed modules php:

php -m
[PHP Modules]
amqp
apc
apcu
bcmath
bz2
calendar
Core
ctype
curl
date
dom
event
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
igbinary
imagick
ionCube Loader
json
ldap
libxml
mbstring
mcrypt
memcache
memcached
mongodb
msgpack
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
pgsql
phalcon
Phar
posix
protobuf
rdkafka
readline
redis
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
ssh2
standard
sysvmsg
sysvsem
sysvshm
tideways_xhprof
tokenizer
wddx
xdebug
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib
zmq

[Zend Modules]
Xdebug
Zend OPcache
the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured)

build failure when PDO is disabled

the profiler fails to build if PHP has been build without PDO. We build PHP 7.1.6 with --disable-all and --without-pdo-sqlite -without-pdo-mysql --without-pgsql --without-pdo-pgsql. configure should check that /php_pdo_driver.h exists, and any references to pdo should be #ifdef-ed out of tideways.c

php-profiler-extension/tideways.c:46:36: fatal error: ext/pdo/php_pdo_driver.h: No such file or directory
 #include "ext/pdo/php_pdo_driver.h"
                                    ^

Build fails for Homebrew PHP7 on OSX since v4.0.3

Build is failing for edfb29e and v4.0.3

12:30:16 ~/php-profiler-extension master ls | grep -v .git | xargs rm -rf
12:30:27 ~/php-profiler-extension master git reset --hard
HEAD is now at edfb29e Bump version to 4.0.4
12:30:33 ~/php-profiler-extension master phpize
Configuring for:
PHP Api Version:         20151012
Zend Module Api No:      20151012
Zend Extension Api No:   320151012
12:30:38 ~/php-profiler-extension master ./configure
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-apple-darwin15.3.0
checking host system type... x86_64-apple-darwin15.3.0
checking target system type... x86_64-apple-darwin15.3.0
checking for PHP prefix... /usr/local/Cellar/php70/7.0.4
checking for PHP includes... -I/usr/local/Cellar/php70/7.0.4/include/php -I/usr/local/Cellar/php70/7.0.4/include/php/main -I/usr/local/Cellar/php70/7.0.4/include/php/TSRM -I/usr/local/Cellar/php70/7.0.4/include/php/Zend -I/usr/local/Cellar/php70/7.0.4/include/php/ext -I/usr/local/Cellar/php70/7.0.4/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/Cellar/php70/7.0.4/lib/php/extensions/no-debug-non-zts-20151012
checking for PHP installed headers prefix... /usr/local/Cellar/php70/7.0.4/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.14.3 (ok)
checking for gawk... gawk
checking whether to enable Tideways support... yes, shared
checking for clock_gettime... no
checking for clock_gettime in -lrt... no
checking for clock_get_time... yes
checking PHP version... PHP 7.x
checking for ld used by cc... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 196608
checking command to parse /usr/bin/nm output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking if cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fno-common
checking if cc PIC flag -fno-common works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin15.3.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
12:30:48 ~/php-profiler-extension master make
/bin/sh /Users/vpoturaev/php-profiler-extension/libtool --mode=compile cc  -I. -I/Users/vpoturaev/php-profiler-extension -DPHP_ATOM_INC -I/Users/vpoturaev/php-profiler-extension/include -I/Users/vpoturaev/php-profiler-extension/main -I/Users/vpoturaev/php-profiler-extension -I/usr/local/Cellar/php70/7.0.4/include/php -I/usr/local/Cellar/php70/7.0.4/include/php/main -I/usr/local/Cellar/php70/7.0.4/include/php/TSRM -I/usr/local/Cellar/php70/7.0.4/include/php/Zend -I/usr/local/Cellar/php70/7.0.4/include/php/ext -I/usr/local/Cellar/php70/7.0.4/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /Users/vpoturaev/php-profiler-extension/php7/spans.c -o php7/spans.lo
mkdir php7/.libs
 cc -I. -I/Users/vpoturaev/php-profiler-extension -DPHP_ATOM_INC -I/Users/vpoturaev/php-profiler-extension/include -I/Users/vpoturaev/php-profiler-extension/main -I/Users/vpoturaev/php-profiler-extension -I/usr/local/Cellar/php70/7.0.4/include/php -I/usr/local/Cellar/php70/7.0.4/include/php/main -I/usr/local/Cellar/php70/7.0.4/include/php/TSRM -I/usr/local/Cellar/php70/7.0.4/include/php/Zend -I/usr/local/Cellar/php70/7.0.4/include/php/ext -I/usr/local/Cellar/php70/7.0.4/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /Users/vpoturaev/php-profiler-extension/php7/spans.c  -fno-common -DPIC -o php7/.libs/spans.o
/bin/sh /Users/vpoturaev/php-profiler-extension/libtool --mode=compile cc  -I. -I/Users/vpoturaev/php-profiler-extension -DPHP_ATOM_INC -I/Users/vpoturaev/php-profiler-extension/include -I/Users/vpoturaev/php-profiler-extension/main -I/Users/vpoturaev/php-profiler-extension -I/usr/local/Cellar/php70/7.0.4/include/php -I/usr/local/Cellar/php70/7.0.4/include/php/main -I/usr/local/Cellar/php70/7.0.4/include/php/TSRM -I/usr/local/Cellar/php70/7.0.4/include/php/Zend -I/usr/local/Cellar/php70/7.0.4/include/php/ext -I/usr/local/Cellar/php70/7.0.4/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /Users/vpoturaev/php-profiler-extension/tideways.c -o tideways.lo
mkdir .libs
 cc -I. -I/Users/vpoturaev/php-profiler-extension -DPHP_ATOM_INC -I/Users/vpoturaev/php-profiler-extension/include -I/Users/vpoturaev/php-profiler-extension/main -I/Users/vpoturaev/php-profiler-extension -I/usr/local/Cellar/php70/7.0.4/include/php -I/usr/local/Cellar/php70/7.0.4/include/php/main -I/usr/local/Cellar/php70/7.0.4/include/php/TSRM -I/usr/local/Cellar/php70/7.0.4/include/php/Zend -I/usr/local/Cellar/php70/7.0.4/include/php/ext -I/usr/local/Cellar/php70/7.0.4/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /Users/vpoturaev/php-profiler-extension/tideways.c  -fno-common -DPIC -o .libs/tideways.o
/Users/vpoturaev/php-profiler-extension/tideways.c:572:15: warning: using the result of an assignment as a condition without
      parentheses [-Wparentheses]
        if (zidx_ptr = zend_hash_str_find(TWG(span_cache), summary, strlen(summary))) {
            ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/vpoturaev/php-profiler-extension/tideways.c:572:15: note: place parentheses around the assignment to silence this warning
        if (zidx_ptr = zend_hash_str_find(TWG(span_cache), summary, strlen(summary))) {
                     ^
            (                                                                       )
/Users/vpoturaev/php-profiler-extension/tideways.c:572:15: note: use '==' to turn this assignment into an equality comparison
        if (zidx_ptr = zend_hash_str_find(TWG(span_cache), summary, strlen(summary))) {
                     ^
                     ==
/Users/vpoturaev/php-profiler-extension/tideways.c:734:3: warning: incompatible pointer types initializing 'zval *'
      (aka 'struct _zval_struct *') with an expression of type 'zval **' (aka 'struct _zval_struct **'); dereference with *
      [-Wincompatible-pointer-types]
                ZVAL_COPY_VALUE(&params[0], context);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/php70/7.0.4/include/php/Zend/zend_types.h:850:9: note: expanded from macro 'ZVAL_COPY_VALUE'
                zval *_z1 = (z);                                                                \
                      ^     ~~~
/Users/vpoturaev/php-profiler-extension/tideways.c:744:20: warning: incompatible pointer types assigning to 'zval *'
      (aka 'struct _zval_struct *') from 'zval ***' (aka 'struct _zval_struct ***') [-Wincompatible-pointer-types]
                twcb->fci.params = (zval ***)params;
                                 ^ ~~~~~~~~~~~~~~~~
/Users/vpoturaev/php-profiler-extension/tideways.c:1249:3: warning: incompatible pointer types passing 'zval **'
      (aka 'struct _zval_struct **') to parameter of type 'zval *' (aka 'struct _zval_struct *'); dereference with *
      [-Wincompatible-pointer-types]
                zval_ptr_dtor(&retval_ptr);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/php70/7.0.4/include/php/Zend/zend_variables.h:122:48: note: expanded from macro 'zval_ptr_dtor'
#define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
                                               ^~~~~~~~~~
/usr/local/Cellar/php70/7.0.4/include/php/Zend/zend_variables.h:112:36: note: passing argument to parameter 'zval_ptr' here
ZEND_API void _zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC);
                                   ^
4 warnings generated.
/bin/sh /Users/vpoturaev/php-profiler-extension/libtool --mode=link cc -DPHP_ATOM_INC -I/Users/vpoturaev/php-profiler-extension/include -I/Users/vpoturaev/php-profiler-extension/main -I/Users/vpoturaev/php-profiler-extension -I/usr/local/Cellar/php70/7.0.4/include/php -I/usr/local/Cellar/php70/7.0.4/include/php/main -I/usr/local/Cellar/php70/7.0.4/include/php/TSRM -I/usr/local/Cellar/php70/7.0.4/include/php/Zend -I/usr/local/Cellar/php70/7.0.4/include/php/ext -I/usr/local/Cellar/php70/7.0.4/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -o tideways.la -export-dynamic -avoid-version -prefer-pic -module -rpath /Users/vpoturaev/php-profiler-extension/modules  php7/spans.lo tideways.lo
cc ${wl}-flat_namespace ${wl}-undefined ${wl}suppress -o .libs/tideways.so -bundle  php7/.libs/spans.o .libs/tideways.o
duplicate symbol _hp_globals in:
    php7/.libs/spans.o
    .libs/tideways.o
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [tideways.la] Error 1
12:30:52 ~/php-profiler-extension master

However it works fine for v4.0.0-beta2

12:32:09 ~/php-profiler-extension master ls | grep -v .git | xargs rm -rf
12:32:14 ~/php-profiler-extension master git reset --hard
HEAD is now at edfb29e Bump version to 4.0.4
12:32:19 ~/php-profiler-extension master git checkout v4.0.0-beta2
Note: checking out 'v4.0.0-beta2'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 276b35f... Disable doctrine.query support for now.
12:32:22 ~/php-profiler-extension (v4.0.0-beta2) phpize
Configuring for:
PHP Api Version:         20151012
Zend Module Api No:      20151012
Zend Extension Api No:   320151012
12:32:39 ~/php-profiler-extension (v4.0.0-beta2) ./configure
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-apple-darwin15.3.0
checking host system type... x86_64-apple-darwin15.3.0
checking target system type... x86_64-apple-darwin15.3.0
checking for PHP prefix... /usr/local/Cellar/php70/7.0.4
checking for PHP includes... -I/usr/local/Cellar/php70/7.0.4/include/php -I/usr/local/Cellar/php70/7.0.4/include/php/main -I/usr/local/Cellar/php70/7.0.4/include/php/TSRM -I/usr/local/Cellar/php70/7.0.4/include/php/Zend -I/usr/local/Cellar/php70/7.0.4/include/php/ext -I/usr/local/Cellar/php70/7.0.4/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/Cellar/php70/7.0.4/lib/php/extensions/no-debug-non-zts-20151012
checking for PHP installed headers prefix... /usr/local/Cellar/php70/7.0.4/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.14.3 (ok)
checking for gawk... gawk
checking whether to enable Tideways support... yes, shared
checking for clock_gettime... no
checking for clock_gettime in -lrt... no
checking for clock_get_time... yes
checking for ld used by cc... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 196608
checking command to parse /usr/bin/nm output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking if cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fno-common
checking if cc PIC flag -fno-common works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin15.3.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
12:32:48 ~/php-profiler-extension (v4.0.0-beta2) make
/bin/sh /Users/vpoturaev/php-profiler-extension/libtool --mode=compile cc  -I. -I/Users/vpoturaev/php-profiler-extension -DPHP_ATOM_INC -I/Users/vpoturaev/php-profiler-extension/include -I/Users/vpoturaev/php-profiler-extension/main -I/Users/vpoturaev/php-profiler-extension -I/usr/local/Cellar/php70/7.0.4/include/php -I/usr/local/Cellar/php70/7.0.4/include/php/main -I/usr/local/Cellar/php70/7.0.4/include/php/TSRM -I/usr/local/Cellar/php70/7.0.4/include/php/Zend -I/usr/local/Cellar/php70/7.0.4/include/php/ext -I/usr/local/Cellar/php70/7.0.4/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /Users/vpoturaev/php-profiler-extension/tideways.c -o tideways.lo
 cc -I. -I/Users/vpoturaev/php-profiler-extension -DPHP_ATOM_INC -I/Users/vpoturaev/php-profiler-extension/include -I/Users/vpoturaev/php-profiler-extension/main -I/Users/vpoturaev/php-profiler-extension -I/usr/local/Cellar/php70/7.0.4/include/php -I/usr/local/Cellar/php70/7.0.4/include/php/main -I/usr/local/Cellar/php70/7.0.4/include/php/TSRM -I/usr/local/Cellar/php70/7.0.4/include/php/Zend -I/usr/local/Cellar/php70/7.0.4/include/php/ext -I/usr/local/Cellar/php70/7.0.4/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /Users/vpoturaev/php-profiler-extension/tideways.c  -fno-common -DPIC -o .libs/tideways.o
/Users/vpoturaev/php-profiler-extension/tideways.c:1072:15: warning: using the result of an assignment as a condition without
      parentheses [-Wparentheses]
        if (zidx_ptr = zend_hash_str_find(hp_globals.span_cache, summary, strlen(summary))) {
            ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/vpoturaev/php-profiler-extension/tideways.c:1072:15: note: place parentheses around the assignment to silence this warning
        if (zidx_ptr = zend_hash_str_find(hp_globals.span_cache, summary, strlen(summary))) {
                     ^
            (                                                                             )
/Users/vpoturaev/php-profiler-extension/tideways.c:1072:15: note: use '==' to turn this assignment into an equality comparison
        if (zidx_ptr = zend_hash_str_find(hp_globals.span_cache, summary, strlen(summary))) {
                     ^
                     ==
/Users/vpoturaev/php-profiler-extension/tideways.c:1155:3: warning: incompatible pointer types initializing 'zval *'
      (aka 'struct _zval_struct *') with an expression of type 'zval **' (aka 'struct _zval_struct **'); dereference with *
      [-Wincompatible-pointer-types]
                ZVAL_COPY_VALUE(&params[0], context);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/php70/7.0.4/include/php/Zend/zend_types.h:850:9: note: expanded from macro 'ZVAL_COPY_VALUE'
                zval *_z1 = (z);                                                                \
                      ^     ~~~
/Users/vpoturaev/php-profiler-extension/tideways.c:1164:20: warning: incompatible pointer types assigning to 'zval *'
      (aka 'struct _zval_struct *') from 'zval ***' (aka 'struct _zval_struct ***') [-Wincompatible-pointer-types]
                twcb->fci.params = (zval ***)params;
                                 ^ ~~~~~~~~~~~~~~~~
/Users/vpoturaev/php-profiler-extension/tideways.c:1428:7: warning: assigning to 'char *' from 'const char *' discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
        view = hp_get_base_filename(Z_STRVAL_P(name));
             ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/vpoturaev/php-profiler-extension/tideways.c:2684:15: warning: implicit declaration of function 'zend_exception_get_default' is
      invalid in C99 [-Wimplicit-function-declaration]
        default_ce = zend_exception_get_default(TSRMLS_C);
                     ^
/Users/vpoturaev/php-profiler-extension/tideways.c:2684:13: warning: incompatible integer to pointer conversion assigning to
      'zend_class_entry *' (aka 'struct _zend_class_entry *') from 'int' [-Wint-conversion]
        default_ce = zend_exception_get_default(TSRMLS_C);
                   ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/vpoturaev/php-profiler-extension/tideways.c:3491:3: warning: incompatible pointer types assigning to 'char *' from
      'zend_string *' (aka 'struct _zend_string *') [-Wincompatible-pointer-types]
                ZEND_HASH_FOREACH_KEY_VAL(ht, idx, str, val) {
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/php70/7.0.4/include/php/Zend/zend_hash.h:800:7: note: expanded from macro 'ZEND_HASH_FOREACH_KEY_VAL'
        _key = _p->key; \
             ^ ~~~~~~~
7 warnings generated.
/bin/sh /Users/vpoturaev/php-profiler-extension/libtool --mode=link cc -DPHP_ATOM_INC -I/Users/vpoturaev/php-profiler-extension/include -I/Users/vpoturaev/php-profiler-extension/main -I/Users/vpoturaev/php-profiler-extension -I/usr/local/Cellar/php70/7.0.4/include/php -I/usr/local/Cellar/php70/7.0.4/include/php/main -I/usr/local/Cellar/php70/7.0.4/include/php/TSRM -I/usr/local/Cellar/php70/7.0.4/include/php/Zend -I/usr/local/Cellar/php70/7.0.4/include/php/ext -I/usr/local/Cellar/php70/7.0.4/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -o tideways.la -export-dynamic -avoid-version -prefer-pic -module -rpath /Users/vpoturaev/php-profiler-extension/modules  tideways.lo
cc ${wl}-flat_namespace ${wl}-undefined ${wl}suppress -o .libs/tideways.so -bundle  .libs/tideways.o
dsymutil .libs/tideways.so || :
creating tideways.la
(cd .libs && rm -f tideways.la && ln -s ../tideways.la tideways.la)
/bin/sh /Users/vpoturaev/php-profiler-extension/libtool --mode=install cp ./tideways.la /Users/vpoturaev/php-profiler-extension/modules
cp ./.libs/tideways.so /Users/vpoturaev/php-profiler-extension/modules/tideways.so
cp ./.libs/tideways.lai /Users/vpoturaev/php-profiler-extension/modules/tideways.la
----------------------------------------------------------------------
Libraries have been installed in:
   /Users/vpoturaev/php-profiler-extension/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
     during execution

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

12:32:53 ~/php-profiler-extension (v4.0.0-beta2)

And if you try to build master after v4.0.0-beta2 configure, it will succeed.

12:34:48 ~/php-profiler-extension (v4.0.0-beta2) git checkout master
Previous HEAD position was 276b35f... Disable doctrine.query support for now.
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
12:35:03 ~/php-profiler-extension master make clean
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
find . -name \*.lo -o -name \*.o | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp.la       modules/* libs/*
12:35:08 ~/php-profiler-extension master make
/bin/sh /Users/vpoturaev/php-profiler-extension/libtool --mode=compile cc  -I. -I/Users/vpoturaev/php-profiler-extension -DPHP_ATOM_INC -I/Users/vpoturaev/php-profiler-extension/include -I/Users/vpoturaev/php-profiler-extension/main -I/Users/vpoturaev/php-profiler-extension -I/usr/local/Cellar/php70/7.0.4/include/php -I/usr/local/Cellar/php70/7.0.4/include/php/main -I/usr/local/Cellar/php70/7.0.4/include/php/TSRM -I/usr/local/Cellar/php70/7.0.4/include/php/Zend -I/usr/local/Cellar/php70/7.0.4/include/php/ext -I/usr/local/Cellar/php70/7.0.4/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /Users/vpoturaev/php-profiler-extension/tideways.c -o tideways.lo
mkdir .libs
 cc -I. -I/Users/vpoturaev/php-profiler-extension -DPHP_ATOM_INC -I/Users/vpoturaev/php-profiler-extension/include -I/Users/vpoturaev/php-profiler-extension/main -I/Users/vpoturaev/php-profiler-extension -I/usr/local/Cellar/php70/7.0.4/include/php -I/usr/local/Cellar/php70/7.0.4/include/php/main -I/usr/local/Cellar/php70/7.0.4/include/php/TSRM -I/usr/local/Cellar/php70/7.0.4/include/php/Zend -I/usr/local/Cellar/php70/7.0.4/include/php/ext -I/usr/local/Cellar/php70/7.0.4/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /Users/vpoturaev/php-profiler-extension/tideways.c  -fno-common -DPIC -o .libs/tideways.o
/Users/vpoturaev/php-profiler-extension/tideways.c:572:15: warning: using the result of an assignment as a condition without
      parentheses [-Wparentheses]
        if (zidx_ptr = zend_hash_str_find(TWG(span_cache), summary, strlen(summary))) {
            ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/vpoturaev/php-profiler-extension/tideways.c:572:15: note: place parentheses around the assignment to silence this warning
        if (zidx_ptr = zend_hash_str_find(TWG(span_cache), summary, strlen(summary))) {
                     ^
            (                                                                       )
/Users/vpoturaev/php-profiler-extension/tideways.c:572:15: note: use '==' to turn this assignment into an equality comparison
        if (zidx_ptr = zend_hash_str_find(TWG(span_cache), summary, strlen(summary))) {
                     ^
                     ==
/Users/vpoturaev/php-profiler-extension/tideways.c:734:3: warning: incompatible pointer types initializing 'zval *'
      (aka 'struct _zval_struct *') with an expression of type 'zval **' (aka 'struct _zval_struct **'); dereference with *
      [-Wincompatible-pointer-types]
                ZVAL_COPY_VALUE(&params[0], context);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/php70/7.0.4/include/php/Zend/zend_types.h:850:9: note: expanded from macro 'ZVAL_COPY_VALUE'
                zval *_z1 = (z);                                                                \
                      ^     ~~~
/Users/vpoturaev/php-profiler-extension/tideways.c:744:20: warning: incompatible pointer types assigning to 'zval *'
      (aka 'struct _zval_struct *') from 'zval ***' (aka 'struct _zval_struct ***') [-Wincompatible-pointer-types]
                twcb->fci.params = (zval ***)params;
                                 ^ ~~~~~~~~~~~~~~~~
/Users/vpoturaev/php-profiler-extension/tideways.c:1249:3: warning: incompatible pointer types passing 'zval **'
      (aka 'struct _zval_struct **') to parameter of type 'zval *' (aka 'struct _zval_struct *'); dereference with *
      [-Wincompatible-pointer-types]
                zval_ptr_dtor(&retval_ptr);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/php70/7.0.4/include/php/Zend/zend_variables.h:122:48: note: expanded from macro 'zval_ptr_dtor'
#define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
                                               ^~~~~~~~~~
/usr/local/Cellar/php70/7.0.4/include/php/Zend/zend_variables.h:112:36: note: passing argument to parameter 'zval_ptr' here
ZEND_API void _zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC);
                                   ^
4 warnings generated.
/bin/sh /Users/vpoturaev/php-profiler-extension/libtool --mode=link cc -DPHP_ATOM_INC -I/Users/vpoturaev/php-profiler-extension/include -I/Users/vpoturaev/php-profiler-extension/main -I/Users/vpoturaev/php-profiler-extension -I/usr/local/Cellar/php70/7.0.4/include/php -I/usr/local/Cellar/php70/7.0.4/include/php/main -I/usr/local/Cellar/php70/7.0.4/include/php/TSRM -I/usr/local/Cellar/php70/7.0.4/include/php/Zend -I/usr/local/Cellar/php70/7.0.4/include/php/ext -I/usr/local/Cellar/php70/7.0.4/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -o tideways.la -export-dynamic -avoid-version -prefer-pic -module -rpath /Users/vpoturaev/php-profiler-extension/modules  tideways.lo
cc ${wl}-flat_namespace ${wl}-undefined ${wl}suppress -o .libs/tideways.so -bundle  .libs/tideways.o
dsymutil .libs/tideways.so || :
creating tideways.la
(cd .libs && rm -f tideways.la && ln -s ../tideways.la tideways.la)
/bin/sh /Users/vpoturaev/php-profiler-extension/libtool --mode=install cp ./tideways.la /Users/vpoturaev/php-profiler-extension/modules
cp ./.libs/tideways.so /Users/vpoturaev/php-profiler-extension/modules/tideways.so
cp ./.libs/tideways.lai /Users/vpoturaev/php-profiler-extension/modules/tideways.la
----------------------------------------------------------------------
Libraries have been installed in:
   /Users/vpoturaev/php-profiler-extension/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
     during execution

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

12:35:14 ~/php-profiler-extension master sudo make install
Password:
Installing shared extensions:     /usr/local/Cellar/php70/7.0.4/lib/php/extensions/no-debug-non-zts-20151012/
12:36:18 ~/php-profiler-extension master php -i | grep tideways
Additional .ini files parsed => /usr/local/etc/php/7.0/conf.d/ext-tideways.ini,
tideways
tideways => 4.0.4
Connection (tideways.connection) => unix:///var/run/tideways/tidewaysd.sock
UDP Connection (tideways.udp_connection) => 127.0.0.1:8135
Default API Key (tideways.api_key) =>
Default Sample-Rate (tideways.sample_rate) => 30
Framework Detection (tideways.framework) =>
Automatically Start (tideways.auto_start) => Yes
Tideways Collect Mode (tideways.collect) => tracing
Tideways Monitoring Mode (tideways.monitor) => basic
Allowed Distributed Tracing Hosts (tideways.distributed_tracing_hosts) => 127.0.0.1
Load PHP Library (tideways.auto_prepend_library) => Yes
12:36:29 ~/php-profiler-extension master

So, probably ./configure script was broken since v4.0.0-beta2.
Thanks.

Download feed for SaaS extension

Hey!
I'm one of the maintainers of the https://github.com/cloudfoundry/php-buildpack
We currently build php with support for tideways_xhprof in multiple versions (one pinned at 4.1.7 another tracking the latest releases). Is there a feed somewhere where we can consume released versions of the tideways extension so that we can keep up to date with releases there instead of pinning back?

Thanks!

Certain scenarios illegally overwrite callgraph_buckets memory

When callgraph profiling a large Laravel code base at some point a frame is allocated into the callgraph_buckets memory for whatever reason:

Hardware watchpoint 4: -location tideways_xhprof_globals.callgraph_buckets[3993]

Old value = (xhprof_callgraph_bucket *) 0x2
New value = (xhprof_callgraph_bucket *) 0x1
tracing_exit_frame_callgraph () at /tmp/php-profiler-extension/tracing.h:211
211	    TXRG(callgraph_frames) = TXRG(callgraph_frames)->previous_frame;
Hardware watchpoint 4: -location tideways_xhprof_globals.callgraph_buckets[3993]

Old value = (xhprof_callgraph_bucket *) 0x1
New value = (xhprof_callgraph_bucket *) 0x2
tracing_enter_frame_callgraph (execute_data=0x7ffff3814bd0, root_symbol=0x0) at /tmp/php-profiler-extension/tracing.h:149
149	    current_frame->recurse_level = recurse_level;

php-xhprof-extension-4.1.7 doesn't build on php-7.4.0alpha1

When trying to install php-xhprof-extension-4.1.7 on php-7.4.0alpha1 it fails with a compile error.

In file included from /usr/local/php7.4/include/php/Zend/zend.h:32:0,
                 from /usr/local/php7.4/include/php/main/php.h:33,
                 from /usr/local/src/php-7.4.0alpha1/php-xhprof-extension-4.1.7/tideways.c:34:
/usr/local/src/php-7.4.0alpha1/php-xhprof-extension-4.1.7/tideways.c: In function โ€˜tw_pcre_matchโ€™:
/usr/local/php7.4/include/php/Zend/zend_string.h:52:25: warning: passing argument 2 of โ€˜php_pcre_match_implโ€™ from incompatible pointer type [-Wincompat
ible-pointer-types]
 #define ZSTR_VAL(zstr)  (zstr)->val
                         ^
/usr/local/php7.4/include/php/Zend/zend_types.h:681:27: note: in expansion of macro โ€˜ZSTR_VALโ€™
 #define Z_STRVAL(zval)    ZSTR_VAL(Z_STR(zval))
                           ^
/usr/local/php7.4/include/php/Zend/zend_types.h:682:30: note: in expansion of macro โ€˜Z_STRVALโ€™
 #define Z_STRVAL_P(zval_p)   Z_STRVAL(*(zval_p))
                              ^
/usr/local/src/php-7.4.0alpha1/php-xhprof-extension-4.1.7/tideways.c:177:111: note: in expansion of macro โ€˜Z_STRVAL_Pโ€™
 #define tw_pcre_match_impl(pce, zv, retval, parts, global, use_flags, flags, offset) php_pcre_match_impl(pce, Z_STRVAL_P(subject), Z_STRLEN_P(subject)
, return_value, parts, global, use_flags, flags, offset)
                                                                                                               ^
/usr/local/src/php-7.4.0alpha1/php-xhprof-extension-4.1.7/tideways.c:1745:5: note: in expansion of macro โ€˜tw_pcre_match_implโ€™
     tw_pcre_match_impl(pce, subject, return_value, subpats, 0, 1, 0, 0);
     ^
In file included from /usr/local/src/php-7.4.0alpha1/php-xhprof-extension-4.1.7/tideways.c:50:0:
/usr/local/php7.4/include/php/ext/pcre/php_pcre.h:44:14: note: expected โ€˜zend_string * {aka struct _zend_string *}โ€™ but argument is of type โ€˜char *โ€™
 PHPAPI void  php_pcre_match_impl(pcre_cache_entry *pce, zend_string *subject_str, zval *return_value,
              ^
In file included from /usr/local/php7.4/include/php/Zend/zend.h:32:0,
                 from /usr/local/php7.4/include/php/main/php.h:33,
                 from /usr/local/src/php-7.4.0alpha1/php-xhprof-extension-4.1.7/tideways.c:34:
/usr/local/php7.4/include/php/Zend/zend_string.h:53:25: warning: passing argument 3 of โ€˜php_pcre_match_implโ€™ makes pointer from integer without a cast
[-Wint-conversion]
 #define ZSTR_LEN(zstr)  (zstr)->len
/usr/local/php7.4/include/php/Zend/zend_types.h:684:27: note: in expansion of macro โ€˜ZSTR_LENโ€™
 #define Z_STRLEN(zval)    ZSTR_LEN(Z_STR(zval))
                           ^
/usr/local/php7.4/include/php/Zend/zend_types.h:685:30: note: in expansion of macro โ€˜Z_STRLENโ€™
 #define Z_STRLEN_P(zval_p)   Z_STRLEN(*(zval_p))
                              ^
/usr/local/src/php-7.4.0alpha1/php-xhprof-extension-4.1.7/tideways.c:177:132: note: in expansion of macro โ€˜Z_STRLEN_Pโ€™
 #define tw_pcre_match_impl(pce, zv, retval, parts, global, use_flags, flags, offset) php_pcre_match_impl(pce, Z_STRVAL_P(subject), Z_STRLEN_P(subject)
, return_value, parts, global, use_flags, flags, offset)
                                                                                                                                    ^
/usr/local/src/php-7.4.0alpha1/php-xhprof-extension-4.1.7/tideways.c:1745:5: note: in expansion of macro โ€˜tw_pcre_match_implโ€™
     tw_pcre_match_impl(pce, subject, return_value, subpats, 0, 1, 0, 0);
     ^
In file included from /usr/local/src/php-7.4.0alpha1/php-xhprof-extension-4.1.7/tideways.c:50:0:
/usr/local/php7.4/include/php/ext/pcre/php_pcre.h:44:14: note: expected โ€˜zval * {aka struct _zval_struct *}โ€™ but argument is of type โ€˜size_t {aka long
unsigned int}โ€™
 PHPAPI void  php_pcre_match_impl(pcre_cache_entry *pce, zend_string *subject_str, zval *return_value,
              ^
/usr/local/src/php-7.4.0alpha1/php-xhprof-extension-4.1.7/tideways.c:1745:52: warning: passing argument 5 of โ€˜php_pcre_match_implโ€™ makes integer from p
ointer without a cast [-Wint-conversion]
     tw_pcre_match_impl(pce, subject, return_value, subpats, 0, 1, 0, 0);
                                                    ^
/usr/local/src/php-7.4.0alpha1/php-xhprof-extension-4.1.7/tideways.c:177:167: note: in definition of macro โ€˜tw_pcre_match_implโ€™
 #define tw_pcre_match_impl(pce, zv, retval, parts, global, use_flags, flags, offset) php_pcre_match_impl(pce, Z_STRVAL_P(subject), Z_STRLEN_P(subject)
, return_value, parts, global, use_flags, flags, offset)

                ^
In file included from /usr/local/src/php-7.4.0alpha1/php-xhprof-extension-4.1.7/tideways.c:50:0:
/usr/local/php7.4/include/php/ext/pcre/php_pcre.h:44:14: note: expected โ€˜intโ€™ but argument is of type โ€˜zval * {aka struct _zval_struct *}โ€™
 PHPAPI void  php_pcre_match_impl(pcre_cache_entry *pce, zend_string *subject_str, zval *return_value,
              ^
/usr/local/src/php-7.4.0alpha1/php-xhprof-extension-4.1.7/tideways.c:177:86: error: too many arguments to function โ€˜php_pcre_match_implโ€™
 #define tw_pcre_match_impl(pce, zv, retval, parts, global, use_flags, flags, offset) php_pcre_match_impl(pce, Z_STRVAL_P(subject), Z_STRLEN_P(subject)
, return_value, parts, global, use_flags, flags, offset)
                                                                                      ^
/usr/local/src/php-7.4.0alpha1/php-xhprof-extension-4.1.7/tideways.c:1745:5: note: in expansion of macro โ€˜tw_pcre_match_implโ€™
     tw_pcre_match_impl(pce, subject, return_value, subpats, 0, 1, 0, 0);
In file included from /usr/local/src/php-7.4.0alpha1/php-xhprof-extension-4.1.7/tideways.c:50:0:
/usr/local/php7.4/include/php/ext/pcre/php_pcre.h:44:14: note: declared here
 PHPAPI void  php_pcre_match_impl(pcre_cache_entry *pce, zend_string *subject_str, zval *return_value,
              ^
/usr/local/src/php-7.4.0alpha1/php-xhprof-extension-4.1.7/tideways.c: In function โ€˜hp_get_file_summaryโ€™:
/usr/local/src/php-7.4.0alpha1/php-xhprof-extension-4.1.7/tideways.c:3006:24: warning: zero-length gnu_printf format string [-Wformat-zero-length]
     snprintf(ret, len, "");
                        ^
Makefile:196: recipe for target 'tideways.lo' failed
make: *** [tideways.lo] Error 1                         ^

5 b3 build segfaults for s390x

I pushed upgrade to 5 beta 3 (for php 7.2) alpinelinux/aports@2d7cbaa

But build for x86 (not 64 bit) fails, log https://build.alpinelinux.org/buildlogs/build-edge-x86/testing/php7-tideways_xhprof/php7-tideways_xhprof-5.0_beta3-r1.log

In file included from /home/buildozer/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/tracing.h:1,
                 from /home/buildozer/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/tideways_xhprof.c:13:
/home/buildozer/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/timer.h: In function 'time_milliseconds':
/home/buildozer/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/timer.h:79:13: error: a label can only be part of a statement and a declaration is not a statement
             int64_t ret;
             ^~~~~~~
In file included from /home/buildozer/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/tracing.h:1,
                 from /home/buildozer/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/tracing.c:11:
/home/buildozer/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/timer.h: In function 'time_milliseconds':
/home/buildozer/aports/testing/php7-tideways_xhprof/src/php-xhprof-extension-5.0-beta3/timer.h:79:13: error: a label can only be part of a statement and a declaration is not a statement
             int64_t ret;
             ^~~~~~~
make: *** [Makefile:196: tracing.lo] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Makefile:194: tideways_xhprof.lo] Error 1

Any idea what's wrong?

Sampling with Tideways

Is there any equivalent of xhprof_sample_enable in Tideways? Using xhprof_enable I can only get 1 level deep call stacks, which makes the data unusable for Flamegraphs and the like.

gc

(lldb) bt

  • thread #1: tid = 0x1836c, 0x00000001039689dd tideways.so`tw_span_create(category="gc", category_len=2) + 77 at tideways.c:723, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1c)
    • frame #0: 0x00000001039689dd tideways.sotw_span_create(category="gc", category_len=2) + 77 at tideways.c:723 frame #1: 0x000000010396967f tideways.sotw_gc_collect_cycles + 63 at tideways.c:3542
      frame #2: 0x0000000100419060 phpshutdown_executor + 809 frame #3: 0x0000000100428978 phpzend_deactivate + 102
      frame #4: 0x00000001003c93a1 phpphp_request_shutdown + 568 frame #5: 0x00000001004b81b3 phpdo_cli + 4733
      frame #6: 0x00000001004b6d40 phpmain + 1297 frame #7: 0x00007fff8da915ad libdyld.dylibstart + 1
      (lldb)

Tested with armv7l architecture - 1 failed test

as it happens, my hoster ( scaleway.com ) uses ARM CPUs, so I had a chance to test the extension there.

As there is no package provided, I compiled myself and executed also the testsuite.
There was one failing test. I paste now the maybe important parts of the result of make test

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Tideways: Timer Tests [tests/tideways_005.phpt]
=====================================================================


================================================================================
/root/php-profiler-extension/tests/tideways_005.phpt
================================================================================
Verifying sleep_10000_micro...
Failed sleep_10000_micro. Expected: 10000 microsecs. Actual: 20104 microsecs.
-------------
Verifying sleep_20000_micro...
Failed sleep_20000_micro. Expected: 20000 microsecs. Actual: 29953 microsecs.
-------------
Verifying sleep_50000_micro...
OK: sleep_50000_micro
-------------
================================================================================
002+ Failed sleep_10000_micro. Expected: 10000 microsecs. Actual: 20104 microsecs.
002- OK: sleep_10000_micro
005+ Failed sleep_20000_micro. Expected: 20000 microsecs. Actual: 29953 microsecs.
005- OK: sleep_20000_micro
================================================================================


================================================================================
BUILD ENVIRONMENT
================================================================================
OS:
Linux - Linux cotya-front1 3.2.34-30 #17 SMP Mon Apr 13 15:53:45 UTC 2015 armv7l



================================================================================
PHPINFO
================================================================================
phpinfo()
PHP Version => 5.5.9-1ubuntu4.14

I let out most parts, but can send them to you if needed.
Else the extension seems to work, at least it does not throw any errors and creates trace data. Cant say anything about correctness of the measured times.

Hope this is helpfull :)

SIGSEGV triggered by `tracing_exception_span_create`

We noticed that some of our backend processes started to error with segmentation faults. Upon digging into the core dumps we found that the issue seems to be related to calls to tracing_exception_span_create when nested inside multiple calls to tideways_execute_ex.

We have so far not been able to reproduce in a simple test case, but can always reproduce with our full stack when a php fatal is hit due to a missing function.

For reference the core dump bt:

#0  0x00007f30348a0dba in tracing_exception_span_create () from /usr/lib/php/20160303/tideways.so
#1  0x00005614bde3637c in zend_throw_exception_internal (exception=exception@entry=0x7ffe43778340) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_exceptions.c:167
#2  0x00005614bde364e3 in zend_throw_exception (exception_ce=exception_ce@entry=0x5614bf5fca40, message=<optimized out>, code=code@entry=0) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_exceptions.c:935
#3  0x00005614bde35477 in zend_throw_error (exception_ce=0x5614bf5fca40, exception_ce@entry=0x0, format=format@entry=0x5614be0a8f40 "Call to undefined method %s::%s()")
    at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend.c:1354
#4  0x00005614be042993 in ZEND_INIT_METHOD_CALL_SPEC_CV_CONST_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:39719
#5  0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#6  0x00007f303929417b in nr_php_execute_enabled () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1255
#7  0x00007f30392947c2 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1365
#8  0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#9  0x00005614be049c05 in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:949
#10 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#11 0x00007f303929417b in nr_php_execute_enabled () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1255
#12 0x00007f30392947c2 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1365
#13 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#14 0x00005614be049c05 in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:949
#15 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#16 0x00007f303929417b in nr_php_execute_enabled () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1255
#17 0x00007f30392947c2 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1365
#18 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#19 0x00005614be049c05 in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:949
#20 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#21 0x00007f303929417b in nr_php_execute_enabled () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1255
#22 0x00007f30392947c2 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1365
#23 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#24 0x00005614bdfa3d81 in zend_call_function (fci=fci@entry=0x7ffe43778d00, fci_cache=fci_cache@entry=0x7ffe43778cd0) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_execute_API.c:855
#25 0x00005614bdef28ff in zif_call_user_func (execute_data=<optimized out>, return_value=0x7f3048e15250) at /build/php7.1-M8QHFU/php7.1-7.1.23/ext/standard/basic_functions.c:4869
#26 0x00007f30348b7d3d in tracer_overwrite_call_user_func () from /usr/lib/php/20160303/tideways.so
#27 0x00007f30348f8935 in tideways_execute_internal () from /usr/lib/php/20160303/tideways.so
#28 0x00005614be0498f0 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:1099
#29 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#30 0x00007f303929417b in nr_php_execute_enabled () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1255
#31 0x00007f30392947c2 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1365
#32 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#33 0x00005614be049785 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:1076
#34 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#35 0x00007f303929417b in nr_php_execute_enabled () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1255
#36 0x00007f30392947c2 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1365
#37 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#38 0x00005614be049785 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:1076
#39 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#40 0x00007f303929417b in nr_php_execute_enabled () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1255
#41 0x00007f30392947c2 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1365
#42 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#43 0x00005614be049c05 in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:949
#44 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#45 0x00007f303929417b in nr_php_execute_enabled () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1255
#46 0x00007f30392947c2 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1365
#47 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#48 0x00005614be049c05 in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:949
#49 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#50 0x00007f303929417b in nr_php_execute_enabled () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1255
#51 0x00007f30392947c2 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1365
#52 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#53 0x00005614be049c05 in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:949
#54 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#55 0x00007f303929417b in nr_php_execute_enabled () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1255
#56 0x00007f30392947c2 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1365
#57 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#58 0x00005614be049c05 in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:949
#59 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#60 0x00007f303929417b in nr_php_execute_enabled () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1255
#61 0x00007f30392947c2 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1365
#62 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#63 0x00005614be049785 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:1076
#64 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#65 0x00007f303929417b in nr_php_execute_enabled () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1255
#66 0x00007f30392947c2 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1365
#67 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#68 0x00005614be049785 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:1076
#69 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#70 0x00007f303929417b in nr_php_execute_enabled () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1255
#71 0x00007f30392947c2 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1365
#72 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#73 0x00005614be049785 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:1076
#74 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#75 0x00007f303929417b in nr_php_execute_enabled () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1255
#76 0x00007f30392947c2 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1365
#77 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#78 0x00005614be049c05 in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:949
#79 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#80 0x00007f303929417b in nr_php_execute_enabled () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1255
#81 0x00007f30392947c2 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1365
#82 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#83 0x00005614be049c05 in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:949
#84 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#85 0x00007f303929417b in nr_php_execute_enabled () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1255
#86 0x00007f30392947c2 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1365
#87 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#88 0x00005614be049c05 in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:949
#89 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#90 0x00007f30392947e0 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1356
#91 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#92 0x00005614be049c05 in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:949
#93 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#94 0x00007f30392947e0 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1356
#95 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#96 0x00005614bdfa3d81 in zend_call_function (fci=fci@entry=0x7ffe4377a600, fci_cache=0x7ffe4377a540, fci_cache@entry=0x0) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_execute_API.c:855
#97 0x00005614bdfa41d5 in _call_user_function_ex (object=<optimized out>, function_name=<optimized out>, retval_ptr=<optimized out>, param_count=<optimized out>, params=<optimized out>, 
    no_separation=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_execute_API.c:672
#98 0x00007f303f18d25f in ?? () from /usr/lib/php/20160303/gearman.so
#99 0x00007f303ef637e7 in ?? () from /usr/lib/x86_64-linux-gnu/libgearman.so.8
#100 0x00007f303ef6c264 in gearman_worker_work () from /usr/lib/x86_64-linux-gnu/libgearman.so.8
#101 0x00007f303f18e583 in zif_gearman_worker_work () from /usr/lib/php/20160303/gearman.so
#102 0x00007f30348f8935 in tideways_execute_internal () from /usr/lib/php/20160303/tideways.so
#103 0x00005614be0498f0 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:1099
#104 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#105 0x00007f303929417b in nr_php_execute_enabled () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1255
#106 0x00007f30392947c2 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1365
#107 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#108 0x00005614be049c05 in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:949
#109 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#110 0x00007f303929417b in nr_php_execute_enabled () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1255
#111 0x00007f30392947c2 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1365
#112 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#113 0x00005614be049785 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:1076
#114 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#115 0x00007f303929417b in nr_php_execute_enabled () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1255
#116 0x00007f30392947c2 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1365
#117 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#118 0x00005614be049785 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:1076
#119 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#120 0x00007f303929417b in nr_php_execute_enabled () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1255
#121 0x00007f30392947c2 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1365
#122 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#123 0x00005614be049785 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:1076
#124 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#125 0x00007f303929417b in nr_php_execute_enabled () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1255
#126 0x00007f30392947c2 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1365
#127 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#128 0x00005614be049785 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:1076
#129 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#130 0x00007f303929417b in nr_php_execute_enabled () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1255
#131 0x00007f30392947c2 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1365
#132 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#133 0x00005614be049c05 in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:949
#134 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#135 0x00007f303929417b in nr_php_execute_enabled () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1255
#136 0x00007f30392947c2 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1365
#137 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#138 0x00005614be049c05 in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:949
#139 0x00005614bdff8a6b in execute_ex (ex=<optimized out>) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:429
#140 0x00007f30392942ba in nr_php_execute_file () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:925
#141 nr_php_execute_enabled () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1133
#142 0x00007f30392947c2 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1365
#143 0x00007f30348f8efb in tideways_execute_ex () from /usr/lib/php/20160303/tideways.so
#144 0x00005614be04bc14 in zend_execute (op_array=op_array@entry=0x7f3048e84000, return_value=return_value@entry=0x0) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend_vm_execute.h:474
#145 0x00005614bdfb3594 in zend_execute_scripts (type=type@entry=8, retval=retval@entry=0x0, file_count=file_count@entry=3) at /build/php7.1-M8QHFU/php7.1-7.1.23/Zend/zend.c:1482
#146 0x00005614bdf533a8 in php_execute_script (primary_file=0x7ffe4377d9d0) at /build/php7.1-M8QHFU/php7.1-7.1.23/main/main.c:2577
#147 0x00005614be04de09 in do_cli (argc=13, argv=0x5614bf53ba60) at /build/php7.1-M8QHFU/php7.1-7.1.23/sapi/cli/php_cli.c:993
#148 0x00005614bde39dbf in main (argc=13, argv=0x5614bf53ba60) at /build/php7.1-M8QHFU/php7.1-7.1.23/sapi/cli/php_cli.c:1381

and the zbacktrace for the same dump

[0x7f3048e154e0] CG\Log\Shared\Storage\Redis\ChannelAbstract->checkForOu(object[0x7f3048e15530]) /var/channelgrabber/cg-gearman/releases/20181024104543/vendor/channelgrabber/log/src/Shared/Storage/Redis/ChannelAbstract.php:106 
[0x7f3048e15460] CG\Log\Shared\Storage\Redis\ChannelAbstract->saveLog(object[0x7f3048e154b0]) /var/channelgrabber/cg-gearman/releases/20181024104543/vendor/channelgrabber/log/src/Shared/Storage/Redis/ChannelAbstract.php:60 
[0x7f3048e153f0] CG\Log\Shared\Storage\Redis\ChannelImmediate->save(object[0x7f3048e15440]) /var/channelgrabber/cg-gearman/releases/20181024104543/vendor/channelgrabber/log/src/Shared/Storage/Redis/ChannelImmediate.php:11 
[0x7f3048e15330] CG\Log\Listener->processLogEntity(object[0x7f3048e15380]) /var/channelgrabber/cg-gearman/releases/20181024104543/vendor/channelgrabber/log/src/Listener.php:151 
[0x7f3048e152c0] call_user_func(array(2)[0x7f3048e15310], object[0x7f3048e15320]) [internal function]
[0x7f3048e15150] Zend\EventManager\EventManager->triggerListeners("log:debug", object[0x7f3048e151b0], NULL) /var/channelgrabber/cg-gearman/releases/20181024104543/vendor/zendframework/zend-eventmanager/src/EventManager.php:468 
[0x7f3048e15090] Zend\EventManager\EventManager->trigger("log:debug", NULL, array(0)[0x7f3048e15100]) /var/channelgrabber/cg-gearman/releases/20181024104543/vendor/zendframework/zend-eventmanager/src/EventManager.php:207 
[0x7f3048e15000] Zend\EventManager\GlobalEventManager->trigger(object[0x7f3048e15050], NULL) /var/channelgrabber/cg-gearman/releases/20181024104543/vendor/zendframework/zend-eventmanager/src/GlobalEventManager.php:62 
[0x7f3048e14f80] CG\Log\Logger->trigger(object[0x7f3048e14fd0]) /var/channelgrabber/cg-gearman/releases/20181024104543/vendor/channelgrabber/log/src/Logger.php:86 
[0x7f3048e14eb0] CG\Log\Logger->triggerEvent(object[0x7f3048e14f00], "debug", "CG\Stdlib\Log", array(7)[0x7f3048e14f30]) /var/channelgrabber/cg-gearman/releases/20181024104543/vendor/channelgrabber/log/src/Logger.php:94 
[0x7f3048e14db0] CG\Log\Logger->log("Looking for images to associate with Item 322-2517-1 (OU 10199)", "ItemImageService::Looking for images to associate with Item", "debug", "CG\Stdlib\Log", NULL, array(2)[0x7f3048e14e50]) /var/channelgrabber/cg-gearman/releases/20181024104543/vendor/channelgrabber/log/src/Logger.php:65 
[0x7f3048e14cf0] CG\Order\Client\Item\Image\Service->log("Looking for images to associate with Item 322-2517-1 (OU 10199)", array(2)[0x7f3048e14d50], "debug", "CG\Stdlib\Log", NULL, array(2)[0x7f3048e14d90]) /var/channelgrabber/cg-gearman/releases/20181024104543/vendor/channelgrabber/stdlib/src/Log/LogTrait.php:66 
[0x7f3048e14bd0] CG\Order\Client\Item\Image\Service->logPretty("Looking for images to associate with Item 322-2517-1 (OU 10199)", array(0)[0x7f3048e14c30], "debug", array(2)[0x7f3048e14c50], array(2)[0x7f3048e14c60], reference) /var/channelgrabber/cg-gearman/releases/20181024104543/vendor/channelgrabber/stdlib/src/Log/LogTrait.php:128 
[0x7f3048e14b20] CG\Order\Client\Item\Image\Service->logPrettyDebug("Looking for images to associate with Item %s (OU %s)", array(0)[0x7f3048e14b80], array(2)[0x7f3048e14b90], array(2)[0x7f3048e14ba0], array(0)[0x7f3048e14bb0]) /var/channelgrabber/cg-gearman/releases/20181024104543/vendor/channelgrabber/stdlib/src/Log/LogTrait.php:256 
[0x7f3048e14a80] CG\Order\Client\Item\Image\Service->logDebug("Looking for images to associate with Item %s (OU %s)", array(2)[0x7f3048e14ae0], array(2)[0x7f3048e14af0]) /var/channelgrabber/cg-gearman/releases/20181024104543/vendor/channelgrabber/stdlib/src/Log/LogTrait.php:245 
[0x7f3048e149e0] CG\Order\Client\Item\Image\Service->findAndAssociateImagesWithItem(object[0x7f3048e14a30]) /var/channelgrabber/cg-gearman/releases/20181024104543/vendor/channelgrabber/order/src/Client/Item/Image/Service.php:66 
[0x7f3048e14950] CG\Order\Client\Gearman\WorkerFunction\SetItemImages->work(object[0x7f3048e149a0], object[0x7f3048e149b0]) /var/channelgrabber/cg-gearman/releases/20181024104543/vendor/channelgrabber/order/src/Client/Gearman/WorkerFunction/SetItemImages.php:26 
[0x7f3048e14860] CG\Gearman\WorkerFunctionAbstract->__invoke(object[0x7f3048e148b0]) /var/channelgrabber/cg-gearman/releases/20181024104543/vendor/channelgrabber/gearman/src/WorkerFunctionAbstract.php:63 
[0x7f3048e14750] {closure}(object[0x7f3048e147a0], object[0x7f3048e147b0]) /var/channelgrabber/cg-gearman/version/12/shared/config/console/commands/setItemImages.local.php:97 
[0x7f3048e14700] GearmanWorker->work() [internal function]
[0x7f3048e14540] {closure}(object[0x7f3048e14590], object[0x7f3048e145a0]) /var/channelgrabber/cg-gearman/version/12/shared/config/console/commands/setItemImages.local.php:109 
[0x7f3048e144a0] CG\Cilex\GenericCommand->execute(object[0x7f3048e144f0], object[0x7f3048e14500]) /var/channelgrabber/cg-gearman/releases/20181024104543/vendor/channelgrabber/cilex/src/GenericCommand.php:89 
[0x7f3048e143e0] Symfony\Component\Console\Command\Command->run(object[0x7f3048e14430], object[0x7f3048e14440]) /var/channelgrabber/cg-gearman/releases/20181024104543/vendor/symfony/console/Command/Command.php:257 
[0x7f3048e142f0] Symfony\Component\Console\Application->doRunCommand(object[0x7f3048e14340], object[0x7f3048e14350], object[0x7f3048e14360]) /var/channelgrabber/cg-gearman/releases/20181024104543/vendor/symfony/console/Application.php:866 
[0x7f3048e14220] Symfony\Component\Console\Application->doRun(object[0x7f3048e14270], object[0x7f3048e14280]) /var/channelgrabber/cg-gearman/releases/20181024104543/vendor/symfony/console/Application.php:193 
[0x7f3048e14180] Symfony\Component\Console\Application->run() /var/channelgrabber/cg-gearman/releases/20181024104543/vendor/symfony/console/Application.php:124 
[0x7f3048e140f0] Cilex\Application->run() /var/channelgrabber/cg-gearman/releases/20181024104543/vendor/cilex/cilex/src/Cilex/Application.php:66 
[0x7f3048e14030] (main) /var/channelgrabber/cg-gearman/releases/20181024104543/console/app.php:19

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.