View Issue Details

IDProjectCategoryView StatusLast Update
0000154XdebugUncategorizedpublic2006-01-18 22:31
ReporterSiburNY Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionopen 
Summary0000154: Apache Segfault when xdebug.collect_params is ON
Description

When xdebug.collect_params is OFF, everything works like a charm. Once I turn it on, all php scripts (except one that execute phpinfo() only) stop working. In Apache error log I see errors "[notice] child pid XXXXX exit signal Segmentation fault (11)".

P.S. I'm using PHP 5.0.6-dev (latest CVS) and XDebug from CVS downloaded today (Oct 14 around 12:30PM -0500)

Additional Information

I used GDB to get more info. This full output with stacktrace:


Starting program: /usr/local/apache2/bin/httpd -X
[Thread debugging using libthread_db enabled]
[New Thread -1208039760 (LWP 23500)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208039760 (LWP 23500)]
0x002f2f7a in add_stack_frame (zdata=0xbfe65054, op_array=0x9935894, type=Variable "type" is not available.
)
at /package/xdebug-2.0.0beta2/xdebug.c:965
965 tmp->var[tmp->varc].addr = *param;
(gdb) bt
#0 0x002f2f7a in add_stack_frame (zdata=0xbfe65054, op_array=0x9935894, type=Variable "type" is not available.
)
at /package/xdebug-2.0.0beta2/xdebug.c:965
#1 0x002f32ce in xdebug_execute_internal (current_execute_data=0xbfe65054, return_value_used=0)
at /package/xdebug-2.0.0beta2/xdebug.c:1273
0000002 0x00d66bad in zend_do_fcall_common_helper (execute_data=0xbfe65054, opline=0xb5dec9b0,
op_array=0x9935894) at /package/php5-STABLE-200510121840/Zend/zend_execute.c:2763
0000003 0x00d73e2e in zend_do_fcall_handler (execute_data=0xbfe65054, opline=0xb5dec9b0,
op_array=0x9935894) at /package/php5-STABLE-200510121840/Zend/zend_execute.c:2895
0000004 0x00d648f2 in execute (op_array=0x9935894)
at /package/php5-STABLE-200510121840/Zend/zend_execute.c:1438
0000005 0x002f3624 in xdebug_execute (op_array=0x9935894)
at /package/xdebug-2.0.0beta2/xdebug.c:1231
0000006 0x00d489d1 in zend_execute_scripts (type=8, retval=Variable "retval" is not available.
)
at /package/php5-STABLE-200510121840/Zend/zend.c:1064
0000007 0x00d16fe2 in php_execute_script (primary_file=0xbfe673dc)
at /package/php5-STABLE-200510121840/main/main.c:1643
0000008 0x00d79da6 in php_handler (r=0x98e5b58)
at /package/php5-STABLE-200510121840/sapi/apache2handler/sapi_apache2.c:549
0000009 0x0807e0be in ap_run_handler (r=0x98e5b58) at config.c:152
0000010 0x0807e436 in ap_invoke_handler (r=0x98e5b58) at config.c:364
0000011 0x0806d5d9 in ap_process_request (r=0x98e5b58) at http_request.c:249
0000012 0x08069019 in ap_process_http_connection (c=0x98e1960) at http_core.c:251
0000013 0x0808798e in ap_run_process_connection (c=0x98e1960) at connection.c:43
0000014 0x0807c85e in child_main (child_num_arg=Variable "child_num_arg" is not available.
) at prefork.c:610
0000015 0x0807ca11 in make_child (s=0x9788800, slot=0) at prefork.c:650
0000016 0x0807cada in startup_children (number_to_start=1) at prefork.c:722
0000017 0x0807d29c in ap_mpm_run (_pconf=0x97840a8, plog=0x97bc188, s=0x9788800) at prefork.c:941
0000018 0x0808256f in main (argc=2, argv=0xbfe677e4) at main.c:618

If you need more info, I'd be more than happy to provide it :).

TagsNo tags attached.
Operating System
PHP Version5.0.5

Relationships

has duplicate 0000165 resolvedderick xdebug.collect_params only produces "???" in php 5.1.x 

Activities

derick

2005-10-19 09:21

administrator   ~0000299

Hello,

I just committed a "fix" to CVS, can you please verify that this stops the crash itself? (The parameters will be shown as "???" though, I do need to look into this a bit better).

Derick

SiburNY

2005-10-19 20:04

reporter   ~0000301

Yes, I tested it and it's not segfaulting and all parameters are "???" :)

derick

2005-12-30 14:39

administrator   ~0000316

I think I figured out what is causing this - it might be GCC's over optimizating something. Which GCC version do you use (gcc --version) and does it work if you remove the "-O2" from the Makefile before compiling?

SiburNY

2005-12-30 21:45

reporter   ~0000326

I will recompile it today. Thank you.

derick

2006-01-17 21:15

administrator   ~0000332

Does it work now?

judas_iscariote

2006-01-17 23:29

reporter   ~0000347

I can confirm this problem it a gcc over-optimization issue.
removing "-O2" and debug.collect_params works perfectly

gcc --version
gcc (GCC) 4.0.2 20050901 (prerelease) (SUSE Linux)

(vendor provided GCC)

SiburNY

2006-01-18 20:34

reporter   ~0000350

Everything works like a charm now :) Thanks!


gcc --version

gcc (GCC) 4.0.2 20051007 (Red Hat 4.0.2-3)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

derick

2006-01-18 22:31

administrator   ~0000351

In CVS I now remove the -O2 for this extension, so all should be well even without hacking the Makefile yourself. Thanks for testing it!

Issue History

Date Modified Username Field Change
2005-10-14 17:58 SiburNY New Issue
2005-10-19 09:21 derick Xdebug Version 2.0-dev => 2.0.0beta5-dev
2005-10-19 09:21 derick Note Added: 0000299
2005-10-19 20:04 SiburNY Note Added: 0000301
2005-12-30 14:39 derick Note Added: 0000316
2005-12-30 14:39 derick Status new => feedback
2005-12-30 21:45 SiburNY Note Added: 0000326
2006-01-17 21:15 derick PHP Version 5.0.4 => 5.0.5
2006-01-17 21:15 derick Xdebug Version 2.0.0beta5-dev => 2.0.0beta2
2006-01-17 21:15 derick Note Added: 0000332
2006-01-17 23:22 derick Relationship added has duplicate 0000165
2006-01-17 23:29 judas_iscariote Note Added: 0000347
2006-01-18 20:34 SiburNY Note Added: 0000350
2006-01-18 22:31 derick Status feedback => closed
2006-01-18 22:31 derick Note Added: 0000351
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized