View Issue Details

IDProjectCategoryView StatusLast Update
0000409XdebugUncategorizedpublic2009-03-28 20:34
Reporterrfc Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSDebianOS VersionLenny
Summary0000409: Segmentation fault with code coverage
Description

When doing code coverage via phing/phpunit, xdebug crashes

The debian lenny xdebug package crashes as well as the CVS 2.1.0-dev checkout.

Additional Information

gdb output:

Branch analysis from position: 0
XDEBUG Adding 0
XDEBUG Adding 1
XDEBUG Adding 2
XDEBUG Adding 3
XDEBUG Adding 4
XDEBUG Adding 5
XDEBUG Adding 6
XDEBUG Adding 7
XDEBUG Adding 8
XDEBUG Adding 9
XDEBUG Adding 10
XDEBUG Adding 11
XDEBUG Adding 12
XDEBUG Adding 13
XDEBUG Jump found. Position 1 = 14, Position 2 = 54154061
Branch analysis from position: 14
XDEBUG Adding 14
XDEBUG Adding 15
XDEBUG Adding 16
XDEBUG Adding 17
XDEBUG Adding 18
XDEBUG Adding 19
XDEBUG Adding 20
XDEBUG Adding 21
XDEBUG Adding 22
XDEBUG Adding 23
XDEBUG Adding 24
XDEBUG Adding 25
XDEBUG Adding 26
XDEBUG Adding 27
XDEBUG Adding 28
XDEBUG Adding 29
XDEBUG Adding 30
XDEBUG Adding 31
XDEBUG Adding 32
XDEBUG Adding 33
XDEBUG Adding 34
XDEBUG Adding 35
XDEBUG Adding 36
XDEBUG Adding 37
XDEBUG Adding 38
XDEBUG Adding 39
XDEBUG Adding 40
XDEBUG Adding 41
XDEBUG Jump found. Position 1 = 54154061
Branch analysis from position: 54154061

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb77a66d0 (LWP 21469)]
0xb751dc92 in xdebug_set_in_ex (set=0xab33970, position=54154061, noisy=1) at /root/tmp/xdebug/xdebug_set.c:72
72 return (*byte & (1 << bit));
(gdb) bt
#0 0xb751dc92 in xdebug_set_in_ex (set=0xab33970, position=54154061, noisy=1) at /root/tmp/xdebug/xdebug_set.c:72
#1 0xb750b73d in xdebug_analyse_branch (opa=0xaae8c58, position=54154061, set=0xab33970) at /root/tmp/xdebug/xdebug_code_coverage.c:174
0000002 0xb750b824 in xdebug_analyse_branch (opa=0xaae8c58, position=41, set=0xab33970) at /root/tmp/xdebug/xdebug_code_coverage.c:190
0000003 0xb750b824 in xdebug_analyse_branch (opa=0xaae8c58, position=13, set=0xab33970) at /root/tmp/xdebug/xdebug_code_coverage.c:190
0000004 0xb750ba45 in prefill_from_oparray (fn=0xaad8790 "/data/www/src/php/pear/share/pear/PEAR.php", opa=0xaae8c58) at /root/tmp/xdebug/xdebug_code_coverage.c:257
0000005 0xb750bb9e in prefill_from_function_table (opa=0xaae8c58, num_args=1, args=0xbfa8de00 "0Þ¨¿\005", hash_key=0xbfa8ddd0) at /root/tmp/xdebug/xdebug_code_coverage.c:279
0000006 0x082ddf7b in zend_hash_apply_with_arguments ()
0000007 0xb750bc27 in prefill_from_class_table (class_entry=0xab32a1c, num_args=1, args=0xbfa8de70 "¨ÁR·¨ÁR·øÞ¨¿\ahP·$%u\b³'\002", hash_key=0xbfa8de40) at /root/tmp/xdebug/xdebug_code_coverage.c:306
0000008 0x082ddf7b in zend_hash_apply_with_arguments ()
0000009 0xb750bcd4 in xdebug_prefill_code_coverage (op_array=0x8752524) at /root/tmp/xdebug/xdebug_code_coverage.c:323
0000010 0xb7506807 in xdebug_execute (op_array=0x8752524) at /root/tmp/xdebug/xdebug.c:1573
0000011 0x082c59eb in zend_call_function ()
0000012 0x082c6bcc in call_user_function_ex ()
0000013 0x082d2a27 in zend_error_noreturn ()
0000014 0x082af603 in zendparse ()
0000015 0x082b31c0 in compile_file ()
0000016 0xb7509311 in xdebug_compile_file (file_handle=0xbfa8f4d0, type=8) at /root/tmp/xdebug/xdebug.c:2531
0000017 0x082fb1b4 in ?? ()
0000018 0xbfa8f4d0 in ?? ()
0000019 0x00000008 in ?? ()
0000020 0x0000002b in ?? ()
0000021 0x00000000 in ?? ()

TagsNo tags attached.
Operating SystemLinux Debian Lenny
PHP Version5.2.6

Activities

rfc

2008-09-12 16:01

reporter   ~0000876

Ops, PHP-Information:

php -v
PHP 5.2.6-3 with Suhosin-Patch 0.9.6.2 (cli) (built: Aug 21 2008 18:38:48)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with Xdebug v2.1.0-dev, Copyright (c) 2002-2008, by Derick Rethans

rfc

2008-09-17 12:07

reporter   ~0000877

Last edited: 2008-09-17 12:08

I figured out that this crash only happens when I enable both XDEBUG_CC_UNUSED and XDEBUG_CC_DEAD_CODE when calling xdebug_start_code_coverage().

Enabling only one option at a time doesn't provoke the crash.

However this is done inside PHPUnit (PHPUnit/Util/Filter.php in getFilteredCodeCoverage() )and isn't something I control (except from modifying the source).

edited on: 2008-09-17 13:08

XulChris

2008-10-09 19:12

reporter   ~0000882

Hi, I package xdebug for Fedora. Someone sent me this patch:
https://rpm.silfreed.net:8002/file/fde6c1fac8b5/php-pecl-xdebug/segfault-codecoverage-xdebug-2.0.3.patch

rfc

2008-10-16 14:56

reporter   ~0000892

Nice, the path seems to fix our crashes!

I was just about posting more backtrace information when I read the new comment, seems I haven't received any emails.

We still need to expand in our complete development/test environment, I'll report back.

derick

2009-03-28 20:34

administrator   ~0000943

I think this should be fixed in CVS now, albeit with a slightly different patch. Please re-open if the issue persists with Xdebug 2.0.5-dev.

Issue History

Date Modified Username Field Change
2008-09-12 16:01 rfc New Issue
2008-09-12 16:01 rfc Note Added: 0000876
2008-09-17 12:07 rfc Note Added: 0000877
2008-09-17 12:08 rfc Note Edited: 0000877
2008-10-09 19:12 XulChris Note Added: 0000882
2008-10-16 14:56 rfc Note Added: 0000892
2009-03-28 20:34 derick Note Added: 0000943
2009-03-28 20:34 derick Status new => closed
2009-03-28 20:34 derick Resolution open => fixed
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