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

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

Closed
cipater mannequin opened this issue Aug 14, 2010 · 10 comments
Closed

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

cipater mannequin opened this issue Aug 14, 2010 · 10 comments
Assignees
Labels
extension-modules C modules in the Modules dir OS-windows release-blocker stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@cipater
Copy link
Mannequin

cipater mannequin commented Aug 14, 2010

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']

    @cipater
    Copy link
    Mannequin Author

    cipater mannequin commented Aug 14, 2010

    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
    >>>

    @cipater cipater mannequin added type-crash A hard crash of the interpreter, possibly with a core dump extension-modules C modules in the Modules dir labels Aug 14, 2010
    @cipater
    Copy link
    Mannequin Author

    cipater mannequin commented Aug 14, 2010

    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.

    @briancurtin
    Copy link
    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

    @briancurtin briancurtin added stdlib Python modules in the Lib dir OS-windows type-bug An unexpected behavior, bug, or error and removed type-crash A hard crash of the interpreter, possibly with a core dump labels Aug 14, 2010
    @briancurtin
    Copy link
    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

    @briancurtin
    Copy link
    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.

    @warsaw
    Copy link
    Member

    warsaw commented Aug 14, 2010

    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.

    @briancurtin
    Copy link
    Member

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

    @warsaw
    Copy link
    Member

    warsaw commented Aug 14, 2010

    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!

    @briancurtin
    Copy link
    Member

    Committed in r84031.

    Thanks for reporting this, cipater.

    @briancurtin briancurtin self-assigned this Aug 14, 2010
    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Aug 14, 2010

    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.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    extension-modules C modules in the Modules dir OS-windows release-blocker stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants