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

Primer: Fix RuntimeError with a closed Event Loop with subprocesses #2193

Closed
cooperlees opened this issue May 4, 2021 · 2 comments · Fixed by #2924
Closed

Primer: Fix RuntimeError with a closed Event Loop with subprocesses #2193

cooperlees opened this issue May 4, 2021 · 2 comments · Fixed by #2924
Assignees
Labels
C: maintenance Related to project maintenance, e.g. CI, testing, policy changes, releases T: bug Something isn't working

Comments

@cooperlees
Copy link
Collaborator

cooperlees commented May 4, 2021

From time to time it seems pandas causes an EventLoop RuntimeError error.

Let's debug and see if there is something we're not cleaning up / waiting for with subprocesses to catch this and exit cleanly / handle the issue.

Seen in both 3.6 and 3.9 the most.

-- primer results 📊 --
[2021-05-04 18:14:53,570] INFO: Analyzing results (lib.py:356)

17 / 19 succeeded (89.47%) ✅
2 / 19 FAILED (10.53%) 💩
 - 1 project disabled by config
 - 0 projects skipped due to Python version
 - 0 skipped due to long checkout

Failed projects:

## pandas:
 - Returned 0
 - stdout:
Expected formatting changes but didn't get any!

Exception ignored in: <bound method BaseSubprocessTransport.__del__ of <_UnixSubprocessTransport closed pid=2174 returncode=-9 stdout=<_UnixReadPipeTransport closing fd=6 open>>>
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.6.13/x64/lib/python3.6/asyncio/base_subprocess.py", line 132, in __del__
    self.close()
  File "/opt/hostedtoolcache/Python/3.6.13/x64/lib/python3.6/asyncio/base_subprocess.py", line 106, in close
    proto.pipe.close()
  File "/opt/hostedtoolcache/Python/3.6.13/x64/lib/python3.6/asyncio/unix_events.py", line 423, in close
    self._close(None)
  File "/opt/hostedtoolcache/Python/3.6.13/x64/lib/python3.6/asyncio/unix_events.py", line 452, in _close
    self._loop.call_soon(self._call_connection_lost, exc)
  File "/opt/hostedtoolcache/Python/3.6.13/x64/lib/python3.6/asyncio/base_events.py", line 595, in call_soon
    self._check_closed()
  File "/opt/hostedtoolcache/Python/3.6.13/x64/lib/python3.6/asyncio/base_events.py", line 381, in _check_closed
Error:     raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Error: Process completed with exit code 2.

If anyone has seen this PRs welcome!

@cooperlees cooperlees added the T: bug Something isn't working label May 4, 2021
@cooperlees cooperlees self-assigned this May 4, 2021
@cooperlees
Copy link
Collaborator Author

cooperlees commented May 4, 2021

O, second look, it seems we expect formatting change but don't get any ... Wonder why not all primer fails then.

  • This might be a false positive ...

@JelleZijlstra JelleZijlstra added the C: maintenance Related to project maintenance, e.g. CI, testing, policy changes, releases label May 30, 2021
@felix-hilden
Copy link
Collaborator

Just so that this doesn't get buried after we deprecate primer, if it's still worth fixing #2821

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: maintenance Related to project maintenance, e.g. CI, testing, policy changes, releases T: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants