View Issue Details

IDProjectCategoryView StatusLast Update
0002322XdebugStep Debuggingpublic2025-05-14 09:36
Reportermartti Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version3.4.1 
Target Version3.4devFixed in Version3.4.3 
Summary0002322: Xdebug tries to open debugging connection in destructors during shutdown
Description

Xdebug tries to open debugging connection continuously to client while php is shutting down

This seems to be happening if there is lots of objects with __destruct -method defined.

Steps To Reproduce

Run destruct.php while client is not listening for connections

TagsNo tags attached.
Operating System
PHP Version8.3.10-8.3.19

Activities

derick

2025-04-04 10:59

administrator   ~0007226

During analysis, I found that this only happens when the destructors are called when the object goes out of the global scope only.

For example, this version does not show the same behaviour:

<?php
class Testing
{
    function __destruct() {
        echo "Destruct";
    }
}

function a() {
    $t = array();
    for ($i=0; $i<5; $i++) {
        $t[] = new Testing();
    }
}

a();

derick

2025-04-04 11:12

administrator   ~0007227

https://github.com/xdebug/xdebug/pull/1004