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

Segfault with incorrect query order #11827

Closed
basilfx opened this Issue May 25, 2016 · 7 comments

Comments

Projects
None yet
3 participants
@basilfx
Contributor

basilfx commented May 25, 2016

I get a segfault for the following broken query (note the extra comma):

$nodes = Node::find([
    "order" => "nodeID DESC, revisionID, DESC"
]);

The segfault does not happen if I fix it:

$nodes = Node::find([
    "order" => "nodeID DESC, revisionID DESC"
]);

Here is a backtrace:

#0  0x0000555e41bb1714 in _zval_ptr_dtor ()
#1  0x00007f29d3e4da45 in pp_destructor (ppmajor=88 'X', pppminor=0x555e433e2538) at /cphalcon/ext/phalcon/mvc/model/query/parser.c:856
#2  0x00007f29d3e4dac8 in pp_pop_parser_stack (pParser=0x555e433e24f0) at /cphalcon/ext/phalcon/mvc/model/query/parser.c:913
#3  0x00007f29d3e500c7 in phql_ (ppp=0x555e433e24f0, ppmajor=54, ppminor=0x0, status=0x555e4333c1e8) at /cphalcon/ext/phalcon/mvc/model/query/parser.c:2431
#4  0x00007f29d3e5176a in phql_internal_parse_phql (result=0x7fff1ebb8d68, phql=0x555e433e2478 "SELECT [DF\\Models\\Node\\Block].* FROM [DF\\Models\\Node\\Block] ORDER BY nodeID DESC, revisionID, DESC", phql_length=98, 
    error_msg=0x7fff1ebb8d70) at /cphalcon/ext/phalcon/mvc/model/query/parser.c:5458
#5  0x00007f29d3e504cc in phql_parse_phql (result=0x555e4328ad70, phql=0x555e42f38a28) at /cphalcon/ext/phalcon/mvc/model/query/parser.c:5125
#6  0x00007f29d3d03e79 in zim_Phalcon_Mvc_Model_Query_parse (ht=0, return_value=0x555e4322d498, return_value_ptr=0x7fff1ebb9550, this_ptr=0x555e42eec2e8, return_value_used=1)
    at /cphalcon/ext/phalcon/mvc/model/query.zep.c:3111
#7  0x0000555e41bb15ba in dtrace_execute_internal ()
#8  0x00007f29d398d820 in zephir_call_function_opt (fci=0x7fff1ebb92e0, fci_cache=0x7fff1ebb92b0, info=0x7fff1ebb9430) at /cphalcon/ext/kernel/extended/fcall.c:1321
#9  0x00007f29d3987260 in zephir_call_user_function (object_pp=0x7fff1ebb93e0, obj_ce=0x555e42c33eb0, type=zephir_fcall_method, function_name=0x0, retval_ptr_ptr=0x7fff1ebb9550, cache_entry=0x0, cache_slot=0, param_count=0, 
    params=0x7fff1ebb9710, info=0x7fff1ebb9430) at /cphalcon/ext/kernel/fcall.c:570
#10 0x00007f29d3987979 in zephir_call_class_method_aparams (return_value_ptr=0x7fff1ebb9550, ce=0x555e42c33eb0, type=zephir_fcall_method, object=0x555e42eec2e8, method_name=0x7f29d449ad39 "parse", method_len=5, cache_entry=0x0, 
    cache_slot=0, param_count=0, params=0x7fff1ebb9710) at /cphalcon/ext/kernel/fcall.c:824
#11 0x00007f29d3d1307c in zim_Phalcon_Mvc_Model_Query_execute (ht=0, return_value=0x555e42f69768, return_value_ptr=0x7fff1ebb9d78, this_ptr=0x555e42eec2e8, return_value_used=1)
    at /cphalcon/ext/phalcon/mvc/model/query.zep.c:4164
#12 0x0000555e41bb15ba in dtrace_execute_internal ()
#13 0x00007f29d398d820 in zephir_call_function_opt (fci=0x7fff1ebb9b40, fci_cache=0x7fff1ebb9b10, info=0x7fff1ebb9c90) at /cphalcon/ext/kernel/extended/fcall.c:1321
#14 0x00007f29d3987260 in zephir_call_user_function (object_pp=0x7fff1ebb9c40, obj_ce=0x555e42c33eb0, type=zephir_fcall_method, function_name=0x0, retval_ptr_ptr=0x7fff1ebb9d78, cache_entry=0x0, cache_slot=0, param_count=0, 
    params=0x7fff1ebb9eb0, info=0x7fff1ebb9c90) at /cphalcon/ext/kernel/fcall.c:570
#15 0x00007f29d3987979 in zephir_call_class_method_aparams (return_value_ptr=0x7fff1ebb9d78, ce=0x555e42c33eb0, type=zephir_fcall_method, object=0x555e42eec2e8, method_name=0x7f29d443e1b8 "execute", method_len=7, cache_entry=0x0, 
    cache_slot=0, param_count=0, params=0x7fff1ebb9eb0) at /cphalcon/ext/kernel/fcall.c:824
#16 0x00007f29d3c6497d in zim_Phalcon_Mvc_Model_find (ht=1, return_value=0x555e4322d688, return_value_ptr=0x7f29e7d8f510, this_ptr=0x0, return_value_used=1) at /cphalcon/ext/phalcon/mvc/model.zep.c:1137
#17 0x0000555e41bb15ba in dtrace_execute_internal ()
#18 0x0000555e41c71357 in ?? ()
#19 0x0000555e41bffe30 in execute_ex ()
#20 0x0000555e41bb1461 in dtrace_execute_ex ()
#21 0x0000555e41c71830 in ?? ()
#22 0x0000555e41bffe30 in execute_ex ()
#23 0x0000555e41bb1461 in dtrace_execute_ex ()
#24 0x0000555e41bb32af in zend_call_function ()
#25 0x00007f29d3987db3 in zephir_call_user_func_array_noex (return_value=0x7f29c5ef4d78, handler=0x7f29c5ef7ae0, params=0x7f29c5ef26f0) at /cphalcon/ext/kernel/fcall.c:969
#26 0x00007f29d3a160ed in zephir_call_user_func_array (return_value=0x7f29c5ef4d78, handler=0x7f29c5ef7ae0, params=0x7f29c5ef26f0) at ./kernel/fcall.h:771
#27 0x00007f29d3a207d2 in zim_Phalcon_Dispatcher_callActionMethod (ht=3, return_value=0x7f29c5ef4d78, return_value_ptr=0x7fff1ebbae60, this_ptr=0x555e42e67bd0, return_value_used=1)
    at /cphalcon/ext/phalcon/dispatcher.zep.c:1103
#28 0x0000555e41bb15ba in dtrace_execute_internal ()
#29 0x00007f29d398d820 in zephir_call_function_opt (fci=0x7fff1ebba980, fci_cache=0x7fff1ebba950, info=0x7fff1ebbaad0) at /cphalcon/ext/kernel/extended/fcall.c:1321
#30 0x00007f29d3987260 in zephir_call_user_function (object_pp=0x7fff1ebbaa80, obj_ce=0x555e42bf0090, type=zephir_fcall_method, function_name=0x0, retval_ptr_ptr=0x7fff1ebbae60, cache_entry=0x7fff1ebbaf18, cache_slot=0, param_count=3, 
    params=0x7fff1ebbba90, info=0x7fff1ebbaad0) at /cphalcon/ext/kernel/fcall.c:570
#31 0x00007f29d3987979 in zephir_call_class_method_aparams (return_value_ptr=0x7fff1ebbae60, ce=0x555e42bf0090, type=zephir_fcall_method, object=0x555e42e67bd0, method_name=0x7f29d3f7caa9 "callactionmethod", method_len=16, 
    cache_entry=0x7fff1ebbaf18, cache_slot=0, param_count=3, params=0x7fff1ebbba90) at /cphalcon/ext/kernel/fcall.c:824
#32 0x00007f29d3a1ec09 in zim_Phalcon_Dispatcher__dispatch (ht=0, return_value=0x555e42e67518, return_value_ptr=0x7fff1ebbc0b0, this_ptr=0x555e42e67bd0, return_value_used=1) at /cphalcon/ext/phalcon/dispatcher.zep.c:898
#33 0x0000555e41bb15ba in dtrace_execute_internal ()
#34 0x00007f29d398d820 in zephir_call_function_opt (fci=0x7fff1ebbbec0, fci_cache=0x7fff1ebbbe90, info=0x7fff1ebbc010) at /cphalcon/ext/kernel/extended/fcall.c:1321
#35 0x00007f29d3987260 in zephir_call_user_function (object_pp=0x7fff1ebbbfc0, obj_ce=0x555e42bf0090, type=zephir_fcall_method, function_name=0x0, retval_ptr_ptr=0x7fff1ebbc0b0, cache_entry=0x0, cache_slot=0, param_count=0, 
    params=0x7fff1ebbc120, info=0x7fff1ebbc010) at /cphalcon/ext/kernel/fcall.c:570
#36 0x00007f29d3987979 in zephir_call_class_method_aparams (return_value_ptr=0x7fff1ebbc0b0, ce=0x555e42bf0090, type=zephir_fcall_method, object=0x555e42e67bd0, method_name=0x7f29d3f785b5 "_dispatch", method_len=9, cache_entry=0x0, 
    cache_slot=0, param_count=0, params=0x7fff1ebbc120) at /cphalcon/ext/kernel/fcall.c:824
#37 0x00007f29d3a18a16 in zim_Phalcon_Dispatcher_dispatch (ht=0, return_value=0x7f29c5ef4828, return_value_ptr=0x7fff1ebbc7b0, this_ptr=0x555e42e67bd0, return_value_used=1) at /cphalcon/ext/phalcon/dispatcher.zep.c:547
#38 0x0000555e41bb15ba in dtrace_execute_internal ()
#39 0x00007f29d398d820 in zephir_call_function_opt (fci=0x7fff1ebbc530, fci_cache=0x7fff1ebbc500, info=0x7fff1ebbc680) at /cphalcon/ext/kernel/extended/fcall.c:1321
#40 0x00007f29d3987260 in zephir_call_user_function (object_pp=0x7fff1ebbc630, obj_ce=0x555e42bf0090, type=zephir_fcall_method, function_name=0x0, retval_ptr_ptr=0x7fff1ebbc7b0, cache_entry=0x0, cache_slot=0, param_count=0, 
    params=0x7fff1ebbce00, info=0x7fff1ebbc680) at /cphalcon/ext/kernel/fcall.c:570
#41 0x00007f29d3987979 in zephir_call_class_method_aparams (return_value_ptr=0x7fff1ebbc7b0, ce=0x555e42bf0090, type=zephir_fcall_method, object=0x555e42e67bd0, method_name=0x7f29d43d7d7a "dispatch", method_len=8, cache_entry=0x0, 
    cache_slot=0, param_count=0, params=0x7fff1ebbce00) at /cphalcon/ext/kernel/fcall.c:824
#42 0x00007f29d3c26b0c in zim_Phalcon_Mvc_Application_handle (ht=0, return_value=0x555e42e68170, return_value_ptr=0x7f29e7d8f210, this_ptr=0x555e42e694b0, return_value_used=1)
    at /cphalcon/ext/phalcon/mvc/application.zep.c:323
#43 0x0000555e41bb15ba in dtrace_execute_internal ()
#44 0x0000555e41c71357 in ?? ()
#45 0x0000555e41bffe30 in execute_ex ()
#46 0x0000555e41bb1461 in dtrace_execute_ex ()
#47 0x0000555e41bc4000 in zend_execute_scripts ()
#48 0x0000555e41b5f160 in php_execute_script ()
#49 0x0000555e41c79bda in ?? ()
#50 0x0000555e41c7a23b in ?? ()
#51 0x0000555e41c7a906 in ?? ()
#52 0x0000555e41c7b578 in do_cli_server ()
#53 0x0000555e41a40f26 in main ()

Using:

  • PHP 5.6
  • Phalcon version fa01f63
  • Zephir version 9b78871b2e46a5b885a315808484fb0a8a9b64d9
@sergeyklay

This comment has been minimized.

Show comment
Hide comment
@sergeyklay

sergeyklay Aug 13, 2016

Member

@basilfx Could you please try master branch?

Member

sergeyklay commented Aug 13, 2016

@basilfx Could you please try master branch?

@basilfx

This comment has been minimized.

Show comment
Hide comment
@basilfx

basilfx Aug 13, 2016

Contributor

Will test this when I am back from holidays.

Shouldn't I test 3.0.x instead of master?

Contributor

basilfx commented Aug 13, 2016

Will test this when I am back from holidays.

Shouldn't I test 3.0.x instead of master?

@sergeyklay

This comment has been minimized.

Show comment
Hide comment
@sergeyklay

sergeyklay Aug 13, 2016

Member

3.0.x

Member

sergeyklay commented Aug 13, 2016

3.0.x

@basilfx

This comment has been minimized.

Show comment
Hide comment
@basilfx

basilfx Aug 22, 2016

Contributor

Still same problem.

New stacktrace:

#0  0x0000564985ab4d24 in _zval_ptr_dtor ()
#1  0x00007f335ed45b38 in pp_destructor () from /usr/lib/php/20131226/phalcon.so
#2  0x00007f335ed460d2 in phql_ () from /usr/lib/php/20131226/phalcon.so
#3  0x00007f335ed5c6e8 in phql_parse_phql () from /usr/lib/php/20131226/phalcon.so
#4  0x00007f335ecf7180 in zim_Phalcon_Mvc_Model_Query_parse () from /usr/lib/php/20131226/phalcon.so
#5  0x0000564985ab4bca in dtrace_execute_internal ()
#6  0x00007f335ef09f32 in zephir_call_user_function () from /usr/lib/php/20131226/phalcon.so
#7  0x00007f335ef11263 in zephir_call_class_method_aparams () from /usr/lib/php/20131226/phalcon.so
#8  0x00007f335ece9757 in zim_Phalcon_Mvc_Model_Query_execute () from /usr/lib/php/20131226/phalcon.so
#9  0x0000564985ab4bca in dtrace_execute_internal ()
#10 0x00007f335ef09f32 in zephir_call_user_function () from /usr/lib/php/20131226/phalcon.so
#11 0x00007f335ef11263 in zephir_call_class_method_aparams () from /usr/lib/php/20131226/phalcon.so
#12 0x00007f335ed3a55c in zim_Phalcon_Mvc_Model_find () from /usr/lib/php/20131226/phalcon.so
#13 0x0000564985ab4bca in dtrace_execute_internal ()
#14 0x0000564985b748a7 in ?? ()
#15 0x0000564985b03380 in execute_ex ()
#16 0x0000564985ab4a71 in dtrace_execute_ex ()
#17 0x0000564985b74d80 in ?? ()
#18 0x0000564985b03380 in execute_ex ()
#19 0x0000564985ab4a71 in dtrace_execute_ex ()
#20 0x0000564985ab68bf in zend_call_function ()
#21 0x00007f335ef084be in zephir_call_user_func_array_noex () from /usr/lib/php/20131226/phalcon.so
#22 0x00007f335eea892a in zim_Phalcon_Dispatcher_callActionMethod () from /usr/lib/php/20131226/phalcon.so
#23 0x0000564985ab4bca in dtrace_execute_internal ()
#24 0x00007f335ef09f32 in zephir_call_user_function () from /usr/lib/php/20131226/phalcon.so
#25 0x00007f335ef11263 in zephir_call_class_method_aparams () from /usr/lib/php/20131226/phalcon.so
#26 0x00007f335ee481ee in zim_Phalcon_Dispatcher__dispatch () from /usr/lib/php/20131226/phalcon.so
#27 0x0000564985ab4bca in dtrace_execute_internal ()
#28 0x00007f335ef09f32 in zephir_call_user_function () from /usr/lib/php/20131226/phalcon.so
#29 0x00007f335ef11263 in zephir_call_class_method_aparams () from /usr/lib/php/20131226/phalcon.so
#30 0x00007f335ee4586d in zim_Phalcon_Dispatcher_dispatch () from /usr/lib/php/20131226/phalcon.so
#31 0x0000564985ab4bca in dtrace_execute_internal ()
#32 0x00007f335ef09f32 in zephir_call_user_function () from /usr/lib/php/20131226/phalcon.so
#33 0x00007f335ef11263 in zephir_call_class_method_aparams () from /usr/lib/php/20131226/phalcon.so
#34 0x00007f335edee22f in zim_Phalcon_Mvc_Application_handle () from /usr/lib/php/20131226/phalcon.so
#35 0x0000564985ab4bca in dtrace_execute_internal ()
#36 0x0000564985b748a7 in ?? ()
#37 0x0000564985b03380 in execute_ex ()
#38 0x0000564985ab4a71 in dtrace_execute_ex ()
#39 0x0000564985ac7660 in zend_execute_scripts ()
#40 0x0000564985a62350 in php_execute_script ()
#41 0x0000564985b7d4ea in ?? ()
#42 0x0000564985b7dd0b in ?? ()
#43 0x0000564985b7e316 in ?? ()
#44 0x0000564985b7ef88 in do_cli_server ()
#45 0x0000564985942046 in main ()

Using:

  • PHP 5.6
  • Phalcon version 053b560
  • Zephir version bac71f93670eaf781e831970d69833a98e2bfe27
Contributor

basilfx commented Aug 22, 2016

Still same problem.

New stacktrace:

#0  0x0000564985ab4d24 in _zval_ptr_dtor ()
#1  0x00007f335ed45b38 in pp_destructor () from /usr/lib/php/20131226/phalcon.so
#2  0x00007f335ed460d2 in phql_ () from /usr/lib/php/20131226/phalcon.so
#3  0x00007f335ed5c6e8 in phql_parse_phql () from /usr/lib/php/20131226/phalcon.so
#4  0x00007f335ecf7180 in zim_Phalcon_Mvc_Model_Query_parse () from /usr/lib/php/20131226/phalcon.so
#5  0x0000564985ab4bca in dtrace_execute_internal ()
#6  0x00007f335ef09f32 in zephir_call_user_function () from /usr/lib/php/20131226/phalcon.so
#7  0x00007f335ef11263 in zephir_call_class_method_aparams () from /usr/lib/php/20131226/phalcon.so
#8  0x00007f335ece9757 in zim_Phalcon_Mvc_Model_Query_execute () from /usr/lib/php/20131226/phalcon.so
#9  0x0000564985ab4bca in dtrace_execute_internal ()
#10 0x00007f335ef09f32 in zephir_call_user_function () from /usr/lib/php/20131226/phalcon.so
#11 0x00007f335ef11263 in zephir_call_class_method_aparams () from /usr/lib/php/20131226/phalcon.so
#12 0x00007f335ed3a55c in zim_Phalcon_Mvc_Model_find () from /usr/lib/php/20131226/phalcon.so
#13 0x0000564985ab4bca in dtrace_execute_internal ()
#14 0x0000564985b748a7 in ?? ()
#15 0x0000564985b03380 in execute_ex ()
#16 0x0000564985ab4a71 in dtrace_execute_ex ()
#17 0x0000564985b74d80 in ?? ()
#18 0x0000564985b03380 in execute_ex ()
#19 0x0000564985ab4a71 in dtrace_execute_ex ()
#20 0x0000564985ab68bf in zend_call_function ()
#21 0x00007f335ef084be in zephir_call_user_func_array_noex () from /usr/lib/php/20131226/phalcon.so
#22 0x00007f335eea892a in zim_Phalcon_Dispatcher_callActionMethod () from /usr/lib/php/20131226/phalcon.so
#23 0x0000564985ab4bca in dtrace_execute_internal ()
#24 0x00007f335ef09f32 in zephir_call_user_function () from /usr/lib/php/20131226/phalcon.so
#25 0x00007f335ef11263 in zephir_call_class_method_aparams () from /usr/lib/php/20131226/phalcon.so
#26 0x00007f335ee481ee in zim_Phalcon_Dispatcher__dispatch () from /usr/lib/php/20131226/phalcon.so
#27 0x0000564985ab4bca in dtrace_execute_internal ()
#28 0x00007f335ef09f32 in zephir_call_user_function () from /usr/lib/php/20131226/phalcon.so
#29 0x00007f335ef11263 in zephir_call_class_method_aparams () from /usr/lib/php/20131226/phalcon.so
#30 0x00007f335ee4586d in zim_Phalcon_Dispatcher_dispatch () from /usr/lib/php/20131226/phalcon.so
#31 0x0000564985ab4bca in dtrace_execute_internal ()
#32 0x00007f335ef09f32 in zephir_call_user_function () from /usr/lib/php/20131226/phalcon.so
#33 0x00007f335ef11263 in zephir_call_class_method_aparams () from /usr/lib/php/20131226/phalcon.so
#34 0x00007f335edee22f in zim_Phalcon_Mvc_Application_handle () from /usr/lib/php/20131226/phalcon.so
#35 0x0000564985ab4bca in dtrace_execute_internal ()
#36 0x0000564985b748a7 in ?? ()
#37 0x0000564985b03380 in execute_ex ()
#38 0x0000564985ab4a71 in dtrace_execute_ex ()
#39 0x0000564985ac7660 in zend_execute_scripts ()
#40 0x0000564985a62350 in php_execute_script ()
#41 0x0000564985b7d4ea in ?? ()
#42 0x0000564985b7dd0b in ?? ()
#43 0x0000564985b7e316 in ?? ()
#44 0x0000564985b7ef88 in do_cli_server ()
#45 0x0000564985942046 in main ()

Using:

  • PHP 5.6
  • Phalcon version 053b560
  • Zephir version bac71f93670eaf781e831970d69833a98e2bfe27
@Jurigag

This comment has been minimized.

Show comment
Hide comment
@Jurigag

Jurigag Aug 22, 2016

Member

How exactly you compiled phalcon ? Using zephir build ?

Well for me on php 5.6 this is still happening too, but works on php 7:

#0  0x00007ffff3b14c23 in zval_delref_p (pz=0x0) at /root/.phpbrew/build/5.6.19-debug/Zend/zend.h:411
#1  0x00007ffff3b14daf in i_zval_ptr_dtor (zval_ptr=0x0, 
    __zend_filename=0x7fffe4ad8758 "/root/2.1.x-orig/ext/phalcon/mvc/model/query/parser.c", __zend_lineno=856)
    at /root/.phpbrew/build/5.6.19-debug/Zend/zend_execute.h:76
#2  0x00007ffff3b1607f in _zval_ptr_dtor (zval_ptr=0x7ffff7e28178, 
    __zend_filename=0x7fffe4ad8758 "/root/2.1.x-orig/ext/phalcon/mvc/model/query/parser.c", __zend_lineno=856)
    at /root/.phpbrew/build/5.6.19-debug/Zend/zend_execute_API.c:424
#3  0x00007fffe424e826 in pp_destructor (ppmajor=88 'X', pppminor=0x7ffff7e28178)
    at /root/2.1.x-orig/ext/phalcon/mvc/model/query/parser.c:856
#4  0x00007fffe424e908 in pp_pop_parser_stack (pParser=0x7ffff7e28130)
    at /root/2.1.x-orig/ext/phalcon/mvc/model/query/parser.c:913
#5  0x00007fffe4251189 in phql_ (ppp=0x7ffff7e28130, ppmajor=54, ppminor=0x0, status=0x7ffff7f0a158)
    at /root/2.1.x-orig/ext/phalcon/mvc/model/query/parser.c:2431
#6  0x00007fffe42529ea in phql_internal_parse_phql (result=0x7fffffffab28, 
    phql=0x7ffff7e27578 "SELECT [Personnes].* FROM [Personnes] ORDER BY cedula DESC, tipo_documento_id, DESC", 
    phql_length=83, error_msg=0x7fffffffab38) at /root/2.1.x-orig/ext/phalcon/mvc/model/query/parser.c:5458
#7  0x00007fffe4251646 in phql_parse_phql (result=0x7ffff7e23d20, phql=0x7ffff7e270a0)
    at /root/2.1.x-orig/ext/phalcon/mvc/model/query/parser.c:5125
#8  0x00007fffe4119016 in zim_Phalcon_Mvc_Model_Query_parse (ht=0, return_value=0x7ffff7e27360, 
    return_value_ptr=0x7fffffffb128, this_ptr=0x7ffff7e267c8, return_value_used=1)
    at /root/2.1.x-orig/ext/phalcon/mvc/model/query.zep.c:3111
#9  0x00007fffe3df0a43 in zephir_call_function_opt (fci=0x7fffffffaed0, fci_cache=0x7fffffffaea0, 
    info=0x7fffffffb000) at /root/2.1.x-orig/ext/kernel/extended/fcall.c:1319
#10 0x00007fffe3dea61f in zephir_call_user_function (object_pp=0x7fffffffafb0, obj_ce=0x555555c42840, 
    type=zephir_fcall_method, function_name=0x0, retval_ptr_ptr=0x7fffffffb128, cache_entry=0x0, cache_slot=0, 
    param_count=0, params=0x7fffffffb1e0, info=0x7fffffffb000) at /root/2.1.x-orig/ext/kernel/fcall.c:570
#11 0x00007fffe3deaddb in zephir_call_class_method_aparams (return_value_ptr=0x7fffffffb128, ce=0x555555c42840, 
    type=zephir_fcall_method, object=0x7ffff7e267c8, method_name=0x7fffe48b7e61 "parse", method_len=5, 
    cache_entry=0x0, cache_slot=0, param_count=0, params=0x7fffffffb1e0)
    at /root/2.1.x-orig/ext/kernel/fcall.c:824
#12 0x00007fffe4126eff in zim_Phalcon_Mvc_Model_Query_execute (ht=0, return_value=0x7ffff7e273d8, 
    return_value_ptr=0x7fffffffb690, this_ptr=0x7ffff7e267c8, return_value_used=1)
    at /root/2.1.x-orig/ext/phalcon/mvc/model/query.zep.c:4164
#13 0x00007fffe3df0a43 in zephir_call_function_opt (fci=0x7fffffffb480, fci_cache=0x7fffffffb450, 
    info=0x7fffffffb5b0) at /root/2.1.x-orig/ext/kernel/extended/fcall.c:1319
---Type <return> to continue, or q <return> to quit---
#14 0x00007fffe3dea61f in zephir_call_user_function (object_pp=0x7fffffffb560, obj_ce=0x555555c42840, 
    type=zephir_fcall_method, function_name=0x0, retval_ptr_ptr=0x7fffffffb690, cache_entry=0x0, cache_slot=0, 
    param_count=0, params=0x7fffffffb750, info=0x7fffffffb5b0) at /root/2.1.x-orig/ext/kernel/fcall.c:570
#15 0x00007fffe3deaddb in zephir_call_class_method_aparams (return_value_ptr=0x7fffffffb690, ce=0x555555c42840, 
    type=zephir_fcall_method, object=0x7ffff7e267c8, method_name=0x7fffe485a2a8 "execute", method_len=7, 
    cache_entry=0x0, cache_slot=0, param_count=0, params=0x7fffffffb750)
    at /root/2.1.x-orig/ext/kernel/fcall.c:824
#16 0x00007fffe4088551 in zim_Phalcon_Mvc_Model_find (ht=1, return_value=0x7ffff7e263e8, 
    return_value_ptr=0x7ffff7ed4170, this_ptr=0x0, return_value_used=1)
    at /root/2.1.x-orig/ext/phalcon/mvc/model.zep.c:1136
#17 0x00007ffff3b726dd in zend_do_fcall_common_helper_SPEC (execute_data=0x7ffff7ed4328)
    at /root/.phpbrew/build/5.6.19-debug/Zend/zend_vm_execute.h:558
#18 0x00007ffff3b72eae in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0x7ffff7ed4328)
    at /root/.phpbrew/build/5.6.19-debug/Zend/zend_vm_execute.h:693
#19 0x00007ffff3b71d4c in execute_ex (execute_data=0x7ffff7ed4328)
    at /root/.phpbrew/build/5.6.19-debug/Zend/zend_vm_execute.h:363
#20 0x00007ffff3b71dd5 in zend_execute (op_array=0x7ffff7f07198)
    at /root/.phpbrew/build/5.6.19-debug/Zend/zend_vm_execute.h:388
#21 0x00007ffff3b2d14a in zend_execute_scripts (type=8, retval=0x0, file_count=3)
    at /root/.phpbrew/build/5.6.19-debug/Zend/zend.c:1341
#22 0x00007ffff3a931f3 in php_execute_script (primary_file=0x7fffffffdca0)
    at /root/.phpbrew/build/5.6.19-debug/main/main.c:2610
#23 0x00007ffff3be0251 in php_handler (r=0x7ffff7e650a0)
    at /root/.phpbrew/build/5.6.19-debug/sapi/apache2handler/sapi_apache2.c:667
#24 0x00005555555aabe0 in ap_run_handler ()
#25 0x00005555555ab129 in ap_invoke_handler ()
#26 0x00005555555c06ca in ap_process_async_request ()
#27 0x00005555555c09a4 in ap_process_request ()
#28 0x00005555555bd442 in ?? ()
#29 0x00005555555b4220 in ap_run_process_connection ()
#30 0x00007ffff4690767 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#31 0x00007ffff469096c in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#32 0x00007ffff46916b1 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#33 0x00005555555918ae in ap_run_mpm ()
#34 0x000055555558b046 in main ()
Member

Jurigag commented Aug 22, 2016

How exactly you compiled phalcon ? Using zephir build ?

Well for me on php 5.6 this is still happening too, but works on php 7:

#0  0x00007ffff3b14c23 in zval_delref_p (pz=0x0) at /root/.phpbrew/build/5.6.19-debug/Zend/zend.h:411
#1  0x00007ffff3b14daf in i_zval_ptr_dtor (zval_ptr=0x0, 
    __zend_filename=0x7fffe4ad8758 "/root/2.1.x-orig/ext/phalcon/mvc/model/query/parser.c", __zend_lineno=856)
    at /root/.phpbrew/build/5.6.19-debug/Zend/zend_execute.h:76
#2  0x00007ffff3b1607f in _zval_ptr_dtor (zval_ptr=0x7ffff7e28178, 
    __zend_filename=0x7fffe4ad8758 "/root/2.1.x-orig/ext/phalcon/mvc/model/query/parser.c", __zend_lineno=856)
    at /root/.phpbrew/build/5.6.19-debug/Zend/zend_execute_API.c:424
#3  0x00007fffe424e826 in pp_destructor (ppmajor=88 'X', pppminor=0x7ffff7e28178)
    at /root/2.1.x-orig/ext/phalcon/mvc/model/query/parser.c:856
#4  0x00007fffe424e908 in pp_pop_parser_stack (pParser=0x7ffff7e28130)
    at /root/2.1.x-orig/ext/phalcon/mvc/model/query/parser.c:913
#5  0x00007fffe4251189 in phql_ (ppp=0x7ffff7e28130, ppmajor=54, ppminor=0x0, status=0x7ffff7f0a158)
    at /root/2.1.x-orig/ext/phalcon/mvc/model/query/parser.c:2431
#6  0x00007fffe42529ea in phql_internal_parse_phql (result=0x7fffffffab28, 
    phql=0x7ffff7e27578 "SELECT [Personnes].* FROM [Personnes] ORDER BY cedula DESC, tipo_documento_id, DESC", 
    phql_length=83, error_msg=0x7fffffffab38) at /root/2.1.x-orig/ext/phalcon/mvc/model/query/parser.c:5458
#7  0x00007fffe4251646 in phql_parse_phql (result=0x7ffff7e23d20, phql=0x7ffff7e270a0)
    at /root/2.1.x-orig/ext/phalcon/mvc/model/query/parser.c:5125
#8  0x00007fffe4119016 in zim_Phalcon_Mvc_Model_Query_parse (ht=0, return_value=0x7ffff7e27360, 
    return_value_ptr=0x7fffffffb128, this_ptr=0x7ffff7e267c8, return_value_used=1)
    at /root/2.1.x-orig/ext/phalcon/mvc/model/query.zep.c:3111
#9  0x00007fffe3df0a43 in zephir_call_function_opt (fci=0x7fffffffaed0, fci_cache=0x7fffffffaea0, 
    info=0x7fffffffb000) at /root/2.1.x-orig/ext/kernel/extended/fcall.c:1319
#10 0x00007fffe3dea61f in zephir_call_user_function (object_pp=0x7fffffffafb0, obj_ce=0x555555c42840, 
    type=zephir_fcall_method, function_name=0x0, retval_ptr_ptr=0x7fffffffb128, cache_entry=0x0, cache_slot=0, 
    param_count=0, params=0x7fffffffb1e0, info=0x7fffffffb000) at /root/2.1.x-orig/ext/kernel/fcall.c:570
#11 0x00007fffe3deaddb in zephir_call_class_method_aparams (return_value_ptr=0x7fffffffb128, ce=0x555555c42840, 
    type=zephir_fcall_method, object=0x7ffff7e267c8, method_name=0x7fffe48b7e61 "parse", method_len=5, 
    cache_entry=0x0, cache_slot=0, param_count=0, params=0x7fffffffb1e0)
    at /root/2.1.x-orig/ext/kernel/fcall.c:824
#12 0x00007fffe4126eff in zim_Phalcon_Mvc_Model_Query_execute (ht=0, return_value=0x7ffff7e273d8, 
    return_value_ptr=0x7fffffffb690, this_ptr=0x7ffff7e267c8, return_value_used=1)
    at /root/2.1.x-orig/ext/phalcon/mvc/model/query.zep.c:4164
#13 0x00007fffe3df0a43 in zephir_call_function_opt (fci=0x7fffffffb480, fci_cache=0x7fffffffb450, 
    info=0x7fffffffb5b0) at /root/2.1.x-orig/ext/kernel/extended/fcall.c:1319
---Type <return> to continue, or q <return> to quit---
#14 0x00007fffe3dea61f in zephir_call_user_function (object_pp=0x7fffffffb560, obj_ce=0x555555c42840, 
    type=zephir_fcall_method, function_name=0x0, retval_ptr_ptr=0x7fffffffb690, cache_entry=0x0, cache_slot=0, 
    param_count=0, params=0x7fffffffb750, info=0x7fffffffb5b0) at /root/2.1.x-orig/ext/kernel/fcall.c:570
#15 0x00007fffe3deaddb in zephir_call_class_method_aparams (return_value_ptr=0x7fffffffb690, ce=0x555555c42840, 
    type=zephir_fcall_method, object=0x7ffff7e267c8, method_name=0x7fffe485a2a8 "execute", method_len=7, 
    cache_entry=0x0, cache_slot=0, param_count=0, params=0x7fffffffb750)
    at /root/2.1.x-orig/ext/kernel/fcall.c:824
#16 0x00007fffe4088551 in zim_Phalcon_Mvc_Model_find (ht=1, return_value=0x7ffff7e263e8, 
    return_value_ptr=0x7ffff7ed4170, this_ptr=0x0, return_value_used=1)
    at /root/2.1.x-orig/ext/phalcon/mvc/model.zep.c:1136
#17 0x00007ffff3b726dd in zend_do_fcall_common_helper_SPEC (execute_data=0x7ffff7ed4328)
    at /root/.phpbrew/build/5.6.19-debug/Zend/zend_vm_execute.h:558
#18 0x00007ffff3b72eae in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0x7ffff7ed4328)
    at /root/.phpbrew/build/5.6.19-debug/Zend/zend_vm_execute.h:693
#19 0x00007ffff3b71d4c in execute_ex (execute_data=0x7ffff7ed4328)
    at /root/.phpbrew/build/5.6.19-debug/Zend/zend_vm_execute.h:363
#20 0x00007ffff3b71dd5 in zend_execute (op_array=0x7ffff7f07198)
    at /root/.phpbrew/build/5.6.19-debug/Zend/zend_vm_execute.h:388
#21 0x00007ffff3b2d14a in zend_execute_scripts (type=8, retval=0x0, file_count=3)
    at /root/.phpbrew/build/5.6.19-debug/Zend/zend.c:1341
#22 0x00007ffff3a931f3 in php_execute_script (primary_file=0x7fffffffdca0)
    at /root/.phpbrew/build/5.6.19-debug/main/main.c:2610
#23 0x00007ffff3be0251 in php_handler (r=0x7ffff7e650a0)
    at /root/.phpbrew/build/5.6.19-debug/sapi/apache2handler/sapi_apache2.c:667
#24 0x00005555555aabe0 in ap_run_handler ()
#25 0x00005555555ab129 in ap_invoke_handler ()
#26 0x00005555555c06ca in ap_process_async_request ()
#27 0x00005555555c09a4 in ap_process_request ()
#28 0x00005555555bd442 in ?? ()
#29 0x00005555555b4220 in ap_run_process_connection ()
#30 0x00007ffff4690767 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#31 0x00007ffff469096c in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#32 0x00007ffff46916b1 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#33 0x00005555555918ae in ap_run_mpm ()
#34 0x000055555558b046 in main ()
@basilfx

This comment has been minimized.

Show comment
Hide comment
@basilfx

basilfx Aug 22, 2016

Contributor

I did a zephir builddev, but it turns out it compiled the zephir build-version. I had to run zephir fullclean first.

New stack trace, this time the debug version:

#0  0x000055de138a4d24 in _zval_ptr_dtor ()
#1  0x00007f6f1a97d54e in pp_destructor (ppmajor=88 'X', pppminor=0x55de1607f780) at /opt/development/cphalcon/ext/phalcon/mvc/model/query/parser.c:856
#2  0x00007f6f1a97d5d1 in pp_pop_parser_stack (pParser=0x55de1607f738) at /opt/development/cphalcon/ext/phalcon/mvc/model/query/parser.c:913
#3  0x00007f6f1a97fbd0 in phql_ (ppp=0x55de1607f738, ppmajor=54, ppminor=0x0, status=0x55de1601eaf0) at /opt/development/cphalcon/ext/phalcon/mvc/model/query/parser.c:2431
#4  0x00007f6f1a981273 in phql_internal_parse_phql (result=0x7ffe0378b798, 
    phql=0x55de16068070 "SELECT [DF\\Models\\Node\\Block].* FROM [DF\\Models\\Node\\Block] WHERE nodeType = ?0 AND deleted IS NULL AND projectID = ?1 AND (state = 'accepted' OR (state IN ('pending', 'submitted') AND proposalID IN ("..., 
    phql_length=244, error_msg=0x7ffe0378b7a0) at /opt/development/cphalcon/ext/phalcon/mvc/model/query/parser.c:5469
#5  0x00007f6f1a97ffd5 in phql_parse_phql (result=0x55de15fe0558, phql=0x55de15fd6ae8) at /opt/development/cphalcon/ext/phalcon/mvc/model/query/parser.c:5136
#6  0x00007f6f1a82c77a in zim_Phalcon_Mvc_Model_Query_parse (ht=0, return_value=0x55de1605ac38, return_value_ptr=0x7ffe0378bf80, this_ptr=0x55de16058e38, return_value_used=1)
    at /opt/development/cphalcon/ext/phalcon/mvc/model/query.zep.c:3111
#7  0x000055de138a4bca in dtrace_execute_internal ()
#8  0x00007f6f1a4c1789 in zephir_call_function_opt (fci=0x7ffe0378bd10, fci_cache=0x7ffe0378bce0, info=0x7ffe0378be60) at /opt/development/cphalcon/ext/kernel/extended/fcall.c:1321
#9  0x00007f6f1a4bb1c9 in zephir_call_user_function (object_pp=0x7ffe0378be10, obj_ce=0x55de15cd35f0, type=zephir_fcall_method, function_name=0x0, retval_ptr_ptr=0x7ffe0378bf80, cache_entry=0x0, cache_slot=0, param_count=0, 
    params=0x7ffe0378c140, info=0x7ffe0378be60) at /opt/development/cphalcon/ext/kernel/fcall.c:570
#10 0x00007f6f1a4bb8e2 in zephir_call_class_method_aparams (return_value_ptr=0x7ffe0378bf80, ce=0x55de15cd35f0, type=zephir_fcall_method, object=0x55de16058e38, method_name=0x7f6f1afe1aee "parse", method_len=5, cache_entry=0x0, 
    cache_slot=0, param_count=0, params=0x7ffe0378c140) at /opt/development/cphalcon/ext/kernel/fcall.c:824
#11 0x00007f6f1a83b97d in zim_Phalcon_Mvc_Model_Query_execute (ht=0, return_value=0x55de15fd5b08, return_value_ptr=0x7ffe0378c7a8, this_ptr=0x55de16058e38, return_value_used=1)
    at /opt/development/cphalcon/ext/phalcon/mvc/model/query.zep.c:4164
#12 0x000055de138a4bca in dtrace_execute_internal ()
#13 0x00007f6f1a4c1789 in zephir_call_function_opt (fci=0x7ffe0378c570, fci_cache=0x7ffe0378c540, info=0x7ffe0378c6c0) at /opt/development/cphalcon/ext/kernel/extended/fcall.c:1321
#14 0x00007f6f1a4bb1c9 in zephir_call_user_function (object_pp=0x7ffe0378c670, obj_ce=0x55de15cd35f0, type=zephir_fcall_method, function_name=0x0, retval_ptr_ptr=0x7ffe0378c7a8, cache_entry=0x0, cache_slot=0, param_count=0, 
    params=0x7ffe0378c8e0, info=0x7ffe0378c6c0) at /opt/development/cphalcon/ext/kernel/fcall.c:570
#15 0x00007f6f1a4bb8e2 in zephir_call_class_method_aparams (return_value_ptr=0x7ffe0378c7a8, ce=0x55de15cd35f0, type=zephir_fcall_method, object=0x55de16058e38, method_name=0x7f6f1af83b02 "execute", method_len=7, cache_entry=0x0, 
    cache_slot=0, param_count=0, params=0x7ffe0378c8e0) at /opt/development/cphalcon/ext/kernel/fcall.c:824
#16 0x00007f6f1a78c479 in zim_Phalcon_Mvc_Model_find (ht=1, return_value=0x55de15fd5f58, return_value_ptr=0x7f6f31501550, this_ptr=0x0, return_value_used=1) at /opt/development/cphalcon/ext/phalcon/mvc/model.zep.c:1132
#17 0x000055de138a4bca in dtrace_execute_internal ()
#18 0x000055de139648a7 in ?? ()
#19 0x000055de138f3380 in execute_ex ()
#20 0x000055de138a4a71 in dtrace_execute_ex ()
#21 0x000055de13964d80 in ?? ()
#22 0x000055de138f3380 in execute_ex ()
#23 0x000055de138a4a71 in dtrace_execute_ex ()
#24 0x000055de138a68bf in zend_call_function ()
#25 0x00007f6f1a4bbd1c in zephir_call_user_func_array_noex (return_value=0x55de15f276c8, handler=0x55de15f27728, params=0x55de15ea8b30) at /opt/development/cphalcon/ext/kernel/fcall.c:969
#26 0x00007f6f1a54b1c9 in zephir_call_user_func_array (return_value=0x55de15f276c8, handler=0x55de15f27728, params=0x55de15ea8b30) at ./kernel/fcall.h:771
#27 0x00007f6f1a5558ae in zim_Phalcon_Dispatcher_callActionMethod (ht=3, return_value=0x55de15f276c8, return_value_ptr=0x7ffe0378d890, this_ptr=0x55de15eb25c8, return_value_used=1)
    at /opt/development/cphalcon/ext/phalcon/dispatcher.zep.c:1103
#28 0x000055de138a4bca in dtrace_execute_internal ()
#29 0x00007f6f1a4c1789 in zephir_call_function_opt (fci=0x7ffe0378d3b0, fci_cache=0x7ffe0378d380, info=0x7ffe0378d500) at /opt/development/cphalcon/ext/kernel/extended/fcall.c:1321
#30 0x00007f6f1a4bb1c9 in zephir_call_user_function (object_pp=0x7ffe0378d4b0, obj_ce=0x55de15a043a0, type=zephir_fcall_method, function_name=0x0, retval_ptr_ptr=0x7ffe0378d890, cache_entry=0x7ffe0378d948, cache_slot=0, param_count=3, 
    params=0x7ffe0378e4c0, info=0x7ffe0378d500) at /opt/development/cphalcon/ext/kernel/fcall.c:570
#31 0x00007f6f1a4bb8e2 in zephir_call_class_method_aparams (return_value_ptr=0x7ffe0378d890, ce=0x55de15a043a0, type=zephir_fcall_method, object=0x55de15eb25c8, method_name=0x7f6f1aab68f9 "callactionmethod", method_len=16, 
    cache_entry=0x7ffe0378d948, cache_slot=0, param_count=3, params=0x7ffe0378e4c0) at /opt/development/cphalcon/ext/kernel/fcall.c:824
#32 0x00007f6f1a553ce5 in zim_Phalcon_Dispatcher__dispatch (ht=0, return_value=0x55de15f40578, return_value_ptr=0x7ffe0378eae0, this_ptr=0x55de15eb25c8, return_value_used=1) at /opt/development/cphalcon/ext/phalcon/dispatcher.zep.c:898
#33 0x000055de138a4bca in dtrace_execute_internal ()
#34 0x00007f6f1a4c1789 in zephir_call_function_opt (fci=0x7ffe0378e8f0, fci_cache=0x7ffe0378e8c0, info=0x7ffe0378ea40) at /opt/development/cphalcon/ext/kernel/extended/fcall.c:1321
#35 0x00007f6f1a4bb1c9 in zephir_call_user_function (object_pp=0x7ffe0378e9f0, obj_ce=0x55de15a043a0, type=zephir_fcall_method, function_name=0x0, retval_ptr_ptr=0x7ffe0378eae0, cache_entry=0x0, cache_slot=0, param_count=0, 
    params=0x7ffe0378eb50, info=0x7ffe0378ea40) at /opt/development/cphalcon/ext/kernel/fcall.c:570
#36 0x00007f6f1a4bb8e2 in zephir_call_class_method_aparams (return_value_ptr=0x7ffe0378eae0, ce=0x55de15a043a0, type=zephir_fcall_method, object=0x55de15eb25c8, method_name=0x7f6f1aab22c5 "_dispatch", method_len=9, cache_entry=0x0, 
    cache_slot=0, param_count=0, params=0x7ffe0378eb50) at /opt/development/cphalcon/ext/kernel/fcall.c:824
#37 0x00007f6f1a54daf2 in zim_Phalcon_Dispatcher_dispatch (ht=0, return_value=0x55de15f405a8, return_value_ptr=0x7ffe0378f1e0, this_ptr=0x55de15eb25c8, return_value_used=1) at /opt/development/cphalcon/ext/phalcon/dispatcher.zep.c:547
#38 0x000055de138a4bca in dtrace_execute_internal ()
#39 0x00007f6f1a4c1789 in zephir_call_function_opt (fci=0x7ffe0378ef60, fci_cache=0x7ffe0378ef30, info=0x7ffe0378f0b0) at /opt/development/cphalcon/ext/kernel/extended/fcall.c:1321
#40 0x00007f6f1a4bb1c9 in zephir_call_user_function (object_pp=0x7ffe0378f060, obj_ce=0x55de15a043a0, type=zephir_fcall_method, function_name=0x0, retval_ptr_ptr=0x7ffe0378f1e0, cache_entry=0x0, cache_slot=0, param_count=0, 
    params=0x7ffe0378f830, info=0x7ffe0378f0b0) at /opt/development/cphalcon/ext/kernel/fcall.c:570
#41 0x00007f6f1a4bb8e2 in zephir_call_class_method_aparams (return_value_ptr=0x7ffe0378f1e0, ce=0x55de15a043a0, type=zephir_fcall_method, object=0x55de15eb25c8, method_name=0x7f6f1af1bd8a "dispatch", method_len=8, cache_entry=0x0, 
    cache_slot=0, param_count=0, params=0x7ffe0378f830) at /opt/development/cphalcon/ext/kernel/fcall.c:824
#42 0x00007f6f1a74e1ec in zim_Phalcon_Mvc_Application_handle (ht=0, return_value=0x55de15ebbef0, return_value_ptr=0x7f6f31501210, this_ptr=0x55de15eb5f58, return_value_used=1)
    at /opt/development/cphalcon/ext/phalcon/mvc/application.zep.c:323
#43 0x000055de138a4bca in dtrace_execute_internal ()
#44 0x000055de139648a7 in ?? ()
#45 0x000055de138f3380 in execute_ex ()
#46 0x000055de138a4a71 in dtrace_execute_ex ()
#47 0x000055de138b7660 in zend_execute_scripts ()
---Type <return> to continue, or q <return> to quit---
#48 0x000055de13852350 in php_execute_script ()
#49 0x000055de1396d4ea in ?? ()
#50 0x000055de1396dd0b in ?? ()
#51 0x000055de1396e316 in ?? ()
#52 0x000055de1396ef88 in do_cli_server ()
#53 0x000055de13732046 in main ()

I cannot test PHP7.0 yet, because it fails for my application.

Contributor

basilfx commented Aug 22, 2016

I did a zephir builddev, but it turns out it compiled the zephir build-version. I had to run zephir fullclean first.

New stack trace, this time the debug version:

#0  0x000055de138a4d24 in _zval_ptr_dtor ()
#1  0x00007f6f1a97d54e in pp_destructor (ppmajor=88 'X', pppminor=0x55de1607f780) at /opt/development/cphalcon/ext/phalcon/mvc/model/query/parser.c:856
#2  0x00007f6f1a97d5d1 in pp_pop_parser_stack (pParser=0x55de1607f738) at /opt/development/cphalcon/ext/phalcon/mvc/model/query/parser.c:913
#3  0x00007f6f1a97fbd0 in phql_ (ppp=0x55de1607f738, ppmajor=54, ppminor=0x0, status=0x55de1601eaf0) at /opt/development/cphalcon/ext/phalcon/mvc/model/query/parser.c:2431
#4  0x00007f6f1a981273 in phql_internal_parse_phql (result=0x7ffe0378b798, 
    phql=0x55de16068070 "SELECT [DF\\Models\\Node\\Block].* FROM [DF\\Models\\Node\\Block] WHERE nodeType = ?0 AND deleted IS NULL AND projectID = ?1 AND (state = 'accepted' OR (state IN ('pending', 'submitted') AND proposalID IN ("..., 
    phql_length=244, error_msg=0x7ffe0378b7a0) at /opt/development/cphalcon/ext/phalcon/mvc/model/query/parser.c:5469
#5  0x00007f6f1a97ffd5 in phql_parse_phql (result=0x55de15fe0558, phql=0x55de15fd6ae8) at /opt/development/cphalcon/ext/phalcon/mvc/model/query/parser.c:5136
#6  0x00007f6f1a82c77a in zim_Phalcon_Mvc_Model_Query_parse (ht=0, return_value=0x55de1605ac38, return_value_ptr=0x7ffe0378bf80, this_ptr=0x55de16058e38, return_value_used=1)
    at /opt/development/cphalcon/ext/phalcon/mvc/model/query.zep.c:3111
#7  0x000055de138a4bca in dtrace_execute_internal ()
#8  0x00007f6f1a4c1789 in zephir_call_function_opt (fci=0x7ffe0378bd10, fci_cache=0x7ffe0378bce0, info=0x7ffe0378be60) at /opt/development/cphalcon/ext/kernel/extended/fcall.c:1321
#9  0x00007f6f1a4bb1c9 in zephir_call_user_function (object_pp=0x7ffe0378be10, obj_ce=0x55de15cd35f0, type=zephir_fcall_method, function_name=0x0, retval_ptr_ptr=0x7ffe0378bf80, cache_entry=0x0, cache_slot=0, param_count=0, 
    params=0x7ffe0378c140, info=0x7ffe0378be60) at /opt/development/cphalcon/ext/kernel/fcall.c:570
#10 0x00007f6f1a4bb8e2 in zephir_call_class_method_aparams (return_value_ptr=0x7ffe0378bf80, ce=0x55de15cd35f0, type=zephir_fcall_method, object=0x55de16058e38, method_name=0x7f6f1afe1aee "parse", method_len=5, cache_entry=0x0, 
    cache_slot=0, param_count=0, params=0x7ffe0378c140) at /opt/development/cphalcon/ext/kernel/fcall.c:824
#11 0x00007f6f1a83b97d in zim_Phalcon_Mvc_Model_Query_execute (ht=0, return_value=0x55de15fd5b08, return_value_ptr=0x7ffe0378c7a8, this_ptr=0x55de16058e38, return_value_used=1)
    at /opt/development/cphalcon/ext/phalcon/mvc/model/query.zep.c:4164
#12 0x000055de138a4bca in dtrace_execute_internal ()
#13 0x00007f6f1a4c1789 in zephir_call_function_opt (fci=0x7ffe0378c570, fci_cache=0x7ffe0378c540, info=0x7ffe0378c6c0) at /opt/development/cphalcon/ext/kernel/extended/fcall.c:1321
#14 0x00007f6f1a4bb1c9 in zephir_call_user_function (object_pp=0x7ffe0378c670, obj_ce=0x55de15cd35f0, type=zephir_fcall_method, function_name=0x0, retval_ptr_ptr=0x7ffe0378c7a8, cache_entry=0x0, cache_slot=0, param_count=0, 
    params=0x7ffe0378c8e0, info=0x7ffe0378c6c0) at /opt/development/cphalcon/ext/kernel/fcall.c:570
#15 0x00007f6f1a4bb8e2 in zephir_call_class_method_aparams (return_value_ptr=0x7ffe0378c7a8, ce=0x55de15cd35f0, type=zephir_fcall_method, object=0x55de16058e38, method_name=0x7f6f1af83b02 "execute", method_len=7, cache_entry=0x0, 
    cache_slot=0, param_count=0, params=0x7ffe0378c8e0) at /opt/development/cphalcon/ext/kernel/fcall.c:824
#16 0x00007f6f1a78c479 in zim_Phalcon_Mvc_Model_find (ht=1, return_value=0x55de15fd5f58, return_value_ptr=0x7f6f31501550, this_ptr=0x0, return_value_used=1) at /opt/development/cphalcon/ext/phalcon/mvc/model.zep.c:1132
#17 0x000055de138a4bca in dtrace_execute_internal ()
#18 0x000055de139648a7 in ?? ()
#19 0x000055de138f3380 in execute_ex ()
#20 0x000055de138a4a71 in dtrace_execute_ex ()
#21 0x000055de13964d80 in ?? ()
#22 0x000055de138f3380 in execute_ex ()
#23 0x000055de138a4a71 in dtrace_execute_ex ()
#24 0x000055de138a68bf in zend_call_function ()
#25 0x00007f6f1a4bbd1c in zephir_call_user_func_array_noex (return_value=0x55de15f276c8, handler=0x55de15f27728, params=0x55de15ea8b30) at /opt/development/cphalcon/ext/kernel/fcall.c:969
#26 0x00007f6f1a54b1c9 in zephir_call_user_func_array (return_value=0x55de15f276c8, handler=0x55de15f27728, params=0x55de15ea8b30) at ./kernel/fcall.h:771
#27 0x00007f6f1a5558ae in zim_Phalcon_Dispatcher_callActionMethod (ht=3, return_value=0x55de15f276c8, return_value_ptr=0x7ffe0378d890, this_ptr=0x55de15eb25c8, return_value_used=1)
    at /opt/development/cphalcon/ext/phalcon/dispatcher.zep.c:1103
#28 0x000055de138a4bca in dtrace_execute_internal ()
#29 0x00007f6f1a4c1789 in zephir_call_function_opt (fci=0x7ffe0378d3b0, fci_cache=0x7ffe0378d380, info=0x7ffe0378d500) at /opt/development/cphalcon/ext/kernel/extended/fcall.c:1321
#30 0x00007f6f1a4bb1c9 in zephir_call_user_function (object_pp=0x7ffe0378d4b0, obj_ce=0x55de15a043a0, type=zephir_fcall_method, function_name=0x0, retval_ptr_ptr=0x7ffe0378d890, cache_entry=0x7ffe0378d948, cache_slot=0, param_count=3, 
    params=0x7ffe0378e4c0, info=0x7ffe0378d500) at /opt/development/cphalcon/ext/kernel/fcall.c:570
#31 0x00007f6f1a4bb8e2 in zephir_call_class_method_aparams (return_value_ptr=0x7ffe0378d890, ce=0x55de15a043a0, type=zephir_fcall_method, object=0x55de15eb25c8, method_name=0x7f6f1aab68f9 "callactionmethod", method_len=16, 
    cache_entry=0x7ffe0378d948, cache_slot=0, param_count=3, params=0x7ffe0378e4c0) at /opt/development/cphalcon/ext/kernel/fcall.c:824
#32 0x00007f6f1a553ce5 in zim_Phalcon_Dispatcher__dispatch (ht=0, return_value=0x55de15f40578, return_value_ptr=0x7ffe0378eae0, this_ptr=0x55de15eb25c8, return_value_used=1) at /opt/development/cphalcon/ext/phalcon/dispatcher.zep.c:898
#33 0x000055de138a4bca in dtrace_execute_internal ()
#34 0x00007f6f1a4c1789 in zephir_call_function_opt (fci=0x7ffe0378e8f0, fci_cache=0x7ffe0378e8c0, info=0x7ffe0378ea40) at /opt/development/cphalcon/ext/kernel/extended/fcall.c:1321
#35 0x00007f6f1a4bb1c9 in zephir_call_user_function (object_pp=0x7ffe0378e9f0, obj_ce=0x55de15a043a0, type=zephir_fcall_method, function_name=0x0, retval_ptr_ptr=0x7ffe0378eae0, cache_entry=0x0, cache_slot=0, param_count=0, 
    params=0x7ffe0378eb50, info=0x7ffe0378ea40) at /opt/development/cphalcon/ext/kernel/fcall.c:570
#36 0x00007f6f1a4bb8e2 in zephir_call_class_method_aparams (return_value_ptr=0x7ffe0378eae0, ce=0x55de15a043a0, type=zephir_fcall_method, object=0x55de15eb25c8, method_name=0x7f6f1aab22c5 "_dispatch", method_len=9, cache_entry=0x0, 
    cache_slot=0, param_count=0, params=0x7ffe0378eb50) at /opt/development/cphalcon/ext/kernel/fcall.c:824
#37 0x00007f6f1a54daf2 in zim_Phalcon_Dispatcher_dispatch (ht=0, return_value=0x55de15f405a8, return_value_ptr=0x7ffe0378f1e0, this_ptr=0x55de15eb25c8, return_value_used=1) at /opt/development/cphalcon/ext/phalcon/dispatcher.zep.c:547
#38 0x000055de138a4bca in dtrace_execute_internal ()
#39 0x00007f6f1a4c1789 in zephir_call_function_opt (fci=0x7ffe0378ef60, fci_cache=0x7ffe0378ef30, info=0x7ffe0378f0b0) at /opt/development/cphalcon/ext/kernel/extended/fcall.c:1321
#40 0x00007f6f1a4bb1c9 in zephir_call_user_function (object_pp=0x7ffe0378f060, obj_ce=0x55de15a043a0, type=zephir_fcall_method, function_name=0x0, retval_ptr_ptr=0x7ffe0378f1e0, cache_entry=0x0, cache_slot=0, param_count=0, 
    params=0x7ffe0378f830, info=0x7ffe0378f0b0) at /opt/development/cphalcon/ext/kernel/fcall.c:570
#41 0x00007f6f1a4bb8e2 in zephir_call_class_method_aparams (return_value_ptr=0x7ffe0378f1e0, ce=0x55de15a043a0, type=zephir_fcall_method, object=0x55de15eb25c8, method_name=0x7f6f1af1bd8a "dispatch", method_len=8, cache_entry=0x0, 
    cache_slot=0, param_count=0, params=0x7ffe0378f830) at /opt/development/cphalcon/ext/kernel/fcall.c:824
#42 0x00007f6f1a74e1ec in zim_Phalcon_Mvc_Application_handle (ht=0, return_value=0x55de15ebbef0, return_value_ptr=0x7f6f31501210, this_ptr=0x55de15eb5f58, return_value_used=1)
    at /opt/development/cphalcon/ext/phalcon/mvc/application.zep.c:323
#43 0x000055de138a4bca in dtrace_execute_internal ()
#44 0x000055de139648a7 in ?? ()
#45 0x000055de138f3380 in execute_ex ()
#46 0x000055de138a4a71 in dtrace_execute_ex ()
#47 0x000055de138b7660 in zend_execute_scripts ()
---Type <return> to continue, or q <return> to quit---
#48 0x000055de13852350 in php_execute_script ()
#49 0x000055de1396d4ea in ?? ()
#50 0x000055de1396dd0b in ?? ()
#51 0x000055de1396e316 in ?? ()
#52 0x000055de1396ef88 in do_cli_server ()
#53 0x000055de13732046 in main ()

I cannot test PHP7.0 yet, because it fails for my application.

@sergeyklay sergeyklay self-assigned this Nov 3, 2017

@sergeyklay sergeyklay added this to the 3.3.x milestone Nov 3, 2017

@sergeysviridenko sergeysviridenko referenced this issue Nov 3, 2017

Merged

Fix order in PHQL builder #13144

3 of 3 tasks complete
@sergeyklay

This comment has been minimized.

Show comment
Hide comment
@sergeyklay

sergeyklay Nov 3, 2017

Member

I apologize @basilfx for completely overlooking this. This issue is fixed in the 3.3.x branch. Thank you for the report. I know some people think this kinds of changes are trivial, but actually the solution is not always obvious. So thanks again for catching this bug, and again I am sorry about the delay. Thank you for the report, and for helping us make Phalcon better. Feel free to open a new issue if the problem appears again.

Member

sergeyklay commented Nov 3, 2017

I apologize @basilfx for completely overlooking this. This issue is fixed in the 3.3.x branch. Thank you for the report. I know some people think this kinds of changes are trivial, but actually the solution is not always obvious. So thanks again for catching this bug, and again I am sorry about the delay. Thank you for the report, and for helping us make Phalcon better. Feel free to open a new issue if the problem appears again.

@sergeyklay sergeyklay closed this Nov 3, 2017

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