View Issue Details

IDProjectCategoryView StatusLast Update
0001294XdebugUncategorizedpublic2016-12-05 15:20
ReporterRQuadling Assigned Toderick  
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionunable to reproduce 
PlatformIntelOSWindowsOS Version10
Product Version2.4.0 
Summary0001294: VERY long delays when execution exceptions.
Description

Running phpunit from the command for my tests with xDebug loaded.

When it gets to an exception that is expected to be caught, the exception seems to hang the code with a 25% processor utilisation (4 core setup) for a very long time for a single test.

Without xDebug loaded, the exception is caught and the code continues appropriately.

I was initially running the code via PHPStorm, but reduced all the code (as best as I can) to a single file. Does require the underlying packages, so a composer.json is supplied in the code.

Steps To Reproduce

Run er.php to provide contents of composer.json.

Ideally run this in a directory without an composer related content.

TagsNo tags attached.
Attached Files
er.php (3,594 bytes)
Operating SystemWindows 10
PHP Version5.4.45-5.4.50

Activities

RQuadling

2016-04-12 14:01

reporter   ~0003582

Cannot run code coverage from PHPStorm with this particular pattern of code.

derick

2016-12-04 15:33

administrator   ~0003904

I can't reproduce this:

derick@whisky:/tmp $ time php er.php

real 0m0.079s
user 0m0.064s
sys 0m0.012s

Can you still reproduce this with latest PHP and Xdebug?

cheers,
Derick

RQuadling

2016-12-05 15:08

reporter   ~0003945

I'm back on a Mac again. And not seeing the problem there.

$ time php -d zend_extension=xdebug.so vendor/bin/phpunit --coverage-html er er.php --debug
PHPUnit 4.8.30 by Sebastian Bergmann and contributors.
Warning: No whitelist configured for code coverage

Starting test 'cutDownCriteriaClassTester::testReset'.
.

Time: 286 ms, Memory: 12.00MB

OK (1 test, 0 assertions)

Generating code coverage report in HTML format ... done

real 0m1.029s
user 0m0.542s
sys 0m0.085s

Changed the test to cause it to throw the exception ...

$ time php -d zend_extension=xdebug.so vendor/bin/phpunit --coverage-html erCC er.php --debug
PHPUnit 4.8.30 by Sebastian Bergmann and contributors.
Warning: No whitelist configured for code coverage

Starting test 'cutDownCriteriaClassTester::testReset'.
E

Time: 238 ms, Memory: 10.00MB

There was 1 error:

1) cutDownCriteriaClassTester::testReset
Assert\LazyAssertionException: The following 1 assertions failed:
1) salesDate: Date "2007-08-09aaaa" is invalid or does not match format "Y-m-d H:i:s".

/Users/richardquadling/PHP/vendor/beberlei/assert/lib/Assert/LazyAssertionException.php:36
/Users/richardquadling/PHP/vendor/beberlei/assert/lib/Assert/LazyAssertion.php:155
/Users/richardquadling/PHP/er.php:99
/Users/richardquadling/PHP/er.php:59
/Users/richardquadling/PHP/er.php:111

FAILURES!
Tests: 1, Assertions: 0, Errors: 1.

Generating code coverage report in HTML format ... done

real 0m0.774s
user 0m0.457s
sys 0m0.059s

Which is all as expected.

Close this issue.

derick

2016-12-05 15:20

administrator   ~0003946

Thanks for checking this again Richard. I will close it then.

Issue History

Date Modified Username Field Change
2016-04-12 13:09 RQuadling New Issue
2016-04-12 13:09 RQuadling File Added: er.php
2016-04-12 14:01 RQuadling Note Added: 0003582
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)
2016-12-04 15:33 derick Note Added: 0003904
2016-12-04 15:33 derick Assigned To => derick
2016-12-04 15:33 derick Status new => feedback
2016-12-05 15:08 RQuadling Note Added: 0003945
2016-12-05 15:08 RQuadling Status feedback => assigned
2016-12-05 15:20 derick Note Added: 0003946
2016-12-05 15:20 derick Status assigned => resolved
2016-12-05 15:20 derick Resolution open => unable to reproduce
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized