classification
Title: Test_winreg, test_dynamic_key hangs on my Win 10
Type: crash Stage: resolved
Components: Tests Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: eryksun, ned.deily, paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware
Priority: Keywords:

Created on 2017-06-20 17:14 by terry.reedy, last changed 2018-01-29 04:43 by terry.reedy. This issue is now closed.

Messages (5)
msg296474 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-20 17:14
On my Win10-64 machine, test_winreg hangs, impervious to ^C.  I have to close Command Prompt.  (With IDLE I can run just test_winreg and then Restart Shell.)  This happened with repository builds last Friday and today, and with installed 3.6.2rc1.  But I believe I ran the entire test suite (to successful completion) not too many days before.

The culprit is

    def test_dynamic_key(self):
        # Issue2810, when the value is dynamically generated, these
        # raise "WindowsError: More data is available" in 2.6 and 3.1
        try:
            EnumValue(HKEY_PERFORMANCE_DATA, 0)
        except OSError as e:
            if e.errno in (errno.EPERM, errno.EACCES):
                self.skipTest("access denied to registry key "
                              "(are you running in a non-interactive session?)")
            raise
        QueryValueEx(HKEY_PERFORMANCE_DATA, "")

Commenting out the whole function or both the EnumValue and QueryValueEx calls (replacing the former with pass) is required to allow the test to run (and pass).

I have no idea why behavior on my machine is different from buildbots.  If the problem is with my registry, could the test be more robust?  Having to kill my console session, and lose history, after running the test suite, is unpleasant.
msg296782 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-24 19:20
Ping.  I still cannot run the test suite to completion, so I cannot tell whether I add a warning failure regression.  Does anyone else have the same problem?  Should I patch the file to skip this test?
msg297479 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-07-01 07:31
I just found -x test_winreg so I can run the test suite while waiting for this to be fixed.
msg311011 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-01-28 22:02
What's the status of this issue?  It was previous marked as a "release blocker" and I subsequently downgraded it to a "deferred blocker" so as not to hold up releases.  Since a few maintenance releases have gone by without any action, I am removing the "deferred Blocker" status now.  Any one have any ideas?
msg311054 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2018-01-29 04:43
test_winreg now works, taking about 5 seconds.  It has been working recently but I dont' know when or why the problem disappeared.
History
Date User Action Args
2018-01-29 04:43:00terry.reedysetstatus: open -> closed
resolution: out of date
messages: + msg311054

stage: resolved
2018-01-28 22:02:28ned.deilysetpriority: deferred blocker ->
nosy: + eryksun
messages: + msg311011

2017-07-01 18:07:28ned.deilysetpriority: release blocker -> deferred blocker
2017-07-01 07:31:04terry.reedysetmessages: + msg297479
2017-06-24 19:20:58terry.reedysetmessages: + msg296782
2017-06-20 17:17:59terry.reedysettype: behavior -> crash
2017-06-20 17:14:27terry.reedycreate