Skip to content

multiprocessing Pool instantiation crashes on 64 bit 2.6.6rc1 under Windows 7 #53809

Closed

Description

@cipater
mannequin
BPO 9600
Nosy @loewis, @warsaw, @briancurtin
Files
  • issue9600.diff
  • 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 = 'https://github.com/briancurtin'
    closed_at = <Date 2010-08-14.17:10:57.127>
    created_at = <Date 2010-08-14.03:30:31.766>
    labels = ['extension-modules', 'type-bug', 'library', 'OS-windows', 'release-blocker']
    title = 'multiprocessing Pool instantiation crashes on 64 bit 2.6.6rc1 under Windows 7'
    updated_at = <Date 2010-08-14.19:36:46.600>
    user = 'https://bugs.python.org/cipater'

    bugs.python.org fields:

    activity = <Date 2010-08-14.19:36:46.600>
    actor = 'loewis'
    assignee = 'brian.curtin'
    closed = True
    closed_date = <Date 2010-08-14.17:10:57.127>
    closer = 'brian.curtin'
    components = ['Extension Modules', 'Library (Lib)', 'Windows']
    creation = <Date 2010-08-14.03:30:31.766>
    creator = 'cipater'
    dependencies = []
    files = ['18526']
    hgrepos = []
    issue_num = 9600
    keywords = ['patch']
    message_count = 10.0
    messages = ['113864', '113865', '113873', '113875', '113902', '113908', '113909', '113910', '113914', '113925']
    nosy_count = 5.0
    nosy_names = ['loewis', 'barry', 'jnoller', 'brian.curtin', 'cipater']
    pr_nums = []
    priority = 'release blocker'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue9600'
    versions = ['Python 2.6']

    Activity

    1. cipater commented on Aug 14, 2010

      cipatermannequin
      MannequinAuthor

      I'm running 2.6.6rc1 64 bit on Windows 7

      I get the following error when I try to instantiate a Pool:

      >>> import multiprocessing
      >>> p = Pool(processes = 2)
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        File "c:\Python26\lib\multiprocessing\__init__.py", line 227, in Pool
          return Pool(processes, initializer, initargs)
        File "c:\Python26\lib\multiprocessing\pool.py", line 84, in __init__
          self._setup_queues()
        File "c:\Python26\lib\multiprocessing\pool.py", line 130, in _setup_queues
          from .queues import SimpleQueue
        File "c:\Python26\lib\multiprocessing\queues.py", line 22, in <module>
          from multiprocessing.synchronize import Lock, BoundedSemaphore, Semaphore, Condition
        File "c:\Python26\lib\multiprocessing\synchronize.py", line 22, in <module>
          from multiprocessing.forking import assert_spawning, Popen
        File "c:\Python26\lib\multiprocessing\forking.py", line 153, in <module>
          from ._multiprocessing import win32, Connection, PipeConnection
      ImportError: No module named _multiprocessing
      >>>
    2. added
      type-crash
      extension-modules
      on Aug 14, 2010
    3. cipater commented on Aug 14, 2010

      cipatermannequin
      MannequinAuthor

      prior to this I already imported Pool (from multiprocessing import Pool)

      I also tried the 64 bit 2.6.5 and got the same error.

    4. briancurtin commented on Aug 14, 2010

      @briancurtin
      Member

      I just fixed a similar problem for bpo-9513 but the problem was only ever seen when test_multiprocessing was run through regrtest on 3.x on Windows. Removing the relative import dot on _multiprocessing imports let them succeed.

      I've never actually seen this cause a problem on an installed version, though. I'll check out 2.6.6 rc1 tomorrow when I get back to a Windows box to see if I can reproduce this.

      Reclassifying from crash to behavior - it's just an ImportError, not actually a crash

    5. added
      stdlib
      type-bug
      and removed
      type-crash
      on Aug 14, 2010
    6. briancurtin commented on Aug 14, 2010

      @briancurtin
      Member

      I should correct myself. As seen on the 2.6 Win7 buildbot[0], test_multiprocessing is skipped there likely due to the "from ._multiprocessing..." ImportError. I kind of remember this now but didn't want to backport the fix to release26-maint since it was frozen, and this didn't appear to be an actual bug in the installed version. As said before, I'll investigate tomorrow.

      [0] http://www.python.org/dev/buildbot/builders/x86%20Windows7%202.6/builds/547/steps/test/logs/stdio

    7. briancurtin commented on Aug 14, 2010

      @briancurtin
      Member

      Ok, it turns out this is in fact a regression from 2.6.5. My prior investigation for that 3.x issue must not have been on the 2.6 version I thought it was.

      Barry: the fix from bpo-9513 (e.g., r83722) will correct this.

    8. warsaw commented on Aug 14, 2010

      @warsaw
      Member

      Please upload a patch specifically for 2.6.6 finally so that I can review it (and test it locally). It *seems* safe enough so if you and I both have a high confidence it won't regress anything, and it can go in before Monday, then I might approve it.

      I still can't build on Windows 7 w/VS2010 though unfortunately, but I will locally test Ubuntu (Lucid, Maverick), Debian, and OS X 10.6.

    9. briancurtin commented on Aug 14, 2010

      @briancurtin
      Member

      Here's the patch. All four changes are one char each and live within win32-specific blocks.

    10. warsaw commented on Aug 14, 2010

      @warsaw
      Member

      Looks okay to me on *nix. You can check this in as long as test -u all passes on Windows. Please include a NEWS file entry and close this issue when it's committed. Thanks!

    11. briancurtin commented on Aug 14, 2010

      @briancurtin
      Member

      Committed in r84031.

      Thanks for reporting this, cipater.

    12. self-assigned this
      on Aug 14, 2010
    13. loewis commented on Aug 14, 2010

      loewismannequin
      Mannequin

      Notice that this is also a duplicate of bpo-9144, which was fixed for 2.7, but nobody bothered to move the fix to the other branches. This goes all back to bpo-7902, which has now introduced an incompatible change into 2.6 (otherwise, changing multiprocessing shouldn't have been necessary, despite that having been wrong all the time). I'll reopen that as release-critical for review.

    14. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    OS-windowsextension-modulesrelease-blockerstdlibtype-bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions