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

test_strptime hangs sometimes on AMD64 Windows7 SP1 3.x buildbot #69476

Closed
vstinner opened this issue Oct 1, 2015 · 7 comments
Closed

test_strptime hangs sometimes on AMD64 Windows7 SP1 3.x buildbot #69476

vstinner opened this issue Oct 1, 2015 · 7 comments

Comments

@vstinner
Copy link
Member

vstinner commented Oct 1, 2015

BPO 25289
Nosy @pfmoore, @vstinner, @tjguk, @jkloth, @zware, @zooba
Superseder
  • bpo-26624: Windows hangs in call to CRT setlocale()
  • 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 = <Date 2016-03-25.23:28:43.124>
    created_at = <Date 2015-10-01.12:55:09.803>
    labels = ['OS-windows']
    title = 'test_strptime hangs sometimes on AMD64 Windows7 SP1 3.x buildbot'
    updated_at = <Date 2016-03-25.23:28:43.123>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2016-03-25.23:28:43.123>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-03-25.23:28:43.124>
    closer = 'vstinner'
    components = ['Windows']
    creation = <Date 2015-10-01.12:55:09.803>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 25289
    keywords = []
    message_count = 7.0
    messages = ['252025', '252031', '252032', '252033', '252036', '252038', '262461']
    nosy_count = 6.0
    nosy_names = ['paul.moore', 'vstinner', 'tim.golden', 'jkloth', 'zach.ware', 'steve.dower']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = '26624'
    type = None
    url = 'https://bugs.python.org/issue25289'
    versions = ['Python 3.6']

    @vstinner
    Copy link
    Member Author

    vstinner commented Oct 1, 2015

    The AMD64 Windows7 SP1 3.x buildbot randomly fails. Tests take a lot of time. I don't know if it's a slow hardware/VM, or if the system is very busy. By the way, regrtest is run with -j4 (run 4 tests in parallel).

    Example of errors:

    http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/6773/steps/test/logs/stdio
    ---
    ...
    [396/399] test_long -- running: test_lib2to3 (102 sec), test_strptime (54 sec)
    [397/399] test_source_encoding -- running: test_lib2to3 (102 sec), test_strptime (54 sec)
    running: test_lib2to3 (162 sec), test_strptime (114 sec)
    [398/399] test_lib2to3 (205 sec) -- running: test_strptime (159 sec)

    command timed out: 3900 seconds without output, attempting to kill
    program finished with exit code 1
    elapsedTime=4929.577000
    ---

    http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/6783/steps/test/logs/stdio
    ---
    ...
    [392/399] test_wait3 -- running: test_tools (247 sec), test_strptime (770 sec)
    [393/399] test_httplib -- running: test_tools (253 sec), test_strptime (776 sec)
    [394/399] test_strtod -- running: test_tools (254 sec), test_strptime (777 sec)
    [395/399] test_fork1 -- running: test_tools (255 sec), test_strptime (777 sec)
    [396/399] test_xmlrpc -- running: test_tools (263 sec), test_strptime (785 sec)
    [397/399] test_multiprocessing_main_handling -- running: test_tools (271 sec), test_strptime (794 sec)
    running: test_tools (331 sec), test_strptime (854 sec)
    [398/399] test_tools (337 sec) -- running: test_strptime (861 sec)

    command timed out: 3900 seconds without output, attempting to kill
    program finished with exit code 1
    elapsedTime=5068.979000
    ---

    @jkloth
    Copy link
    Contributor

    jkloth commented Oct 1, 2015

    The system is a dedicated Quad CPU @2.66GHz with 8GB RAM and running the tests on an SSD. I doubt it is the hardware.

    Please note, it is the only 64-bit Windows buildbot AND the only multi-core Windows buildbot. So it catches lots of things that most others do not.

    Last chance I had to find the missing test, it was test__locale.

    Also note that 3.5 is passing just fine, so it is something particular to the 3.x branch.

    @vstinner
    Copy link
    Member Author

    vstinner commented Oct 1, 2015

    By the way, I'm surprised how slow is this buildbot. On Linux, running the whole test suite (399 tests) takes less than 5 minutes with -j4 on my PC (Intel i7-2600 @ 3.40GHz with 12 GB of RAM).

    Is Python much slower on Windows? Or the buildbot CPU is *much* slower than mine?

    @zware
    Copy link
    Member

    zware commented Oct 1, 2015

    Jeremy Kloth wrote:

    Please note, it is the only 64-bit Windows buildbot

    That's not true anymore; in fact, all but David Bolen's XP and Windows 7 bots are 64-bit. Yours is the one one in the 'stable' set, but that classification is a bit out of date for the whole set. Current 64-bit Windows bots are yours, David Bolen's Windows8 and Windows10 bots, and my Windows8.1 Non-Debug bot.

    AND the only multi-core Windows buildbot.

    This is still true, though.

    Victor Stinner wrote:

    Is Python much slower on Windows?

    I think the test suite is significantly slower on Windows; I'm not certain about Python itself. It routinely takes well over 20 minutes on my Windows machines. The fact that the bot in question compiles in Debug configuration may also be playing into it; Debug config links with the debug CRT, which enables a bunch of extra checks at the CRT level.

    @vstinner
    Copy link
    Member Author

    vstinner commented Oct 1, 2015

    On Linux, I also run the Python test suite with Python compiled in
    debug mode. I'm forcing the -O0 flag to disable *all* compilation
    optimization. All assertions are kept, etc.

    Maybe the slowness comes from CRT checks, maybe.

    @zware
    Copy link
    Member

    zware commented Oct 1, 2015

    I was curious, so I checked:

    C:\Users\Zachary\code\hg.python.org\3.5>python.bat -m test.pystone
    Running Debug|x64 interpreter...
    Pystone(1.2) time for 50000 passes = 1.14142
    This machine benchmarks at 43805 pystones/second

    C:\Users\Zachary\code\hg.python.org\3.5>python.bat -m test.pystone
    Running Release|x64 interpreter...
    Pystone(1.2) time for 50000 passes = 0.421115
    This machine benchmarks at 118732 pystones/second

    C:\Users\Zachary\code\hg.python.org\3.5>python.bat -m test.pystone
    Running PGUpdate|x64 interpreter...
    Pystone(1.2) time for 50000 passes = 0.281218
    This machine benchmarks at 177798 pystones/second

    These were run on a Windows 8.1 Virtualbox VM on a Mac. For reference, here's the results for the host machine using python3.5.0 from python.org:

    $ python3 -m test.pystone
    Pystone(1.2) time for 50000 passes = 0.413982
    This machine benchmarks at 120778 pystones/second

    @vstinner
    Copy link
    Member Author

    It looks like the issue was a bug in setlocale() and that it was fixed in Windows! See the issue bpo-26624.

    @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
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants