Skip to content

Fix deadlock with --parallel and lots of output #1202

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

Merged
merged 1 commit into from
Mar 22, 2019
Merged

Fix deadlock with --parallel and lots of output #1202

merged 1 commit into from
Mar 22, 2019

Conversation

asottile
Copy link
Contributor

Resolves #1183

@@ -1,13 +1,23 @@
import os
import subprocess
import sys
import tempfile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is already implemented partially within Action, we just need to make this an Action and perhaps have a flag allowing this👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is way way simpler than involving Action

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it's simpler but not using the Action is a bug, as generally, that's what we should use. That was added especially for such use cases, and somewhere we even have an issue to make this content available as a file afterwards (for CIs); so that's the right solution to solve both at the same time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that seems orthogonal and existing :P

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not really orthogonal given in sense that the buffer overload is what is breaking here things, and would we write to file that would not exist 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not that simple, no -- tox -p is implemented by running sub process which invoke python -m tox: https://github.com/tox-dev/tox/pull/1202/files#diff-7f1e93c77a2f9f1b1f2c01a8950bad0dR25

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, I did it, bur action also uses underneath subprocess via popen.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyways we can go ahead just mind you we'll need it switch at some point. Thought if not too hard we could do it now. If you find it non trivial we can hold for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my initial try ended in a different deadlock due to the log files, I'd rather not

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's come back to this later then 👍

@gaborbernat gaborbernat merged commit 7a084a1 into tox-dev:master Mar 22, 2019
@asottile asottile deleted the fix_deadlock branch March 22, 2019 18:38
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