GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — multiprocessing Pool maxtasksperchild=0 raises exception with endless traceback · Issue #83658 · python/cpython

multiprocessing Pool maxtasksperchild=0 raises exception with endless traceback #83658

New issue
Copy link
New issue
Copy link
Closed
#93364
Closed
multiprocessing Pool maxtasksperchild=0 raises exception with endless traceback#83658
#93364
Copy link
Labels
topic-multiprocessingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

jeyekomon
mannequin
opened on Jan 28, 2020
Issue body actions
BPO 39477
Nosy @pitrou, @applio

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2020-01-28.13:04:56.485>
labels = ['type-bug']
title = 'multiprocessing Pool maxtasksperchild=0 raises exception with endless traceback'
updated_at = <Date 2020-01-28.13:48:42.667>
user = 'https://bugs.python.org/jeyekomon'

bugs.python.org fields:

activity = <Date 2020-01-28.13:48:42.667>
actor = 'xtreak'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = []
creation = <Date 2020-01-28.13:04:56.485>
creator = 'jeyekomon'
dependencies = []
files = []
hgrepos = []
issue_num = 39477
keywords = []
message_count = 1.0
messages = ['360872']
nosy_count = 3.0
nosy_names = ['pitrou', 'davin', 'jeyekomon']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue39477'
versions = []

Activity

  1. jeyekomon commented on Jan 28, 2020

    @jeyekomon
    jeyekomonmannequin
    on Jan 28, 2020
    MannequinAuthor
    More actions

    The following code is expected to fail:

    import multiprocessing
    
    def f(x):
    	return x
    
    if __name__ == '__main__':
    	with multiprocessing.Pool(2, maxtasksperchild=0) as pool:
    		pool.map(f, range(3))

    since it uses a wrong value of the 'maxtasksperchild' parameter. I expect it to raise a ValueError but instead it starts to fill the stderr with practically endless traceback:

    Process ForkPoolWorker-2:
    Process ForkPoolWorker-1:
    Traceback (most recent call last):
      File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
        self.run()
      File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
        self._target(*self._args, **self._kwargs)
      File "/usr/lib/python3.6/multiprocessing/pool.py", line 95, in worker
        assert maxtasks is None or (type(maxtasks) == int and maxtasks > 0)
    Traceback (most recent call last):
    AssertionError
      File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
        self.run()
      File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
        self._target(*self._args, **self._kwargs)
      File "/usr/lib/python3.6/multiprocessing/pool.py", line 95, in worker
        assert maxtasks is None or (type(maxtasks) == int and maxtasks > 0)
    AssertionError
    Process ForkPoolWorker-4:
    Process ForkPoolWorker-3:
    ...

    I don't think this is expected behavior.
    Tested with Python 3.6.9 on Ubuntu 18.04.3.

  2. jeyekomon
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Jan 28, 2020
  3. ezio-melotti
    transferred this issue fromon Apr 10, 2022
  4. serhiy-storchaka
    added this to Multiprocessing issueson May 20, 2022
  5. iritkatriel
    added a commit that references this issue on May 30, 2022

    pythongh-83658: make multiprocessing.Pool raise an exception if maxta…

    ad25815
  6. vstinner
    added
    topic-multiprocessing
    on Jun 6, 2022
  7. miss-islington
    closed this as completedin #93364on Jun 17, 2022
  8. miss-islington
    moved this to Done in Multiprocessing issueson Jun 17, 2022
  9. miss-islington
    added 3 commits that reference this issue on Jun 17, 2022

    GH-83658: make multiprocessing.Pool raise an exception if maxtasksper…

    e37a158

    pythonGH-83658: make multiprocessing.Pool raise an exception if maxta…

    055e0eb

    pythonGH-83658: make multiprocessing.Pool raise an exception if maxta…

    a49809d
  10. iritkatriel
    added 2 commits that reference this issue on Jun 17, 2022

    GH-83658: make multiprocessing.Pool raise an exception if maxtasksper…

    2b7fc1b

    GH-83658: make multiprocessing.Pool raise an exception if maxtasksper…

    2d33d21
  11. serhiy-storchaka
    added a commit that references this issue on Jun 26, 2022

    Revert 30935 defer bpo45162 to 312 (#94285)

    1ffde3e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic-multiprocessingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    • Multiprocessing issues
      Status
      Done
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.