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

bpo-30414: multiprocessing.Queue._feed do not break from main loop on exc #1683

Merged
merged 3 commits into from May 25, 2017

Conversation

grzgrzgrz3
Copy link
Contributor

@grzgrzgrz3 grzgrzgrz3 commented May 20, 2017

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored.

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored.
@@ -752,6 +752,16 @@ def test_timeout(self):
# Windows (usually 15.6 ms)
self.assertGreaterEqual(delta, 0.170)

def test_queue_feder_donot_stop_onexc(self):
Copy link
Member

@pitrou pitrou May 25, 2017

Choose a reason for hiding this comment

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

There's a typo here ("feder"). Also can you add a comment pointing out to the issue number?

def __reduce__(self):
raise AttributeError
with test.support.captured_stderr():
q = multiprocessing.Queue()
Copy link
Member

@pitrou pitrou May 25, 2017

Choose a reason for hiding this comment

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

Why not self.Queue() as in most other tests?

Copy link
Contributor Author

@grzgrzgrz3 grzgrzgrz3 May 25, 2017

Choose a reason for hiding this comment

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

This test is only for multiprocessing.Queue, manager and threading queues implementations do not start feeder.
I will use self.Queue and skip test for manager and threading.

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored.
@pitrou pitrou changed the title bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc bpo-30414: multiprocessing.Queue._feed do not break from main loop on exc May 25, 2017
@pitrou pitrou merged commit bc50f03 into python:master May 25, 2017
pitrou pushed a commit to pitrou/cpython that referenced this pull request May 25, 2017
…oop on exc (pythonGH-1683)

* bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored.

* bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored.
(cherry picked from commit bc50f03)
pitrou pushed a commit to pitrou/cpython that referenced this pull request May 25, 2017
…oop on exc (pythonGH-1683)

* bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored.

* bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored.
(cherry picked from commit bc50f03)
pitrou pushed a commit to pitrou/cpython that referenced this pull request May 25, 2017
…oop on exc (pythonGH-1683)

* bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored.

* bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored..
(cherry picked from commit bc50f03)
pitrou added a commit that referenced this pull request May 25, 2017
…oop on exc (GH-1683) (#1815)

* bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored.

* bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored.
(cherry picked from commit bc50f03)
pitrou added a commit that referenced this pull request May 25, 2017
…oop on exc (GH-1683) (#1816)

* bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored.

* bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored.
(cherry picked from commit bc50f03)
pitrou added a commit that referenced this pull request May 25, 2017
…oop on exc (GH-1683) (#1817)

* bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored.

* bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored..
(cherry picked from commit bc50f03)
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.

None yet

3 participants