View Issue Details

IDProjectCategoryView StatusLast Update
0000095XdebugUsage problems (Wrong Results)public2005-12-30 16:39
Reportersu1dAssigned Toderick 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionreopened 
Product Version 
Target VersionFixed in Version 
Summary0000095: Crashes in PHP-CLI and PHP-Apache
Descriptionas I already stated on php.pecl.dev,
PHP-CLI and PHP-Apache crash out with Xdebug2 installed, although it works okay with PHP-CGI.

Apache -- the last 1.3.x version
PHP -- 5.1.x-dev last snapshot
XDebug -- 2.x last snapshot
TagsNo tags attached.
Operating SystemWindows XP SP2
PHP Version5.1.0-dev

Activities

derick

2004-11-05 00:13

administrator   ~0000208

Should be fixed in CVS by now.

su1d

2004-11-05 00:27

reporter   ~0000209

negative.
i'm still having crashes.

PHP-bin: latest snapshost (Built On: Nov 04, 2004 19:30 GMT)
PHP-src: current CVS
xdebug-src: current CVS (binary built with MSVS.NET)

starting PHP-CLI:
C:\>php -v
PHP 5.1.0-dev (cli) (built: Nov 4 2004 20:20:33)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.1.0-dev, Copyright (c) 1998-2004 Zend Technologies
    with Xdebug v2.0.0beta2-dev, Copyright (c) 2002, 2003, 2004, by Derick Rethans

/*CLI has encountered a problem and needs to close...*/

derick

2005-02-16 11:51

administrator   ~0000230

Then I really need more information, as it works fine on Linux for me (and i can't test on Windows). Perhaps you can try the latest snapshots of both PHP 5.1 and Xdebug one more time?

http://snaps.php.net/win32/php5-win32-latest.zip
http://snaps.php.net/win32/PECL_UNSTABLE/php_xdebug.dll

su1d

2005-02-16 21:40

reporter   ~0000233

PHP 5.1.0-dev (cli) (built: Jan 29 2005 08:28:31)
both php_xdebug.dll downloaded from snaps.php.net and built from CVS:

php.exe crashes after a script is finished executing.
php-win.exe crashes.
php-cgi.exe doesn't crash at all.

I suppose I have to try it with the latest snapshot, but neither of two today's snapshots were able to run on my box without crashes.

Either something's wrong with my box (although I doubt about that, since my currently installed snapshot works well), or there are some bugs in PHP5.1 snapshots and we have to wait untill they fix them.

I think we should ask someone else who got WinXP installed to test the module.

ZebZiggle

2005-03-02 02:15

reporter   ~0000235

I get the same problem under php 5.0 and apache 2.

Run TestMain.php to repo the problem.

---- TestMain.php -----
<?php

require_once 'TestClasses.php';

$silly = new SillyClass();

$silly->sayHi();

try
{
    $silly->explode();
}
catch(MyException $e)
{
    echo "Caught MyException " . $e;
}

?>

------ TestClasses.php -------
<?php

class MyException extends Exception
{
    public function
    __toString()
    {
       return __CLASS__ . " My Exception";
    }
}

class SillyClass
{
    public function
    sayHi()
    {
        echo "

Hello World

";
    }
    
    public function
    explode()
    {
        throw new MyException();
    }
}

?>

ZebZiggle

2005-03-02 02:16

reporter   ~0000236

I should note that this is under Windows (using Komoto).

Exceptions are definitely the cause.

Michiel

2005-03-10 13:00

reporter   ~0000242

Confirmed using latest PHP 5.1 and Xdebug snapshots. Can't debug here but will try to get some more information.

Michiel

2005-03-10 13:26

reporter   ~0000243

No crash using PHP 5.0.3 (as released) and Xdebug snapshot.

derick

2005-03-10 22:14

administrator   ~0000244

Should be fixed in CVS now - please reopen if problems keep occuring, but provide a sample script then.

su1d

2005-03-16 23:00

reporter   ~0000249

Still getting crashes with the latest PHP-5.1 snapshot (Built On: Mar 15, 2005 19:30 GMT) and XDebug-2.0.0beta3-dev.

I've tried that with:
- DLL from snaps.php.net
- DLL from xdebug.org
- DLL, compiled here with MS VS .NET 2005 out of CVS-HEAD source

Also tried to play with options in my php.ini file with no result.

I suppose, the crash appears in RSHUTDOWN or MSHUTDOWN functions, because everything's executed OK, and when PHP is being terminated, it segfaults with a common Windows crash-dialog.

This is applied to only php-cli and php-win interfaces.
php-cgi works OK.

Am I the only one who has the bug?
Can anyone else confirm it?
What can I do to provide you with more information?

derick

2005-03-20 16:12

administrator   ~0000251

Fixed by bugreporter himself, thanks!

su1d

2005-03-29 21:41

reporter   ~0000252

Actually, the segfault occurs in TSRM/TSRM.c:164 in the line:
resource_types_table[j].dtor(p->storage[j], &p->storage);

Paying attention to http://cvs.php.net/diff.php/TSRM/TSRM.c?r1=1.57&r2=1.58&ty=u
I have #if'ed out those 3 strings back just like they are in PHP-5.0
and the issue has been resolved immediately.

So, the final code in TSRM.c, that doesn't cause any crash is like this:
    if (p->storage[j]) {
#if MBO_0
        if (resource_types_table && !resource_types_table[j].done && resource_types_table[j].dtor) {
            resource_types_table[j].dtor(p->storage[j], &p->storage);
        }
#endif
        free(p->storage[j]);
    }

Profic

2005-12-23 18:36

reporter   ~0000313

This bug seems to be fixed in xdebug cvs.

derick

2005-12-30 16:39

administrator   ~0000320

Seems to be fixed following "Profic"'s report. Please reopen if this is not the case.

Issue History

Date Modified Username Field Change
2004-10-20 07:50 su1d New Issue
2004-11-05 00:13 derick Status new => resolved
2004-11-05 00:13 derick Resolution open => fixed
2004-11-05 00:13 derick Assigned To => derick
2004-11-05 00:13 derick Note Added: 0000208
2004-11-05 00:27 su1d Status resolved => feedback
2004-11-05 00:27 su1d Resolution fixed => reopened
2004-11-05 00:27 su1d Note Added: 0000209
2005-02-16 11:51 derick Note Added: 0000230
2005-02-16 21:40 su1d Note Added: 0000233
2005-03-02 02:15 ZebZiggle Note Added: 0000235
2005-03-02 02:16 ZebZiggle Note Added: 0000236
2005-03-10 13:00 Michiel Note Added: 0000242
2005-03-10 13:26 Michiel Note Added: 0000243
2005-03-10 22:14 derick Status feedback => closed
2005-03-10 22:14 derick Note Added: 0000244
2005-03-16 23:00 su1d Status closed => feedback
2005-03-16 23:00 su1d Note Added: 0000249
2005-03-20 16:12 derick Status feedback => closed
2005-03-20 16:12 derick Note Added: 0000251
2005-03-29 21:41 su1d Status closed => feedback
2005-03-29 21:41 su1d Note Added: 0000252
2005-12-23 18:36 Profic Note Added: 0000313
2005-12-30 16:39 derick Status feedback => closed
2005-12-30 16:39 derick Note Added: 0000320
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)