Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pcov core dump issue in php 8.1 with phpunit @runInSeparateProcess #84

Open
ostrolucky opened this issue Dec 29, 2021 · 0 comments
Open

Comments

@ostrolucky
Copy link

We have issue in DoctrineBundle with following test in PHP 8.1

https://github.com/doctrine/DoctrineBundle/blob/4fd840eb3c6469619be34d473af3dbc3a6b2a957/Tests/DependencyInjection/ConfigurationTest.php, see https://github.com/doctrine/DoctrineBundle/commits/test-failure-experiment and one of its CI failures

Above is reduced version of the file after troubleshooting it to shrink down the reproducer, original version was https://github.com/doctrine/DoctrineBundle/blob/2.5.x/Tests/DependencyInjection/ConfigurationTest.php

This issue happens most of the times, but not always. When it doesn't result in failure, I just rerun the build and then it fails.

As you can see in commit history, looks like issue doesn't happen if I remove other dependecies that we use (I've ensured that's the case by rerunning this successful build several times), so it's probably also related to number of files that's loaded?

After experimentation, what I can say is that it looks like all 3 things you can see in file:
assertFalse()
class_exists()
loading class in separate file (new Configuration()) - inlining the class via anonymous class doesn't reproduce the issue

are required to reproduce issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant