Skip to content

overhaul external process calls in TexManager #7490

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

Closed
2 tasks
tacaswell opened this issue Nov 20, 2016 · 3 comments
Closed
2 tasks

overhaul external process calls in TexManager #7490

tacaswell opened this issue Nov 20, 2016 · 3 comments
Labels
Difficulty: Medium https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues
Milestone

Comments

@tacaswell
Copy link
Member

We see frequent transient failures for the TexManager in travis and http://stackoverflow.com/questions/40695296/strange-crash-after-saving-many-colormeshplots-using-matplotlib

I suspect what is going on here is that there is a race condition around the various system calls we are making. We capture the stdout from the various tex related processes, but do not caputer stderr (which I hope will have useful debugging information). We are using the (old) method of os.system. The suggested way to do this is now the subprocess module (https://www.python.org/dev/peps/pep-0324/). See https://docs.python.org/2/library/subprocess.html#replacing-os-system for comments on how to convert from os.system.

The specific tasks for this issue:

  • move from os.system to subprocess.call
  • capture stderr and include in exceptions

Tagging this as 'medium' difficulty because it is touching a rarely touched part of the code base and may require a good understanding of how subprocess calls work in python, but as new-contributor-friendly because it is a self-contained project on a relatively well tested set of functionality.

@tacaswell tacaswell added Difficulty: Medium https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues new-contributor-friendly labels Nov 20, 2016
@tacaswell tacaswell added this to the 2.1 (next point release) milestone Nov 20, 2016
tomspur added a commit to tomspur/matplotlib that referenced this issue Dec 5, 2016
This commits starts with moving from `os.system` to the `subprocess`
module and captures stderr and includes it in the exceptions.

For more information see matplotlibgh-7490.
tomspur added a commit to tomspur/matplotlib that referenced this issue Dec 11, 2016
This commits starts with moving from `os.system` to the `subprocess`
module and captures stderr and includes it in the exceptions.

For more information see matplotlibgh-7490.
tomspur added a commit to tomspur/matplotlib that referenced this issue Dec 23, 2016
This commits starts with moving from `os.system` to the `subprocess`
module and captures stderr and includes it in the exceptions.

For more information see matplotlibgh-7490.
@dianarg
Copy link

dianarg commented Feb 3, 2017

Hi, is anyone working on this? If it's alright, I can try working on it.

@QuLogic
Copy link
Member

QuLogic commented Feb 4, 2017

@tomspur has some initial work in #7572.

tomspur added a commit to tomspur/matplotlib that referenced this issue Feb 4, 2017
This commits starts with moving from `os.system` to the `subprocess`
module and captures stderr and includes it in the exceptions.

For more information see matplotlibgh-7490.
tomspur added a commit to tomspur/matplotlib that referenced this issue Feb 4, 2017
This commits starts with moving from `os.system` to the `subprocess`
module and captures stderr and includes it in the exceptions.

For more information see matplotlibgh-7490.
tomspur added a commit to tomspur/matplotlib that referenced this issue Feb 4, 2017
This commits starts with moving from `os.system` to the `subprocess`
module and captures stderr and includes it in the exceptions.

For more information see matplotlibgh-7490.
tomspur added a commit to tomspur/matplotlib that referenced this issue Feb 5, 2017
This commits starts with moving from `os.system` to the `subprocess`
module and captures stderr and includes it in the exceptions.

For more information see matplotlibgh-7490.
tomspur added a commit to tomspur/matplotlib that referenced this issue Feb 5, 2017
This commits starts with moving from `os.system` to the `subprocess`
module and captures stderr and includes it in the exceptions.

For more information see matplotlibgh-7490.
tomspur added a commit to tomspur/matplotlib that referenced this issue Mar 28, 2017
This commits starts with moving from `os.system` to the `subprocess`
module and captures stderr and includes it in the exceptions.

For more information see matplotlibgh-7490.
tomspur added a commit to tomspur/matplotlib that referenced this issue Mar 28, 2017
This commits starts with moving from `os.system` to the `subprocess`
module and captures stderr and includes it in the exceptions.

For more information see matplotlibgh-7490.
tomspur added a commit to tomspur/matplotlib that referenced this issue Apr 3, 2017
This commits starts with moving from `os.system` to the `subprocess`
module and captures stderr and includes it in the exceptions.

For more information see matplotlibgh-7490.
tomspur added a commit to tomspur/matplotlib that referenced this issue Apr 9, 2017
This commits starts with moving from `os.system` to the `subprocess`
module and captures stderr and includes it in the exceptions.

For more information see matplotlibgh-7490.
@QuLogic
Copy link
Member

QuLogic commented May 15, 2017

Fixed by #7572.

@QuLogic QuLogic closed this as completed May 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Medium https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues
Projects
None yet
Development

No branches or pull requests

3 participants