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

Possible deadlock while running tests #18

Closed
lars-reimann opened this issue Nov 30, 2023 · 1 comment · Fixed by #26
Closed

Possible deadlock while running tests #18

lars-reimann opened this issue Nov 30, 2023 · 1 comment · Fixed by #26
Assignees
Labels
bug 🪲 Something isn't working released Included in a release testing 🧪 Additional automated tests

Comments

@lars-reimann
Copy link
Member

lars-reimann commented Nov 30, 2023

Describe the bug

I had to cancel this test run (Python 3.12) after 5 minutes:

image

The second attempt succeeded just fine, but still shows a deprecation warning, which is likely related to the issue:

   /opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/multiprocessing/popen_fork.py:66: DeprecationWarning: This process (pid=1909) is multi-threaded, use of fork() may lead to deadlocks in the child.
    self.pid = os.fork()

To Reproduce

  1. Run test_should_execute_pipeline_return_valid_placeholder repeatedly
  2. Eventually, the process gets stuck in wait_for_messages.

Expected behavior

Tests should always run through. As an extra safeguard, we might want to limit the runtime of some "dangerous" tests and fail them after x seconds. This can be done using pytest-timeout.

Screenshots (optional)

No response

Additional Context (optional)

This issue also occurred in this run.

@lars-reimann lars-reimann added bug 🪲 Something isn't working testing 🧪 Additional automated tests labels Nov 30, 2023
lars-reimann pushed a commit that referenced this issue Dec 5, 2023
Closes #18

### Summary of Changes

- use spawn instead of fork to not deadlock when running tests

---------

Co-authored-by: megalinter-bot <129584137+megalinter-bot@users.noreply.github.com>
lars-reimann pushed a commit that referenced this issue Dec 5, 2023
## [0.4.0](v0.3.0...v0.4.0) (2023-12-05)

### Features

* shutdown messages ([#25](#25)) ([93fcb85](93fcb85)), closes [#24](#24)

### Bug Fixes

* race condition when initializing multiprocessing manager ([#26](#26)) ([fc5934f](fc5934f)), closes [#18](#18)
@lars-reimann
Copy link
Member Author

🎉 This issue has been resolved in version 0.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lars-reimann lars-reimann added the released Included in a release label Dec 5, 2023
@WinPlay02 WinPlay02 self-assigned this Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working released Included in a release testing 🧪 Additional automated tests
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants