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

Paratest crash due to InternalCallMapHandlerTest #8162

Open
AndrolGenhald opened this issue Jun 24, 2022 · 4 comments
Open

Paratest crash due to InternalCallMapHandlerTest #8162

AndrolGenhald opened this issue Jun 24, 2022 · 4 comments
Labels

Comments

@AndrolGenhald
Copy link
Collaborator

Paratest is now crashing for me on 4.x due to InternalCallMapHandlerTest, added in #8104. The error message "Command not found" is incredibly unhelpful, but the issue is due to the command line being too long.

The command is incredibly large, but it includes:

'--filter' '/testIgnoresAreSortedAndUnique(?:\s|$)|testGetcallmapReturnsAValidCallmap(?:\s|$)|testIgnoredFunctionsStillFail with data set "_\: \{"0"\:"string","message"\:"string"\}"$|testIgnoredFunctionsStillFail with data set "acos\: \{"0"\:"float","num"\:"float"\}"$|testIgnoredFunctionsStillFail with data set "acosh\: \{"0"\:"float","num"\:"float"\}"$|...'

so it looks like the command includes the entirety of the callmap...

According to paratestphp/paratest#154 --max-batch-size is supposed to work with data providers, and I'm using --max-batch-size=16, so this might be a bug in paratest.

@psalm-github-bot
Copy link

Hey @AndrolGenhald, can you reproduce the issue on https://psalm.dev ?

@weirdan
Copy link
Collaborator

weirdan commented Nov 10, 2022

@AndrolGenhald does it still happen for you? I'm running paratest locally just fine (on current master).

@AndrolGenhald
Copy link
Collaborator Author

AndrolGenhald commented Nov 10, 2022

Still fails partway through:

$ time vendor/bin/paratest -f --max-batch-size=16
ParaTest v6.6.5 upon PHPUnit 9.5.26 by Sebastian Bergmann and contributors.

....................................S......................    59 / 13480 (  0%)
...........................................................   118 / 13480 (  0%)
...........................................................   177 / 13480 (  1%)
...........................................................   236 / 13480 (  1%)
..................................S........................   295 / 13480 (  2%)
...........................................................   354 / 13480 (  2%)
...........................................................   413 / 13480 (  3%)
...........................................................   472 / 13480 (  3%)
...........................................................   531 / 13480 (  3%)
...........................................................   590 / 13480 (  4%)
...........................................................   649 / 13480 (  4%)
............................S..............................   708 / 13480 (  5%)
...........................................................   767 / 13480 (  5%)
..............SSS..........................................   826 / 13480 (  6%)
...........................................................   885 / 13480 (  6%)
.S.........................................................   944 / 13480 (  7%)
...........................................................  1003 / 13480 (  7%)
...........................................................  1062 / 13480 (  7%)
.......S...................................................  1121 / 13480 (  8%)
...........................................................  1180 / 13480 (  8%)
...........................................................  1239 / 13480 (  9%)
...........................................................  1298 / 13480 (  9%)
...........................................................  1357 / 13480 ( 10%)
...........................................................  1416 / 13480 ( 10%)
...........................................................  1475 / 13480 ( 10%)
...........................................................  1534 / 13480 ( 11%)
...........................................................  1593 / 13480 ( 11%)
...........................................................  1652 / 13480 ( 12%)
...........................................................  1711 / 13480 ( 12%)
...........................................................  1770 / 13480 ( 13%)
.....S.....................................................  1829 / 13480 ( 13%)
............................S..............................  1888 / 13480 ( 14%)
...........................................................  1947 / 13480 ( 14%)
...........................................................  2006 / 13480 ( 14%)
...........................................................  2065 / 13480 ( 15%)
...........................................................  2124 / 13480 ( 15%)
...........................................................  2183 / 13480 ( 16%)
...........................................................  2242 / 13480 ( 16%)
...........................................................  2301 / 13480 ( 17%)
........................................................S..  2360 / 13480 ( 17%)
...........................................................  2419 / 13480 ( 17%)
...........................................................  2478 / 13480 ( 18%)
........................
In WorkerCrashedException.php line 41:
                                                                                                                                                                                                                                           
  The command "PARATEST='1' TEST_TOKEN='12' UNIQUE_TEST_TOKEN='12_636d144fd0c42' '/usr/bin/php8.1' ...

With an incredibly long error message after that. Since my original diagnosis was that the command line is too long it's possible it works for you because you have a higher limit set. I have:

$ getconf ARG_MAX
2097152

Which I believe is the relevant setting. On the other hand, when I copy the error message it's only around 835,000 characters, which is less than half of that limit.

@weirdan
Copy link
Collaborator

weirdan commented Nov 10, 2022

it's possible it works for you because you have a higher limit set.

No, I have the same ARG_MAX. I used to have crashes related to memory limit, which I fixed by changing the command line to:

php-noxdebug vendor/bin/paratest --passthru-php="-dmemory_limit=-1"

(php-noxdebug util comes from https://github.com/weirdan/run-without-xdebug/).

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

No branches or pull requests

2 participants