View Issue Details

IDProjectCategoryView StatusLast Update
0000970Xdebugpublic2013-09-28 13:14
Reporterkenorb Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionnot fixable 
PlatformunixOSOSXOS Version10.8.4
Product Version2.2.1 
Summary0000970: crash at zend_parse_arg when run PHP script in CLI
Description

Executing command:
$ drush status
Segmentation fault: 11

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 php 0x000000010066d477 zend_parse_va_args + 55
1 php 0x000000010066e30a zend_parse_parameters + 554
2 php 0x00000001005481d2 zif_str_repeat + 114
3 php 0x00000001006a7874 execute_internal + 164
4 xdebug.so 0x0000000101f0cba8 xdebug_execute_internal + 424
5 php 0x00000001006a8f28 zend_do_fcall_common_helper_SPEC + 1640
6 php 0x00000001006b046e ZEND_DO_FCALL_SPEC_CONST_HANDLER + 286
7 php 0x00000001006a7d17 execute + 1175
8 xdebug.so 0x0000000101f0c767 xdebug_execute + 3559
9 php 0x00000001006a90dc zend_do_fcall_common_helper_SPEC + 2076
10 php 0x00000001006aa088 ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER + 40
11 php 0x00000001006a7d17 execute + 1175
12 xdebug.so 0x0000000101f0c767 xdebug_execute + 3559
13 php 0x00000001006a90dc zend_do_fcall_common_helper_SPEC + 2076
14 php 0x00000001006b046e ZEND_DO_FCALL_SPEC_CONST_HANDLER + 286
15 php 0x00000001006a7d17 execute + 1175

Steps To Reproduce

What I did:

  1. Download drush (5.8)
  2. Edit: /usr/local/Cellar/drush/5.8/libexec/includes/context.inc (or anywhere where drush has files)
  3. Add 'drush_print($contexts);' on 410 line before $contexts = drush_context_names();
  4. Run 'drush status' anywhere.
Additional Information

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 php 0x000000010066d477 zend_parse_va_args + 55
1 php 0x000000010066e30a zend_parse_parameters + 554
2 php 0x00000001005481d2 zif_str_repeat + 114
3 php 0x00000001006a7874 execute_internal + 164
4 xdebug.so 0x0000000101f0cba8 xdebug_execute_internal + 424
5 php 0x00000001006a8f28 zend_do_fcall_common_helper_SPEC + 1640
6 php 0x00000001006b046e ZEND_DO_FCALL_SPEC_CONST_HANDLER + 286
7 php 0x00000001006a7d17 execute + 1175
8 xdebug.so 0x0000000101f0c767 xdebug_execute + 3559
9 php 0x00000001006a90dc zend_do_fcall_common_helper_SPEC + 2076
10 php 0x00000001006aa088 ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER + 40
11 php 0x00000001006a7d17 execute + 1175
12 xdebug.so 0x0000000101f0c767 xdebug_execute + 3559
13 php 0x00000001006a90dc zend_do_fcall_common_helper_SPEC + 2076
14 php 0x00000001006b046e ZEND_DO_FCALL_SPEC_CONST_HANDLER + 286
15 php 0x00000001006a7d17 execute + 1175

TagsNo tags attached.
Attached Files
Operating SystemOSX
PHP Version5.3.20-5.3.24

Activities

derick

2013-09-28 13:14

administrator   ~0002564

Your stack trace indicates that you ran out of stack space. And this has nothing to do with Xdebug.

There is however a feature in Xdebug that prevents you from doing this - xdebug.max_nesting_level which by default is 100. I think you changed this default as I count at least a 120 stack frames. If you run php within gdb like:

gdb --args php which drush status

and then type on the prompt:

run

and when it crashes:

bt full
zbacktrace

it should tell you where this happened.

Alternatively you can increase your stack size: http://stackoverflow.com/questions/13245019/how-to-change-the-stack-size-using-ulimit-or-per-process-on-mac-os-x-for-a-c-or

Or you can set xdebug.max_nesting_level to a lower value (say 80) and see why drush is using so many stack frames.

Issue History

Date Modified Username Field Change
2013-08-12 19:56 kenorb New Issue
2013-08-12 19:56 kenorb File Added: php_2013-08-12-205429_kenorbs-MacBook-Air.crash
2013-08-12 19:57 kenorb File Added: php_2013-08-12-205414_kenorbs-MacBook-Air.crash
2013-09-28 13:14 derick Note Added: 0002564
2013-09-28 13:14 derick Status new => resolved
2013-09-28 13:14 derick Resolution open => not fixable
2013-09-28 13:14 derick Assigned To => derick
2016-07-31 12:35 derick Category Debug client (console) => debugclient (debugging tool)
2016-07-31 12:35 derick Category debugclient (debugging tool) => (No Category)