Skip to content

Adding tests to test_import.SubinterpImportTests causes refleak on FreeBSD #140657

@encukou

Description

@encukou

Adding a few tests to test_import.SubinterpImportTests causes a refleak to be detected on FreeBSD:

test_import leaked [498, 498, 498] references, sum=1494
test_import leaked [326, 326, 326] memory blocks, sum=978

As intriguing as this is, at this point I don't think I should spend more time investigating it. Perhaps someone has a quick idea on what to try :)

cc @vstinner as an expert on FreeBSD and refleak hunting.

See PR and buildbot run. The patch I used is:

diff --git a/Lib/test/test_import/__init__.py b/Lib/test/test_import/__init__.py
index b71a36ec2f7aab..febfb96a53e46c 100644
--- a/Lib/test/test_import/__init__.py
+++ b/Lib/test/test_import/__init__.py
@@ -2467,6 +2467,30 @@ def test_multi_init_extension_per_interpreter_gil_compat(self):
                         self.check_compatible_here(
                             modname, filename, strict=False, isolated=False)
 
+    def test_extra_A(self):
+        return
+
+    def test_extra_B(self):
+        return
+
+    def test_extra_C(self):
+        return
+
+    def test_extra_D(self):
+        return
+
+    def test_extra_E(self):
+        return
+
+    def test_extra_F(self):
+        return
+
+    def test_extra_G(self):
+        return
+
+    def test_extra_H(self):
+        return
+
     @unittest.skipIf(_testinternalcapi is None, "requires _testinternalcapi")
     def test_python_compat(self):
         module = 'threading'

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-freebsdtestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions