Thanks to visit codestin.com
Credit goes to github.com

Skip to content

test_never_update is flaky #18246

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
QuLogic opened this issue Aug 13, 2020 · 6 comments · Fixed by #18261
Closed

test_never_update is flaky #18246

QuLogic opened this issue Aug 13, 2020 · 6 comments · Fixed by #18261
Labels
Milestone

Comments

@QuLogic
Copy link
Member

QuLogic commented Aug 13, 2020

Bug report

So far, I've only seen this on macOS CI. test_never_update crashes and thus fails.

On #18235, I had to restart macOS on Azure 4 times to pass. In #18243 it failed on Travis and Azure, but only macOS.

cc @richardsheridan

Matplotlib version

  • Operating system: macOS, mostly
  • Matplotlib version: master-ish
  • Matplotlib backend (print(matplotlib.get_backend())): TkAgg
  • Python version: 3.7.8 / 3.8.5
@QuLogic QuLogic added this to the v3.4.0 milestone Aug 13, 2020
@QuLogic
Copy link
Member Author

QuLogic commented Aug 13, 2020

Here is the log from #18235; if you click Show Previous Attempts on the side bar, you can find logs from the crashing runs. Apparently someone else also restarted it 3 more times, too.

@richardsheridan
Copy link
Contributor

I don't have access to macOS to test so I might not be much help. Re-running the full test suite on my local machine, I did notice that the test leaves two windows hanging around after. This doesn't happen on a partial run of test_backends_interactive.py, so there might be some spooky interaction at a distance. Perhaps we could try running the test in a subprocess?

@tacaswell
Copy link
Member

Thanks for looking at this @richardsheridan !

@richardsheridan
Copy link
Contributor

Learned two things from these PRs:

  1. Subprocess isolation works to keep the test worker from crashing at least. In the stderr of those tests on macos it seems it can't find configure_subplots even though it's clearly part of the declared interface.
  2. Taking a little care to destroy tkinter when you're done is enough to fix the weird long-lived windows when I run the full test suite locally, but it doesn't fix the crashes on macos. Unless we're prepared to go full cpython test suite on it, I'd say the subprocess strategy is the way to go.

I think we'll need someone with a mac and some experience with _macosx.m to debug missing attribute problem.

@QuLogic
Copy link
Member Author

QuLogic commented Aug 15, 2020

You should not be seeing NavigationToolbar2Mac if you are running with TkAgg. The subprocess is using the default backend, so it's not testing what you think it's testing. Set 'MPLBACKEND': 'TkAgg' in env to force it to use TkAgg.

@dopplershift
Copy link
Contributor

On my mac, running 10.15.6 and Python 3.8, I can't get test_never_update to fail. I also can't get test_interactive_backend[toolbar2-macosx] ever to pass...

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