Skip to content

bpo-42972: Fully support GC for _winapi.Overlapped #26381

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

Merged
merged 6 commits into from
May 28, 2021

Conversation

Fidget-Spinner
Copy link
Member

@Fidget-Spinner Fidget-Spinner commented May 26, 2021

@Fidget-Spinner
Copy link
Member Author

Fidget-Spinner commented May 26, 2021

Anyone knows a surefire way to test this? My main dev machine is Windows, but it seems that _winapi is still somewhat leaky even with the fix:

>>> import sys,gc
>>> for _ in range(5):
...  print(sys.gettotalrefcount())
...  import _winapi
...  del sys.modules['_winapi']
...  del _winapi
...  gc.collect()
...
50468
0
51076
0
51432
0
51788
0
52144
0

Not sure how to test just the Overload type.

@Fidget-Spinner
Copy link
Member Author

Fidget-Spinner commented May 26, 2021

Wait a minute, are multi phase init modules supposed to have a missing m_clear and m_traverse? https://github.com/python/cpython/blob/main/Modules/_winapi.c#L2046-L2052

@erlend-aasland
Copy link
Contributor

Wait a minute, are multi phase init modules supposed to have a missing m_clear and m_traverse? https://github.com/python/cpython/blob/main/Modules/_winapi.c#L2041-L2044

Only if there's nothing to clear/traverse? :)

@Fidget-Spinner
Copy link
Member Author

Fidget-Spinner commented May 26, 2021

Wait a minute, are multi phase init modules supposed to have a missing m_clear and m_traverse? https://github.com/python/cpython/blob/main/Modules/_winapi.c#L2041-L2044

Only if there's nothing to clear/traverse? :)

there are over 100 objects created on module exec :(. Edit: also no m_free

Copy link
Contributor

@erlend-aasland erlend-aasland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Fidget-Spinner
Copy link
Member Author

Ok seems things are better now after introducing the module cleanup functions:

>>> import sys,gc
>>> for _ in range(5):
...  print(sys.gettotalrefcount())
...  import _winapi
...  del sys.modules['_winapi']
...  del _winapi
...  gc.collect()
...
50524
42
50590
42
50590
42
50590
42
50590
42

@erlend-aasland
Copy link
Contributor

That looks nice! If this is a reliable test method, we should use it, at least for the multi-init modules.

@Fidget-Spinner
Copy link
Member Author

That looks nice! If this is a reliable test method, we should use it, at least for the multi-init modules.

Thanks. I shamelessly copied it from your message on the bpo. So thanks for the good test and the reviews :).

@erlend-aasland
Copy link
Contributor

erlend-aasland commented May 26, 2021

Thanks. I shamelessly copied it from your message on the bpo. So thanks for the good test and the reviews :).

I'm pretty sure I shamelessly stole it from @encukou: msg393508, issue 44116 😀

@erlend-aasland
Copy link
Contributor

Regarding the tests. I propose to add a check_gc_support (or something similarly named) to test.support (a la #25757). What do you think?

@@ -150,6 +159,7 @@ overlapped_dealloc(OverlappedObject *self)

CloseHandle(self->overlapped.hEvent);
SetLastError(err);
PyObject_GC_UnTrack(self);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to start by untracking the GC, at the start to the dealloc function.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially did that, but a concern was brought up here which I think makes sense #26381 (comment).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If tp_dealloc returns without clearing the object, IMO it's better to remove it from the GC. It's better to hide this badly broken Python object. I suggest to start by untracking and explain that it's a deliberate choice to untrack even if we hit the worst case scenario of "return" below.

Note: IMO this code should be removed, Windows XP is no longer supported, but it should be done in a separated change.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I just introduced a regression with this, seems like there's a race condition with the GC and the IO operation somewhere.

> python_d.exe -m test test_httplib -m test_local_bad_hostname 

...\cpython\Modules\gcmodule.c:446: update_refs: Assertion "gc_get_refs(gc) != 0" failed
Enable tracemalloc to get the memory block allocation traceback

object address  : 000002DADE2A99D0
object refcount : 0
object type     : 000002DADDF72F60
object type name: _winapi.Overlapped
object repr     : <refcnt 0 at 000002DADE2A99D0>

Fatal Python error: _PyObject_AssertFailed: _PyObject_AssertFailed
Python runtime state: initialized

It seems that placing the PyObject_GC_UnTrack at the top actually fixes it...

@vstinner vstinner merged commit 0fa282c into python:main May 28, 2021
@miss-islington
Copy link
Contributor

Thanks @Fidget-Spinner for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 28, 2021
@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label May 28, 2021
@bedevere-bot
Copy link

GH-26426 is a backport of this pull request to the 3.10 branch.

@vstinner
Copy link
Member

I'm not fully satisfied by the dealloc function which calls untrack late, but this code is already ugly and the evil return; should not happen in practice anymore. Nowadays, every runs an up to date Windows 10, right?

@Fidget-Spinner
Copy link
Member Author

I'm not fully satisfied by the dealloc function which calls untrack late, but this code is already ugly and the evil return; should not happen in practice anymore.

Sorry i was going to move the untrack up, but timezones and work got in the way.

Nowadays, every runs an up to date Windows 10, right?

I hope so, Win7 is still pretty popular. WinXP is almost gone except for some niche areas if this site is to be believed. https://gs.statcounter.com/os-version-market-share/windows/desktop/worldwide

Anyways, I appreciate the reviews and merge. Thanks!

@Fidget-Spinner
Copy link
Member Author

Regarding the tests. I propose to add a check_gc_support (or something similarly named) to test.support (a la #25757). What do you think?

@erlend-aasland I think this is a worthwhile test to add in the future to make sure we don't regress (especially for module finalization reference leaks, I'm not too worried about the individual types with/without GC). Though I'm waiting for the dust to settle and see what the people on python-committers have to say about this issue specifically. (I'm also using it as an excuse to let everyone take a break. I think Victor has been working a little too hard reviewing all our PRs ;-).

@Fidget-Spinner Fidget-Spinner deleted the winapi_overlapped_gc branch May 28, 2021 09:23
@Fidget-Spinner Fidget-Spinner added the needs backport to 3.10 only security fixes label May 28, 2021
@miss-islington
Copy link
Contributor

Thanks @Fidget-Spinner for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 28, 2021
@bedevere-bot
Copy link

GH-26427 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label May 28, 2021
@erlend-aasland
Copy link
Contributor

I agree with everything you said there, @Fidget-Spinner :)

@miss-islington
Copy link
Contributor

Thanks @Fidget-Spinner for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label May 28, 2021
@bedevere-bot
Copy link

GH-26431 is a backport of this pull request to the 3.10 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 28, 2021
pablogsal pushed a commit that referenced this pull request May 28, 2021
…26430)

* bpo-42972: Fully support GC for _winapi.Overlapped (GH-26381)

* untrack earlier
@bedevere-bot
Copy link

bedevere-bot commented May 28, 2021

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Fedora Stable 3.10 has failed when building commit 0d39951.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/659/builds/70) and take a look at the build logs.
  4. Check if the failure is related to this commit (0d39951) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/659/builds/70

Failed tests:

  • test_ssl

Summary of the results of the build (if available):

==

Click to see traceback logs
remote: Enumerating objects: 4, done.        
remote: Counting objects:  25% (1/4)        
remote: Counting objects:  50% (2/4)        
remote: Counting objects:  75% (3/4)        
remote: Counting objects: 100% (4/4)        
remote: Counting objects: 100% (4/4), done.        
remote: Compressing objects:  50% (1/2)        
remote: Compressing objects: 100% (2/2)        
remote: Compressing objects: 100% (2/2), done.        
remote: Total 4 (delta 2), reused 2 (delta 2), pack-reused 0        
From https://github.com/python/cpython
 * branch                  3.10       -> FETCH_HEAD
Note: switching to '0d399516320d8dfce4453037338659cef3a2adf4'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 0d39951632 [3.10] [bpo-42972](https://bugs.python.org/issue42972): Fully support GC for _winapi.Overlapped (GH-26381)  (#26430)
Switched to and reset branch '3.10'

test_badargs (__main__.GeneralTest) ... ok
test_bound_methods (__main__.GeneralTest) ... ok
test_clear (__main__.GeneralTest) ... ok
test_exit (__main__.GeneralTest) ... ok
test_order (__main__.GeneralTest) ... ok
test_raise (__main__.GeneralTest) ... ok
test_raise_unnormalized (__main__.GeneralTest) ... ok
test_stress (__main__.GeneralTest) ... ok
test_unregister (__main__.GeneralTest) ... ok

----------------------------------------------------------------------
Ran 9 tests in 0.003s

OK
test_flock (__main__.FNTLEINTRTest) ... ok
test_lockf (__main__.FNTLEINTRTest) ... ok
test_read (__main__.OSEINTRTest) ... ok
test_wait (__main__.OSEINTRTest) ... ok
test_wait3 (__main__.OSEINTRTest) ... ok
test_wait4 (__main__.OSEINTRTest) ... ok
test_waitpid (__main__.OSEINTRTest) ... ok
test_write (__main__.OSEINTRTest) ... ok
test_devpoll (__main__.SelectEINTRTest) ... skipped 'need select.devpoll'
test_epoll (__main__.SelectEINTRTest) ... ok
test_kqueue (__main__.SelectEINTRTest) ... skipped 'need select.kqueue'
test_poll (__main__.SelectEINTRTest) ... ok
test_select (__main__.SelectEINTRTest) ... ok
test_sigtimedwait (__main__.SignalEINTRTest) ... ok
test_sigwaitinfo (__main__.SignalEINTRTest) ... ok
test_accept (__main__.SocketEINTRTest) ... ok
test_open (__main__.SocketEINTRTest) ... ok
test_os_open (__main__.SocketEINTRTest) ... ok
test_recv (__main__.SocketEINTRTest) ... ok
test_recvmsg (__main__.SocketEINTRTest) ... ok
test_send (__main__.SocketEINTRTest) ... ok
test_sendall (__main__.SocketEINTRTest) ... ok
test_sendmsg (__main__.SocketEINTRTest) ... ok
test_sleep (__main__.TimeEINTRTest) ... ok

----------------------------------------------------------------------
Ran 24 tests in 8.272s

OK (skipped=2)
Fatal Python error: Segmentation fault

Current thread 0x00007fd746602640 (most recent call first):
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/traceback.py", line 325 in walk_tb
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/traceback.py", line 360 in extract
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/traceback.py", line 494 in __init__
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/traceback.py", line 132 in format_exception
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/test_ssl.py", line 262 in handle_error
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/test_ssl.py", line 2401 in wrap_conn
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/test_ssl.py", line 2444 in run
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/threading.py", line 1006 in _bootstrap_inner
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/threading.py", line 963 in _bootstrap

Thread 0x00007fd74761f640 (most recent call first):
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/threading.py", line 1102 in _wait_for_tstate_lock
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/threading.py", line 1086 in join
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/test_ssl.py", line 2604 in run
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/threading.py", line 1006 in _bootstrap_inner
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/threading.py", line 963 in _bootstrap

Thread 0x00007fd75a900740 (most recent call first):
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/threading.py", line 1102 in _wait_for_tstate_lock
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/threading.py", line 1086 in join
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/test_ssl.py", line 2583 in __exit__
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/test_ssl.py", line 3273 in test_ssl_cert_verify_error
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/unittest/case.py", line 549 in _callTestMethod
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/unittest/case.py", line 592 in run
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/unittest/case.py", line 652 in __call__
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/unittest/suite.py", line 122 in run
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/unittest/suite.py", line 84 in __call__
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/unittest/suite.py", line 122 in run
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/unittest/suite.py", line 84 in __call__
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/unittest/runner.py", line 176 in run
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/support/__init__.py", line 959 in _run_suite
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/support/__init__.py", line 1082 in run_unittest
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/test_ssl.py", line 5007 in test_main
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/libregrtest/runtest.py", line 246 in _runtest_inner2
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/libregrtest/runtest.py", line 282 in _runtest_inner
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/libregrtest/runtest.py", line 141 in _runtest
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/libregrtest/runtest.py", line 194 in runtest
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/libregrtest/runtest_mp.py", line 81 in run_tests_worker
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/libregrtest/main.py", line 661 in _main
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/libregrtest/main.py", line 641 in main
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/libregrtest/main.py", line 719 in main
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/regrtest.py", line 43 in _main
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/regrtest.py", line 47 in <module>
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/runpy.py", line 86 in _run_code
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/runpy.py", line 196 in _run_module_as_main

Extension modules: _testcapi (total: 1)
test_tix skipped -- Tk unavailable due to TclError: no display name and no $DISPLAY environment variab [...]
test_msilib skipped -- No module named '_msi'
test_winconsoleio skipped -- test only relevant on win32
test_winreg skipped -- No module named 'winreg'
test_devpoll skipped -- test works only on Solaris OS family
test_ttk_guionly skipped -- Tk unavailable due to TclError: no display name and no $DISPLAY environment variab [...]
test_kqueue skipped -- test works only on BSD
test_winsound skipped -- No module named 'winsound'
test_ossaudiodev skipped -- [Errno 2] No such file or directory: '/dev/dsp'
test_tk skipped -- Tk unavailable due to TclError: no display name and no $DISPLAY environment variab [...]
test_startfile skipped -- object <module 'os' from '/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/os.py'> has no attribute 'startfile'
test_ioctl skipped -- Unable to open /dev/tty
test_zipfile64 skipped -- test requires loads of disk-space bytes and a long time to run
Fatal Python error: Segmentation fault

Current thread 0x00007f9de2d1f640 (most recent call first):
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/linecache.py", line 72 in checkcache
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/traceback.py", line 375 in extract
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/traceback.py", line 494 in __init__
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/traceback.py", line 132 in format_exception
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/test_ssl.py", line 262 in handle_error
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/test_ssl.py", line 2401 in wrap_conn
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/test_ssl.py", line 2444 in run
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/threading.py", line 1006 in _bootstrap_inner
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/threading.py", line 963 in _bootstrap

Thread 0x00007f9de0d1b640 (most recent call first):
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/threading.py", line 1102 in _wait_for_tstate_lock
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/threading.py", line 1086 in join
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/test_ssl.py", line 2604 in run
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/threading.py", line 1006 in _bootstrap_inner
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/threading.py", line 963 in _bootstrap

Thread 0x00007f9df0b5c740 (most recent call first):
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/threading.py", line 1102 in _wait_for_tstate_lock
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/threading.py", line 1086 in join
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/test_ssl.py", line 2583 in __exit__
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/test_ssl.py", line 3273 in test_ssl_cert_verify_error
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/unittest/case.py", line 549 in _callTestMethod
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/unittest/case.py", line 592 in run
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/unittest/case.py", line 652 in __call__
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/unittest/suite.py", line 122 in run
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/unittest/suite.py", line 84 in __call__
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/unittest/suite.py", line 122 in run
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/unittest/suite.py", line 84 in __call__
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/unittest/runner.py", line 176 in run
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/support/__init__.py", line 959 in _run_suite
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/support/__init__.py", line 1082 in run_unittest
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/test_ssl.py", line 5007 in test_main
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/libregrtest/runtest.py", line 246 in _runtest_inner2
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/libregrtest/runtest.py", line 282 in _runtest_inner
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/libregrtest/runtest.py", line 154 in _runtest
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/libregrtest/runtest.py", line 194 in runtest
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/libregrtest/main.py", line 321 in rerun_failed_tests
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/libregrtest/main.py", line 698 in _main
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/libregrtest/main.py", line 641 in main
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/libregrtest/main.py", line 719 in main
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/test/__main__.py", line 2 in <module>
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/runpy.py", line 86 in _run_code
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/Lib/runpy.py", line 196 in _run_module_as_main

Extension modules: _testcapi (total: 1)
make: *** [Makefile:1256: buildbottest] Segmentation fault (core dumped)

Cannot open file '/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64/build/test-results.xml' for upload

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot x86 Gentoo Installed with X 3.10 has failed when building commit 0d39951.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/696/builds/86) and take a look at the build logs.
  4. Check if the failure is related to this commit (0d39951) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/696/builds/86

Failed tests:

  • test_idle

Failed subtests:

  • test_incremental_editing - idlelib.idle_test.test_colorizer.ColorDelegatorTest

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

413 tests OK.

1 test failed:
test_idle

13 tests skipped:
test_asdl_parser test_check_c_globals test_clinic test_devpoll
test_gdb test_ioctl test_kqueue test_msilib test_startfile
test_winconsoleio test_winreg test_winsound test_zipfile64

1 re-run test:
test_idle

Total duration: 35 min 12 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.10.ware-gentoo-x86.installed/build/target/lib/python3.10/idlelib/idle_test/tkinter_testing_utils.py", line 54, in new_test_method
    raise exception
  File "/buildbot/buildarea/cpython/3.10.ware-gentoo-x86.installed/build/target/lib/python3.10/idlelib/idle_test/tkinter_testing_utils.py", line 38, in after_callback
    next(test_generator)
  File "/buildbot/buildarea/cpython/3.10.ware-gentoo-x86.installed/build/target/lib/python3.10/idlelib/idle_test/test_colorizer.py", line 586, in test_incremental_editing
    eq(text.tag_nextrange('BUILTIN', '1.0'), ('1.0', '1.3'))
AssertionError: Tuples differ: () != ('1.0', '1.3')


Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.10.ware-gentoo-x86.installed/build/target/lib/python3.10/idlelib/idle_test/tkinter_testing_utils.py", line 54, in new_test_method
    raise exception
  File "/buildbot/buildarea/cpython/3.10.ware-gentoo-x86.installed/build/target/lib/python3.10/idlelib/idle_test/tkinter_testing_utils.py", line 38, in after_callback
    next(test_generator)
  File "/buildbot/buildarea/cpython/3.10.ware-gentoo-x86.installed/build/target/lib/python3.10/idlelib/idle_test/test_colorizer.py", line 569, in test_incremental_editing
    eq(text.tag_nextrange('KEYWORD', '1.0'), ('1.0', '1.2'))
AssertionError: Tuples differ: () != ('1.0', '1.2')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants