Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError on PHP7.1.4 and goaop/framework:2.1.0 #324

Closed
icanhazstring opened this issue Apr 18, 2017 · 9 comments
Closed

TypeError on PHP7.1.4 and goaop/framework:2.1.0 #324

icanhazstring opened this issue Apr 18, 2017 · 9 comments

Comments

@icanhazstring
Copy link
Member

Hey,

I have a really weird bug.

Argument 1 passed to Go\\Core\\GoAspectContainer::Go\\Core\\{closure}() must be an instance of Go\\Core\\Container, instance of Go\\Core\\GoAspectContainer

I don't know if this bug is related with PHP7.1.4 or something else.
Current information:

Linux host 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1+deb8u1 (2017-02-22) x86_64 GNU/Linux
PHP 7.1.4-1+0~20170411221130.22+jessie~1.gbp4ea64a (cli) (built: Apr 11 2017 23:40:25) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.1.4-1+0~20170411221130.22+jessie~1.gbp4ea64a, Copyright (c) 1999-2017, by Zend Technologies

I already cleared aop cache. Restarted fpm and other stuff.
Nothing seems to work.

What is weird is, that this exception there doesn't make any sense. Since GoAspectContainer is derived from the Container itself. Another problem, i can't really debug this issue, since this is only happening on my live machine where i can't use xdebug.

@lisachenko
Copy link
Member

Hi! It's really strange error... From my own experience it can be related only to the bugs in PHP itself or extensions like Opcache. Could you please try on a local machine with another PHP version?
I have a doubt that this issue related to manual building of PHP and Opcache (according to your information about version)

@icanhazstring
Copy link
Member Author

It works on another machine. Which is weird.
Also. I have another project on the same machine - same setup with aop. This works ;)

Will dig into this tomorrow again. Hope i'll find something.
And thanks for the hint about opcache. Maybe i'll try to disable it for a shot. See if this changes something.

@icanhazstring
Copy link
Member Author

@lisachenko i (we) could resolve this issue.
There seems to be a problem with opcache as you thought.

There is probably a bug with the current php version (7.1.4) and opcache.revalidate_path = 1.
We deactivate this option, now its working as intended.
A workmate of mine will dig deeper into this which seems to be a segfault.

Will keep you posted tho :)

@smuggli
Copy link
Contributor

smuggli commented Apr 19, 2017

Like mentioned from @icanhazstring a segfault occurs in the process.

I dumped the core but there are no *-dbgsym packages for 7.1.4 yet (just for 7.1.3), so I will have to wait until they get released.

@lisachenko
Copy link
Member

@icanhazstring @smuggli Thank you for reporting! It will be interesting to see what cause segfaults

@lisachenko
Copy link
Member

Closing this issue because it's related to segfaults in unstable version of PHP.

@smuggli If you could find out what was the cause of segfault, just post it for me too, please

@smuggli
Copy link
Contributor

smuggli commented May 15, 2017

@lisachenko The error is still present in PHP 7.1.5 but with that release the dgb packages got updated aswell.

Edit (former tries where incorrect, havnt used php-fpm)

#0 zend_string_hash_val (s=0x600007fe8f3a719) at ./Zend/zend_string.h:85
#1 zend_hash_find_bucket (ht=0x166a460, ht=0x166a460, key=0x600007fe8f3a719) at ./Zend/zend_hash.c:478
#2 zend_hash_find (ht=0x166a460, key=0x600007fe8f3a719) at ./Zend/zend_hash.c:1959
#3 0x0000000000667f5c in ZEND_INIT_NS_FCALL_BY_NAME_SPEC_CONST_HANDLER () at ./Zend/zend_vm_execute.h:2218
#4 0x0000000000616a9b in execute_ex (ex=) at ./Zend/zend_vm_execute.h:429
#5 0x00007fe973764cc6 in xdebug_execute_ex (execute_data=0x7fe973c161f0) at ./build-7.1/xdebug.c:1995
#6 0x0000000000670e8a in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at ./Zend/zend_vm_execute.h:949
#7 0x0000000000616a9b in execute_ex (ex=) at ./Zend/zend_vm_execute.h:429
#8 0x00007fe973764cc6 in xdebug_execute_ex (execute_data=0x7fe973c16120) at ./build-7.1/xdebug.c:1995
#9 0x00000000005bd02d in zend_call_function (fci=fci@entry=0x7ffcfdff6f30, fci_cache=0x7ffcfdff6e60, fci_cache@entry=0x0) at ./Zend/zend_execute_API.c:855
#10 0x00000000005bd505 in _call_user_function_ex (object=object@entry=0x7fe8e16ba8c8, function_name=function_name@entry=0x7ffcfdff6fa0, retval_ptr=retval_ptr@entry=0x7ffcfdff6fb0, param_count=param_count@entry=4,
params=params@entry=0x7ffcfdff6fd0, no_separation=no_separation@entry=0) at ./Zend/zend_execute_API.c:672
#11 0x000000000055b65d in userfilter_filter (stream=, thisfilter=0x7fe8e16ba8c0, buckets_in=0x7ffcfdff7080, buckets_out=0x7ffcfdff7090, bytes_consumed=0x0, flags=) at ./ext/standard/user_filters.c:203
#12 0x000000000058065e in _php_stream_fill_read_buffer (stream=stream@entry=0x7fe973dad800, size=size@entry=4096) at ./main/streams/streams.c:592
#13 0x0000000000580907 in _php_stream_read (stream=0x7fe973dad800, buf=0x7fe8e1776000 "", size=4096) at ./main/streams/streams.c:721
#14 0x00000000005eb09d in zend_stream_read (file_handle=0x7ffcfdff7810, buf=0x7fe8e1776000 "", len=4096) at ./Zend/zend_stream.c:177
#15 0x00000000005eb41f in zend_stream_fixup (file_handle=file_handle@entry=0x7ffcfdff7810, buf=buf@entry=0x7ffcfdff7258, len=len@entry=0x7ffcfdff7260) at ./Zend/zend_stream.c:261
#16 0x0000000000591ed6 in open_file_for_scanning (file_handle=file_handle@entry=0x7ffcfdff7810) at Zend/zend_language_scanner.l:513
#17 0x0000000000592277 in compile_file (file_handle=0x7ffcfdff7810, type=2) at Zend/zend_language_scanner.l:627
#18 0x00007fe9659f24ba in phar_compile_file (file_handle=0x166a460, type=-386685159) at ./ext/phar/phar.c:3320
#19 0x00007fe9739a8cf4 in opcache_compile_file (file_handle=file_handle@entry=0x7ffcfdff7810, type=type@entry=2, op_array_p=op_array_p@entry=0x7ffcfdff76d8, key=) at ./ext/opcache/ZendAccelerator.c:1530
#20 0x00007fe9739aad79 in persistent_compile_file (file_handle=0x7ffcfdff7810, type=2) at ./ext/opcache/ZendAccelerator.c:1863
#21 0x00007fe97376407d in xdebug_compile_file (file_handle=, type=) at ./build-7.1/xdebug.c:2223
#22 0x000000000059247e in compile_filename (type=type@entry=2, filename=filename@entry=0x7fe973c16100) at Zend/zend_language_scanner.l:662
#23 0x0000000000631b3a in zend_include_or_eval (inc_filename=0x7fe973c16100, type=2) at ./Zend/zend_execute.c:2846
#24 0x000000000066d0a2 in ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER () at ./Zend/zend_vm_execute.h:35494
#25 0x0000000000616a9b in execute_ex (ex=) at ./Zend/zend_vm_execute.h:429
#26 0x00007fe973764cc6 in xdebug_execute_ex (execute_data=0x7fe973c160a0) at ./build-7.1/xdebug.c:1995
#27 0x00000000005bd02d in zend_call_function (fci=fci@entry=0x7ffcfdff7bf0, fci_cache=fci_cache@entry=0x7ffcfdff7bc0) at ./Zend/zend_execute_API.c:855
#28 0x00000000005ec000 in zend_call_method (object=0x7fe973c67878, obj_ce=, fn_proxy=, function_name=0x7fe8e16231f8 "go\instrument\classloading\aopcomposerloader::loadclassU\001",
function_name_len=, retval_ptr=retval_ptr@entry=0x0, param_count=1, arg1=0x7fe973c16090, arg2=0x0) at ./Zend/zend_interfaces.c:99
#29 0x00000000004c93ce in zif_spl_autoload_call (execute_data=, return_value=) at ./ext/spl/php_spl.c:420
#30 0x00007fe973765616 in xdebug_execute_internal (current_execute_data=0x7fe973c16040, return_value=0x7ffcfdff7e80) at ./build-7.1/xdebug.c:2145
#31 0x00000000005bd27a in zend_call_function (fci=fci@entry=0x7ffcfdff7ec0, fci_cache=fci_cache@entry=0x7ffcfdff7e90) at ./Zend/zend_execute_API.c:871
#32 0x00000000005bd6de in zend_lookup_class_ex (name=0x7fe8f3593000, key=key@entry=0x0, use_autoload=use_autoload@entry=1) at ./Zend/zend_execute_API.c:1028
#33 0x00000000005bd97c in zend_lookup_class (name=) at ./Zend/zend_execute_API.c:1049
#34 0x00000000005e66e5 in zif_class_exists (execute_data=0x7fe973c15fd0, return_value=0x7fe973c15fa0) at ./Zend/zend_builtin_functions.c:1497
#35 0x00007fe973765616 in xdebug_execute_internal (current_execute_data=0x7fe973c15fd0, return_value=0x7fe973c15fa0) at ./build-7.1/xdebug.c:2145
#36 0x000000000067094c in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at ./Zend/zend_vm_execute.h:1099
#37 0x0000000000616a9b in execute_ex (ex=) at ./Zend/zend_vm_execute.h:429
#38 0x00007fe973764cc6 in xdebug_execute_ex (execute_data=0x7fe973c15f10) at ./build-7.1/xdebug.c:1995
#39 0x0000000000670a23 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at ./Zend/zend_vm_execute.h:1076
#40 0x0000000000616a9b in execute_ex (ex=) at ./Zend/zend_vm_execute.h:429
#41 0x00007fe973764cc6 in xdebug_execute_ex (execute_data=0x7fe973c15e50) at ./build-7.1/xdebug.c:1995
#42 0x0000000000670a23 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at ./Zend/zend_vm_execute.h:1076
#43 0x0000000000616a9b in execute_ex (ex=) at ./Zend/zend_vm_execute.h:429
#44 0x00007fe973764cc6 in xdebug_execute_ex (execute_data=0x7fe973c15db0) at ./build-7.1/xdebug.c:1995
#45 0x0000000000670a23 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at ./Zend/zend_vm_execute.h:1076
#46 0x0000000000616a9b in execute_ex (ex=) at ./Zend/zend_vm_execute.h:429
#47 0x00007fe973764cc6 in xdebug_execute_ex (execute_data=0x7fe973c15ce0) at ./build-7.1/xdebug.c:1995
#48 0x0000000000670a23 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at ./Zend/zend_vm_execute.h:1076
#49 0x0000000000616a9b in execute_ex (ex=) at ./Zend/zend_vm_execute.h:429
#50 0x00007fe973764cc6 in xdebug_execute_ex (execute_data=0x7fe973c15c10) at ./build-7.1/xdebug.c:1995
#51 0x00000000005bd02d in zend_call_function (fci=fci@entry=0x7ffcfdff8540, fci_cache=fci_cache@entry=0x7ffcfdff8510) at ./Zend/zend_execute_API.c:855
#52 0x0000000000504712 in zif_call_user_func (execute_data=, return_value=0x7fe973c15b60) at ./ext/standard/basic_functions.c:4834
#53 0x00007fe973765616 in xdebug_execute_internal (current_execute_data=0x7fe973c15b80, return_value=0x7fe973c15b60) at ./build-7.1/xdebug.c:2145
#54 0x000000000067094c in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at ./Zend/zend_vm_execute.h:1099
#55 0x0000000000616a9b in execute_ex (ex=) at ./Zend/zend_vm_execute.h:429
#56 0x00007fe973764cc6 in xdebug_execute_ex (execute_data=0x7fe973c15aa0) at ./build-7.1/xdebug.c:1995
#57 0x0000000000670a23 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at ./Zend/zend_vm_execute.h:1076
#58 0x0000000000616a9b in execute_ex (ex=) at ./Zend/zend_vm_execute.h:429
#59 0x00007fe973764cc6 in xdebug_execute_ex (execute_data=0x7fe973c15a00) at ./build-7.1/xdebug.c:1995
#60 0x0000000000670a23 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at ./Zend/zend_vm_execute.h:1076
#61 0x0000000000616a9b in execute_ex (ex=) at ./Zend/zend_vm_execute.h:429
#62 0x00007fe973764cc6 in xdebug_execute_ex (execute_data=0x7fe973c15930) at ./build-7.1/xdebug.c:1995
#63 0x0000000000670a23 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at ./Zend/zend_vm_execute.h:1076
#64 0x0000000000616a9b in execute_ex (ex=) at ./Zend/zend_vm_execute.h:429
#65 0x00007fe973764cc6 in xdebug_execute_ex (execute_data=0x7fe973c15870) at ./build-7.1/xdebug.c:1995
#66 0x0000000000670a23 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at ./Zend/zend_vm_execute.h:1076
#67 0x0000000000616a9b in execute_ex (ex=) at ./Zend/zend_vm_execute.h:429
---Type to continue, or q to quit---
#68 0x00007fe973764cc6 in xdebug_execute_ex (execute_data=0x7fe973c157d0) at ./build-7.1/xdebug.c:1995
#69 0x0000000000670a23 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at ./Zend/zend_vm_execute.h:1076
#70 0x0000000000616a9b in execute_ex (ex=) at ./Zend/zend_vm_execute.h:429
#71 0x00007fe973764cc6 in xdebug_execute_ex (execute_data=0x7fe973c15700) at ./build-7.1/xdebug.c:1995
#72 0x0000000000670a23 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at ./Zend/zend_vm_execute.h:1076
#73 0x0000000000616a9b in execute_ex (ex=) at ./Zend/zend_vm_execute.h:429
#74 0x00007fe973764cc6 in xdebug_execute_ex (execute_data=0x7fe973c15640) at ./build-7.1/xdebug.c:1995
#75 0x0000000000670a23 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at ./Zend/zend_vm_execute.h:1076
#76 0x0000000000616a9b in execute_ex (ex=) at ./Zend/zend_vm_execute.h:429
#77 0x00007fe973764cc6 in xdebug_execute_ex (execute_data=0x7fe973c155b0) at ./build-7.1/xdebug.c:1995
#78 0x0000000000670a23 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at ./Zend/zend_vm_execute.h:1076
#79 0x0000000000616a9b in execute_ex (ex=) at ./Zend/zend_vm_execute.h:429
#80 0x00007fe973764cc6 in xdebug_execute_ex (execute_data=0x7fe973c15470) at ./build-7.1/xdebug.c:1995
#81 0x00000000005bd02d in zend_call_function (fci=fci@entry=0x7ffcfdff8eb0, fci_cache=fci_cache@entry=0x7ffcfdff8e80) at ./Zend/zend_execute_API.c:855
#82 0x0000000000504712 in zif_call_user_func (execute_data=, return_value=0x7fe973c15390) at ./ext/standard/basic_functions.c:4834
#83 0x00007fe973765616 in xdebug_execute_internal (current_execute_data=0x7fe973c15400, return_value=0x7fe973c15390) at ./build-7.1/xdebug.c:2145
#84 0x000000000067094c in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at ./Zend/zend_vm_execute.h:1099
#85 0x0000000000616a9b in execute_ex (ex=) at ./Zend/zend_vm_execute.h:429
#86 0x00007fe973764cc6 in xdebug_execute_ex (execute_data=0x7fe973c15290) at ./build-7.1/xdebug.c:1995
#87 0x0000000000670a23 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at ./Zend/zend_vm_execute.h:1076
#88 0x0000000000616a9b in execute_ex (ex=) at ./Zend/zend_vm_execute.h:429
#89 0x00007fe973764cc6 in xdebug_execute_ex (execute_data=0x7fe973c151d0) at ./build-7.1/xdebug.c:1995
#90 0x0000000000670a23 in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at ./Zend/zend_vm_execute.h:1076
#91 0x0000000000616a9b in execute_ex (ex=) at ./Zend/zend_vm_execute.h:429
#92 0x00007fe973764cc6 in xdebug_execute_ex (execute_data=0x7fe973c15120) at ./build-7.1/xdebug.c:1995
#93 0x0000000000670e8a in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at ./Zend/zend_vm_execute.h:949
#94 0x0000000000616a9b in execute_ex (ex=) at ./Zend/zend_vm_execute.h:429
#95 0x00007fe973764cc6 in xdebug_execute_ex (execute_data=0x7fe973c15030) at ./build-7.1/xdebug.c:1995
#96 0x0000000000673060 in zend_execute (op_array=op_array@entry=0x7fe973c77000, return_value=return_value@entry=0x0) at ./Zend/zend_vm_execute.h:474
#97 0x00000000005cd5a3 in zend_execute_scripts (type=type@entry=8, retval=retval@entry=0x0, file_count=file_count@entry=3) at ./Zend/zend.c:1476
#98 0x0000000000569540 in php_execute_script (primary_file=0x7ffcfdffb8d0) at ./main/main.c:2537
#99 0x0000000000446cb8 in main (argc=26370848, argv=0x192628c) at ./sapi/fpm/fpm/fpm_main.c:1966

lisachenko referenced this issue in php/php-src May 16, 2017
Yeah, no test script is provided.. I got some troubles to make a one
@lisachenko
Copy link
Member

Looks like this issue fixed in latest version: php/php-src@89dd7fb

Thank you for reporting this bug!

@smuggli
Copy link
Contributor

smuggli commented May 16, 2017

Cool, that was quick.

Only sad thing is, that we don't have a test for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants