Skip to content

gh-159690: Fix timed log rotation after a failed or duplicate rollover - #159692

Merged
vsajip merged 6 commits into
python:mainfrom
lpyu001:longging-bug-fix
Oct 20, 2026
Merged

vsajip merged 6 commits into
python:mainfrom
lpyu001:longging-bug-fix

Conversation

@lpyu001

@lpyu001 lpyu001 commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

@vsajip
vsajip merged commit b124977 into python:main Oct 20, 2026
57 checks passed
@bedevere-bot

Copy link
Copy Markdown

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

Hi! The buildbot AMD64 FreeBSD15 3.x (tier-3) has failed when building commit b124977.

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/#/builders/1238/builds/10164) and take a look at the build logs.
  4. Check if the failure is related to this commit (b124977) 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/#/builders/1238/builds/10164

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.opsec-fbsd15/build/Lib/test/support/__init__.py", line 989, in gc_collect
    gc.collect()
    ~~~~~~~~~~^^
ResourceWarning: unclosed <socket.socket fd=8, family=2, type=1, proto=6, laddr=('127.0.0.1', 26634), raddr=('127.0.0.1', 48624)>
Warning -- Unraisable exception
Exception ignored while calling deallocator <function _SelectorTransport.__del__ at 0x10f4bc85c350>:
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.opsec-fbsd15/build/Lib/asyncio/selector_events.py", line 882, in __del__
    _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
    ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ResourceWarning: unclosed transport <_SelectorSocketTransport closing fd=8>
k


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.opsec-fbsd15/build/Lib/test/support/__init__.py", line 989, in gc_collect
    gc.collect()
    ~~~~~~~~~~^^
ResourceWarning: unclosed <socket.socket fd=8, family=2, type=1, proto=6, laddr=('127.0.0.1', 29287), raddr=('127.0.0.1', 37121)>
Warning -- Unraisable exception
Exception ignored while calling deallocator <function _SelectorTransport.__del__ at 0x1574b6398f50>:
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.opsec-fbsd15/build/Lib/asyncio/selector_events.py", line 882, in __del__
    _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
    ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ResourceWarning: unclosed transport <_SelectorSocketTransport closing fd=8>
k

@bedevere-bot

Copy link
Copy Markdown

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

Hi! The buildbot AMD64 Windows11 Non-Debug 3.x (tier-1) has failed when building commit b124977.

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/#/builders/914/builds/6448) and take a look at the build logs.
  4. Check if the failure is related to this commit (b124977) 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/#/builders/914/builds/6448

Failed tests:

  • test.test_asyncio.test_sslproto

Failed subtests:

  • test_shutdown_corrupted_ssl_sends_close_notify - test.test_asyncio.test_sslproto.SelectorStartTLSTests.test_shutdown_corrupted_ssl_sends_close_notify

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\test\test_asyncio\test_sslproto.py", line 1056, in test_shutdown_corrupted_ssl_sends_close_notify
    self.loop.run_until_complete(client(srv.addr))
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\asyncio\base_events.py", line 723, in run_until_complete
    raise RuntimeError('Event loop stopped before Future completed.')
RuntimeError: Event loop stopped before Future completed.


Traceback (most recent call last):
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\test\support\os_helper.py", line 541, in temp_dir
    os.mkdir(path)
    ~~~~~~~~^^^^^^
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'B:\\uildarea\\3.x.ware-win11.nondebug\\build\\build\\test_python_7876æ'
Stack (most recent call last):
  File "<frozen runpy>", line 201, in _run_module_as_main
  File "<frozen runpy>", line 87, in _run_code
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\test\libregrtest\worker.py", line 141, in <module>
    main()
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\test\libregrtest\worker.py", line 136, in main
    with os_helper.temp_cwd(work_dir, quiet=True):
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\contextlib.py", line 203, in __enter__
    for once in self.gen:
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\test\support\os_helper.py", line 614, in temp_cwd
    with temp_dir(path=name, quiet=quiet) as temp_path:


Traceback (most recent call last):
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\threading.py", line 1218, in _bootstrap_inner
    self._context.run(self.run)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\test\test_asyncio\functional.py", line 227, in run
    self._run()
    ~~~~~~~~~^^
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\test\test_asyncio\functional.py", line 261, in _run
    self._test._abort_socket_test(ex)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\test\test_asyncio\functional.py", line 110, in _abort_socket_test
    self.fail(ex)
    ~~~~~~~~~^^^^
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\unittest\case.py", line 772, in fail
    raise self.failureException(msg)
AssertionError: [WinError 10053] An established connection was aborted by the software in your host machine
k


Traceback (most recent call last):
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\threading.py", line 1218, in _bootstrap_inner
    self._context.run(self.run)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\test\test_asyncio\functional.py", line 227, in run
    self._run()
    ~~~~~~~~~^^
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\test\test_asyncio\functional.py", line 261, in _run
    self._test._abort_socket_test(ex)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\test\test_asyncio\functional.py", line 110, in _abort_socket_test
    self.fail(ex)
    ~~~~~~~~~^^^^
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\unittest\case.py", line 772, in fail
    raise self.failureException(msg)
AssertionError: [WinError 10054] An existing connection was forcibly closed by the remote host
ERROR


Traceback (most recent call last):
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\test\test_asyncio\functional.py", line 255, in _run
    self._handle_client(conn)
    ~~~~~~~~~~~~~~~~~~~^^^^^^
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\test\test_asyncio\functional.py", line 264, in _handle_client
    self._prog(TestSocketWrapper(sock))
    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\test\test_asyncio\test_sslproto.py", line 1026, in server
    sock.unwrap()
    ~~~~~~~~~~~^^
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\ssl.py", line 1412, in unwrap
    s = self._sslobj.shutdown()
ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine


Traceback (most recent call last):
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\test\test_asyncio\functional.py", line 255, in _run
    self._handle_client(conn)
    ~~~~~~~~~~~~~~~~~~~^^^^^^
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\test\test_asyncio\functional.py", line 264, in _handle_client
    self._prog(TestSocketWrapper(sock))
    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\test\test_asyncio\test_sslproto.py", line 1026, in server
    sock.unwrap()
    ~~~~~~~~~~~^^
  File "b:\uildarea\3.x.ware-win11.nondebug\build\Lib\ssl.py", line 1412, in unwrap
    s = self._sslobj.shutdown()
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

@lpyu001

lpyu001 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for merging! This issue also affects 3.14 and 3.15. Would it be worth considering backporting the fix to these branches?

@vsajip vsajip added needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Oct 21, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @lpyu001 for the PR, and @vsajip for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @lpyu001 for the PR, and @vsajip for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Oct 21, 2026

Copy link
Copy Markdown

GH-160025 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Oct 21, 2026
@bedevere-app

bedevere-app Bot commented Oct 21, 2026

Copy link
Copy Markdown

GH-160026 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Oct 21, 2026
vsajip pushed a commit that referenced this pull request Oct 21, 2026
…rollover (GH-159692) (GH-160025)

(cherry picked from commit b124977)
Co-authored-by: Pengyu Lee <lipengyu@kylinos.cn>
vsajip pushed a commit that referenced this pull request Oct 21, 2026
…rollover (GH-159692) (GH-160026)

(cherry picked from commit b124977)
Co-authored-by: Pengyu Lee <lipengyu@kylinos.cn>
@lpyu001
lpyu001 deleted the longging-bug-fix branch October 22, 2026 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants