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_capi.test_no_FatalError_infinite_loop crash on Windows #53362
Comments
Debug and Release builds of py3k both throw up a Visual Studio debugger prompt when running this test on Windows. I don't have much time at the moment to investigate, but I find it odd that this isn't occurring on the two Windows py3k buildbots. Output of the release build after selecting not to debug: C:\python-dev\py3k>PCbuild\amd64\python.exe -m test.regrtest test_capi
test_capi
test test_capi failed -- Traceback (most recent call last):
File "C:\python-dev\py3k\lib\test\test_capi.py", line 50, in test_no_FatalError_infinite_loop
b'Fatal Python error:'
AssertionError: b"Fatal Python error: PyThreadState_Get: no current thread\r\n\r
\nThis application has requested the Runtime to terminate it in an unusual way.\
nPlease contact the application's support team for more information." != b'Fatal
Python error: PyThreadState_Get: no current thread' 1 test failed: |
I should also note that this doesn't appear to happen on release31-maint or trunk. |
I experienced this crash on test_thread.py. I created a patch hopefully to fix this issue. My knowleage about # I'm worried about COND_RESET which is not used in my patch. But Now, test_thread.py runs fine. Reference: |
The patch shouldn't remove COND_RESET, otherwise there will be spurious wakeups. |
At least two of them (and perhaps the third -- I've asked Paul about it) are single-core virtual machines. What is your setup? |
Both machines I've seen this on were true multicore, no VMs. One is dual core the other is 16. |
I said I saw same crash on test_threading in msg110902, but there |
I see the same crash in test_capi, qemu, Windows 7, Debug|x64. The |
I just see that the test is running as expected: _testcapi.crash_no_current_thread() is running in a subprocess, so Perhaps we should generally use an ABORT() macro, which translates to |
Once again, this is not important enough block 3.2a2. |
After creating experimental patch, I could supress dialog FAILED (failures=1)
Traceback (most recent call last):
File "e:\python-dev\py3k\lib\runpy.py", line 160, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "e:\python-dev\py3k\lib\runpy.py", line 73, in _run_code
exec(code, run_globals)
File "e:\python-dev\py3k\lib\test\test_capi.py", line 182, in <module>
test_main()
File "e:\python-dev\py3k\lib\test\test_capi.py", line 143, in test_main
support.run_unittest(CAPITest)
File "e:\python-dev\py3k\lib\test\support.py", line 1127, in run_unittest
_run_suite(suite)
File "e:\python-dev\py3k\lib\test\support.py", line 1110, in _run_suite
raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
File "e:\python-dev\py3k\lib\test\test_capi.py", line 50, in test_no_FatalErro
r_infinite_loop
b'Fatal Python error:'
AssertionError: b'Fatal Python error: PyThreadState_Get: no current thread\r\n\r
\nabnormal program termination' != b'Fatal Python error: PyThreadState_Get: no c
urrent thread' This happens because "abnormal program termination" is output to I think there are a few options to take.
|
Here is the patch. On VS8.0 or above,
|
Maybe is bpo-5619 related? |
Hirokazu's patch works for me. Could this approach be taken in general to |
The patch works for me. |
I just tried out http://www.bitvise.com/winsshd , which is free for personal C:\Users\stefan\cdecimal\PCbuild>python.exe -m test -uall test_capi
[1/1] test_capi
Warning -- threading._dangling was modified by test_capi
test test_capi failed -- Traceback (most recent call last):
File "C:\Users\stefan\cdecimal\lib\test\test_capi.py", line 51, in test_no_FatalError_infinite_loop
b'Fatal Python error:'
AssertionError: b"Fatal Python error: PyThreadState_Get: no current thread\n\r\nThis application has requested the Runtime to terminate it in an unusual way.\nPlease contact the application's support team for more information." != b'Fatal Python error: PyThreadState_Get: no current thread' 1 test failed: Thus, by using ... self.assertIn(b'Fatal Python error:', err.rstrip()) in test_capi, the tests pass without any further intervention! This is most |
I just got 'fatal error' running python_d 3.3.a0 checked out yesterday. When I closed message, test continued (but really crashed later). |
The AssertionError in Brian's initial post indicates that the test is too restrictive. Though the discussion here has talked about removing the popups altogether, the test passes on Windows with a small change: instead of assertEqual(), I used
Patch attached. As this seems to be a sufficiently specific test, but not too specific, I'd like to apply this patch soon, unless someone thinks the test needs to stay exactly like it is. |
I tested the patch, it works fine. I can't test the popup situation |
New changeset 4d74d275224d by Vinay Sajip in branch 'default': |
Vinay commit made the test pass, but the popup is still present. |
With the popup-supression context manager from bpo-11732 in use and the buildbots using the regrtest '-n' option, I think we're at the point of being "fixed enough" and vote to close this issue. I'll leave the final decision to someone with a deeper understanding of the issue, though. |
Closing as it is "fixed enough", feel free to reopen if required. |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: