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_winreg, test_dynamic_key hangs on my Win 10 #74900

Closed
terryjreedy opened this issue Jun 20, 2017 · 5 comments
Closed

Test_winreg, test_dynamic_key hangs on my Win 10 #74900

terryjreedy opened this issue Jun 20, 2017 · 5 comments
Labels
3.7 (EOL) end of life tests Tests in the Lib/test dir type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@terryjreedy
Copy link
Member

BPO 30715
Nosy @terryjreedy, @pfmoore, @tjguk, @ned-deily, @zware, @eryksun, @zooba

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 2018-01-29.04:43:00.398>
created_at = <Date 2017-06-20.17:14:27.094>
labels = ['3.7', 'tests', 'type-crash']
title = 'Test_winreg, test_dynamic_key hangs on my Win 10'
updated_at = <Date 2018-01-29.04:43:00.396>
user = 'https://github.com/terryjreedy'

bugs.python.org fields:

activity = <Date 2018-01-29.04:43:00.396>
actor = 'terry.reedy'
assignee = 'none'
closed = True
closed_date = <Date 2018-01-29.04:43:00.398>
closer = 'terry.reedy'
components = ['Tests']
creation = <Date 2017-06-20.17:14:27.094>
creator = 'terry.reedy'
dependencies = []
files = []
hgrepos = []
issue_num = 30715
keywords = []
message_count = 5.0
messages = ['296474', '296782', '297479', '311011', '311054']
nosy_count = 7.0
nosy_names = ['terry.reedy', 'paul.moore', 'tim.golden', 'ned.deily', 'zach.ware', 'eryksun', 'steve.dower']
pr_nums = []
priority = None
resolution = 'out of date'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'crash'
url = 'https://bugs.python.org/issue30715'
versions = ['Python 3.6', 'Python 3.7']

@terryjreedy
Copy link
Member Author

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.

@terryjreedy terryjreedy added type-bug An unexpected behavior, bug, or error release-blocker 3.7 (EOL) end of life tests Tests in the Lib/test dir type-crash A hard crash of the interpreter, possibly with a core dump and removed type-bug An unexpected behavior, bug, or error labels Jun 20, 2017
@terryjreedy
Copy link
Member Author

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?

@terryjreedy
Copy link
Member Author

I just found -x test_winreg so I can run the test suite while waiting for this to be fixed.

@ned-deily
Copy link
Member

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?

@terryjreedy
Copy link
Member Author

test_winreg now works, taking about 5 seconds. It has been working recently but I dont' know when or why the problem disappeared.

@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
3.7 (EOL) end of life tests Tests in the Lib/test dir type-crash A hard crash of the interpreter, possibly with a core dump
Projects
None yet
Development

No branches or pull requests

2 participants