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

bpo-46417: Fix _PyStaticType_Dealloc() #30810

Merged
merged 1 commit into from
Jan 22, 2022
Merged

bpo-46417: Fix _PyStaticType_Dealloc() #30810

merged 1 commit into from
Jan 22, 2022

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jan 22, 2022

_PyStaticType_Dealloc() now only calls PyObject_ClearWeakRefs() if
the call is not going to fail.

https://bugs.python.org/issue46417

Objects/typeobject.c Outdated Show resolved Hide resolved
Objects/typeobject.c Outdated Show resolved Hide resolved
_PyStaticType_Dealloc() now only calls PyObject_ClearWeakRefs() if
the call is not going to fail.
@vstinner vstinner merged commit a1444f4 into python:main Jan 22, 2022
@vstinner vstinner deleted the dealloc_clear_weakref branch January 22, 2022 23:32
@bedevere-bot
Copy link

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

Hi! The buildbot AMD64 RHEL7 LTO 3.x has failed when building commit a1444f4.

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/507/builds/1415) and take a look at the build logs.
  4. Check if the failure is related to this commit (a1444f4) 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/507/builds/1415

Failed tests:

  • test_marshal
  • test_mmap
  • test_inspect
  • test_socket
  • test_tarfile
  • test_sqlite3

Failed subtests:

  • test_ordered_recursion - test.test_tarfile.WriteTest
  • setUpClass - test.test_socket.SendfileUsingSendTest
  • test_eof_marker - test.test_tarfile.WriteTest
  • test_dml_does_not_auto_commit_before - test.test_sqlite3.test_transactions.TransactionTests
  • test_replace_starts_transaction - test.test_sqlite3.test_transactions.TransactionTests
  • testModule - test.test_marshal.InstancingTestCase
  • test_ctx_mgr_rollback_if_commit_failed - test.test_sqlite3.test_dbapi.MultiprocessTests
  • test_pathnames - test.test_tarfile.WriteTest
  • test_class - test.test_inspect.TestNoEOL
  • setUpClass - test.test_socket.SendfileUsingSendfileTest
  • test_delete_starts_transaction - test.test_sqlite3.test_transactions.TransactionTests
  • test_link_size - test.test_tarfile.WriteTest
  • test_open_with_path_like_object - test.test_sqlite3.test_dbapi.OpenTests
  • test_add_self - test.test_tarfile.WriteTest
  • test_open_uri - test.test_sqlite3.test_dbapi.OpenTests
  • test_trace_callback_content - test.test_sqlite3.test_hooks.TraceCallbackTests
  • test_update_starts_transaction - test.test_sqlite3.test_transactions.TransactionTests
  • test_abs_pathnames - test.test_tarfile.WriteTest
  • test_filter - test.test_tarfile.WriteTest
  • test_gettarinfo_pathlike_name - test.test_tarfile.WriteTest
  • test_locking - test.test_sqlite3.test_transactions.TransactionTests
  • test_file_size - test.test_tarfile.WriteTest
  • test_extractall_symlinks - test.test_tarfile.WriteTest
  • test_toggle_auto_commit - test.test_sqlite3.test_transactions.TransactionTests
  • test_cwd - test.test_tarfile.WriteTest
  • test_insert_starts_transaction - test.test_sqlite3.test_transactions.TransactionTests
  • test_directory_size - test.test_tarfile.WriteTest
  • test_raise_timeout - test.test_sqlite3.test_transactions.TransactionTests
  • test_repr - test.test_mmap.MmapTests

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

== Tests result: FAILURE then FAILURE ==

416 tests OK.

10 slowest tests:

  • test_peg_generator: 6 min 35 sec
  • test_shelve: 5 min 2 sec
  • test_concurrent_futures: 2 min 51 sec
  • test_gdb: 2 min 20 sec
  • test_dbm: 1 min 52 sec
  • test_multiprocessing_spawn: 1 min 48 sec
  • test_mailbox: 1 min 28 sec
  • test_multiprocessing_forkserver: 1 min 20 sec
  • test_multiprocessing_fork: 1 min 9 sec
  • test_asyncio: 51.0 sec

1 test failed:
test_mmap

14 tests skipped:
test_devpoll test_ioctl test_kqueue test_msilib test_smtpnet
test_ssl test_startfile test_tix test_tk test_ttk_guionly
test_winconsoleio test_winreg test_winsound test_zipfile64

6 re-run tests:
test_inspect test_marshal test_mmap test_socket test_sqlite3
test_tarfile

1 test run no tests:
test_socket

Total duration: 8 min 5 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_sqlite3/test_transactions.py", line 100, in test_toggle_auto_commit
    self.cur1.execute("create table test(i)")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: database or disk is full


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_tarfile.py", line 1417, in test_abs_pathnames
    self._test_pathname("/foo", "foo")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_tarfile.py", line 1354, in _test_pathname
    tar.close()
    ^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/tarfile.py", line 1784, in close
    self.fileobj.close()
    ^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/contextlib.py", line 155, in __exit__
    self.gen.throw(typ, value, traceback)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/support/os_helper.py", line 427, in change_cwd
    yield os.getcwd()
    ^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_tarfile.py", line 1427, in test_cwd
    tar.close()
    ^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/tarfile.py", line 1784, in close
    self.fileobj.close()
    ^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_sqlite3/test_transactions.py", line 81, in test_delete_starts_transaction
    self.cur1.execute("create table test(i)")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: database or disk is full


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_495faaa1'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_sqlite3/test_transactions.py", line 65, in test_insert_starts_transaction
    self.cur1.execute("create table test(i)")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: database or disk is full


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_tarfile.py", line 1299, in test_add_self
    tar.close()
    ^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/tarfile.py", line 1784, in close
    self.fileobj.close()
    ^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_tarfile.py", line 1134, in test_eof_marker
    with tarfile.open(tmpname, self.mode) as tar:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/tarfile.py", line 2477, in __exit__
    self.close()
    ^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/tarfile.py", line 1784, in close
    self.fileobj.close()
    ^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_mmap.py", line 770, in test_repr
    fp.write(data)
    ^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_sqlite3/test_transactions.py", line 72, in test_update_starts_transaction
    self.cur1.execute("create table test(i)")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: database or disk is full


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_132ac67c'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/contextlib.py", line 155, in __exit__
    self.gen.throw(typ, value, traceback)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_sqlite3/test_dbapi.py", line 43, in managed_connect
    yield cx
    ^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_sqlite3/test_dbapi.py", line 621, in test_open_uri
    cx.execute(self._sql)
    ^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: database or disk is full


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_sqlite3/test_transactions.py", line 116, in test_raise_timeout
    self.cur1.execute("create table test(i)")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: database or disk is full


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_tarfile.py", line 1425, in test_cwd
    tar.add(".")
    ^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/tarfile.py", line 1989, in add
    self.add(os.path.join(name, f), os.path.join(arcname, f),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/tarfile.py", line 1989, in add
    self.add(os.path.join(name, f), os.path.join(arcname, f),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/tarfile.py", line 1983, in add
    self.addfile(tarinfo, f)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/tarfile.py", line 2006, in addfile
    self.fileobj.write(buf)
    ^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_inspect.py", line 801, in setUp
    os.mkdir(self.tempdir)
    ^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device: '@test_6370_tmpæ_dir'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_456438f2'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_tarfile.py", line 1303, in test_filter
    os.mkdir(tempdir)
    ^^^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device: '/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/build/test_python_16800æ/test_python_worker_3756æ/@test_3756_tmpæ-tardir/filter'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/tarfile.py", line 1781, in close
    self.fileobj.write(NUL * (RECORDSIZE - remainder))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_tarfile.py", line 1214, in test_ordered_recursion
    os.mkdir(path)
    ^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device: '/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/build/test_python_16800æ/test_python_worker_3756æ/@test_3756_tmpæ-tardir/directory'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_sqlite3/test_transactions.py", line 126, in test_locking
    self.cur1.execute("create table test(i)")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: database or disk is full


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/contextlib.py", line 155, in __exit__
    self.gen.throw(typ, value, traceback)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_sqlite3/test_dbapi.py", line 43, in managed_connect
    yield cx
    ^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_sqlite3/test_dbapi.py", line 617, in test_open_with_path_like_object
    cx.execute(self._sql)
    ^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: database or disk is full


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_socket.py", line 6007, in setUpClass
    f.write(chunk)
    ^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_sqlite3/test_transactions.py", line 90, in test_replace_starts_transaction
    self.cur1.execute("create table test(i)")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: database or disk is full


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_socket.py", line 6005, in setUpClass
    with open(os_helper.TESTFN, 'wb') as f:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_tarfile.py", line 1195, in test_file_size
    tar.close()
    ^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/tarfile.py", line 1784, in close
    self.fileobj.close()
    ^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_tarfile.py", line 1199, in test_directory_size
    os.mkdir(path)
    ^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device: '/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/build/test_python_16800æ/test_python_worker_3756æ/@test_3756_tmpæ-tardir/directory'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_tarfile.py", line 1250, in test_link_size
    with open(target, "wb") as fobj:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_tarfile.py", line 1235, in test_gettarinfo_pathlike_name
    with tarfile.open(tmpname, self.mode) as tar:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/tarfile.py", line 2477, in __exit__
    self.close()
    ^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/tarfile.py", line 1784, in close
    self.fileobj.close()
    ^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_tarfile.py", line 1375, in test_extractall_symlinks
    os.mkdir(tempdir)
    ^^^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device: '/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/build/test_python_16800æ/test_python_worker_3756æ/@test_3756_tmpæ-tardir/testsymlinks'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_sqlite3/test_dbapi.py", line 1395, in test_ctx_mgr_rollback_if_commit_failed
    self.assertEqual("started", proc.stdout.readline().strip())
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'started' != ''
- started
+ 


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_tarfile.py", line 1397, in test_pathnames
    self._test_pathname("foo")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_tarfile.py", line 1354, in _test_pathname
    tar.close()
    ^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/tarfile.py", line 1784, in close
    self.fileobj.close()
    ^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device


Traceback (most recent call last):
  File "<string>", line 10, in <module>
sqlite3.OperationalError: database or disk is full


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_sqlite3/test_hooks.py", line 284, in test_trace_callback_content
    cur.execute(queries[0])
    ^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: database or disk is full


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_sqlite3/test_transactions.py", line 57, in test_dml_does_not_auto_commit_before
    self.cur1.execute("create table test(i)")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: database or disk is full


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_marshal.py", line 517, in testModule
    self.helper(code)
    ^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL7-x86_64.lto/build/Lib/test/test_marshal.py", line 23, in helper
    with open(os_helper.TESTFN, "wb") as f:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device

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.

4 participants