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

Test it_can_select_a_specific_fragment#single row failing with 9.22.0 (php 8.4.4) #556

Open
5 of 6 tasks
tenzap opened this issue Mar 6, 2025 · 6 comments
Open
5 of 6 tasks
Assignees

Comments

@tenzap
Copy link
Contributor

tenzap commented Mar 6, 2025

Bug Report

(Fill in the relevant information below to help triage your issue.)

Information Description
Version 9.22.0
PHP version 8.4.4
OS Platform Linux Debian trixie

Summary

While running the test suite, phpunit fails/crashes

PHPUnit 11.5.11 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.4.4
Configuration: /mnt/packages/git_repos/dpkg/php-league-csv/phpunit.xml

...............................................................  63 / 678 (  9%)
............................................................... 126 / 678 ( 18%)
..........DDDDD................................................ 189 / 678 ( 27%)
....................................DDDDDDDDDDD.............zend_mm_heap corrupted
Aborted (core dumped)

- League\Csv\ReaderTest::setUp
Test Prepared (League\Csv\ReaderTest::it_can_select_a_specific_fragment#single row)
zend_mm_heap corrupted
Aborted (core dumped)

Standalone code, or other way to reproduce the problem

vendor/bin/phpunit --exclude-group network --no-coverage --debug

However, the same command on PHP 8.2.26 succeeds
I also checked your github actions job, which succeeds, so I reported a bug to Debian php8.4 package maintainer as well.

Moreover, I found that if I invoke phpunit with XDEBUG_MODE=coverage there is no failure.

(Please complete the text below to help us fix the issue)

Expected result

Test succeeds

Actual result

See above

Checks before submitting

  • Be sure that there isn't already an issue about this. See: Issues list
  • Be sure that there isn't already a pull request about this. See: Pull requests
  • I have added every step to reproduce the bug.
  • If possible I added relevant code examples.
  • This issue is about 1 bug and nothing more.
  • The issue has a descriptive title. For example: "JSON rendering failed on Windows for filenames with space".
@tenzap tenzap changed the title Test it_can_select_a_specific_fragment#single row failing with 9.22.0 Test it_can_select_a_specific_fragment#single row failing with 9.22.0 (php 8.4.4) Mar 6, 2025
@nyamsprod nyamsprod self-assigned this Mar 6, 2025
@nyamsprod
Copy link
Member

Hi @tenzap,

The test does not seem to fail:

  • on github actions (PHPversion 8.1 -> 8.4 included)
  • on my local machine (MacOS with Laravel Herd. Code tested from PHP8.1 -> PHP8.4)

all tested with the latest PHPUnit11 version 🤔 .

Could it be related to some extension not being correctly setup like Xdebug or OpCache 🤔 ?
Did you try running the test suite with those extensions disabled ?

@tenzap
Copy link
Contributor Author

tenzap commented Mar 6, 2025

If I uninstall xdebug (v3.4.1), tests pass (no crash). (NB: I invoke phpunit without coverage).

When xdebug is installed, I found that if I invoke phpunit with XDEBUG_MODE=coverage there is no failure either.

@nyamsprod
Copy link
Member

nyamsprod commented Mar 6, 2025

So it is a problem between xdebug and phpunit and not much the package and its test suite.

@tenzap
Copy link
Contributor Author

tenzap commented Mar 7, 2025

Can you try to reproduce with composer run-script phpunit:min ?
For me this would crash, while composer run-script phpunit succeeds.

I created a bugreport at https://bugs.xdebug.org/view.php?id=2328

@nyamsprod
Copy link
Member

tried composer run-script phpunit:min on PHP8.2 -> PHP8.4 on MacOS I never get the error.

@tenzap
Copy link
Contributor Author

tenzap commented Mar 7, 2025

tried composer run-script phpunit:min on PHP8.2 -> PHP8.4 on MacOS I never get the error.

In the meantime I found that on PHP 8.4 + Xdebug 3.4.1:

test suite succeeds with
xdebug.mode = debug,coverage

test suite crashes when xdebug.mode is not set, which corresponds to
xdebug.mode = develop

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

No branches or pull requests

2 participants