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

[6.x] Avoid deadlock in test when sharing process group #32067

Merged
merged 1 commit into from
Mar 23, 2020
Merged

[6.x] Avoid deadlock in test when sharing process group #32067

merged 1 commit into from
Mar 23, 2020

Conversation

rgson
Copy link
Contributor

@rgson rgson commented Mar 22, 2020

The testSharedGet test spawns child processes and waits for them to
exit. The main process will wait for all child processes in its own
process group.

While this usually works, the processes involved in the test case are
not necessarily the only processes in their process group. Should
PHPUnit itself be executing in a child process, its parent process
will also be there, causing a deadlock.

This change will move the main test process into its own process group
before forking to avoid the aforementioned situation.

The testSharedGet test spawns child processes and waits for them to
exit. The main process will wait for all child processes in its own
process group.

While this usually works, the processes involved in the test case are
not necessarily the only processes in their process group. Should
PHPUnit itself be executing in a child process, its parent process
will also be there, causing a deadlock.

This change will move the main test process into its own process group
before forking to avoid the aforementioned situation.
@GrahamCampbell GrahamCampbell changed the title Avoid deadlock in test when sharing process group [6.x] Avoid deadlock in test when sharing process group Mar 22, 2020
@taylorotwell taylorotwell merged commit eb26443 into laravel:6.x Mar 23, 2020
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

Successfully merging this pull request may close these issues.

2 participants