<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>16236</bug_id>
          
          <creation_ts>2026-04-09 08:31:51 +0000</creation_ts>
          <short_desc>AB-INT: test_list_pkg_files: ResourceWarning: unclosed transport</short_desc>
          <delta_ts>2026-08-20 13:05:19 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>QA/Testing</classification>
          <product>Functional (self) Testing</product>
          <component>oe-selftest</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>AB-INT</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>6.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mathieu Dubois-Briand">mathieu.dubois-briand</reporter>
          <assigned_to name="Francisco Pedraza">pacopedraza87</assigned_to>
          <cc>anibal</cc>
    
    <cc>JPEWhacker</cc>
    
    <cc>pacopedraza87</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>tim.orling</cc>
    
    <cc>yoann.congal</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>104998</commentid>
    <comment_count>0</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-04-09 08:31:51 +0000</bug_when>
    <thetext>We had this warning, just once so far.

2026-04-07 11:25:15,946 - oe-selftest - INFO - pkgdata.OePkgdataUtilTests.test_list_pkg_files (subunit.RemotedTestCase)
2026-04-07 11:25:15,946 - oe-selftest - INFO -  ... FAIL
...
Loading cache...WARNING: /usr/lib/python3.9/asyncio/sslproto.py:320: ResourceWarning: unclosed transport &lt;asyncio.sslproto._SSLProtocolTransport object at 0x7f1421b1a940&gt;
  _warn(f&quot;unclosed transport {self!r}&quot;, ResourceWarning, source=self)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105002</commentid>
    <comment_count>1</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-04-09 08:51:19 +0000</bug_when>
    <thetext>oe-selftest-debian debian11-vk-1 mathieu/master-next completed at 2026-04-07 12:22:14+00:00
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/3618/steps/15/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105008</commentid>
    <comment_count>2</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2026-04-09 14:36:03 +0000</bug_when>
    <thetext>scarthgap oe-selftest-debian ubuntu2204-vk-1 https://autobuilder.yoctoproject.org/valkyrie/?#/builders/35/builds/3612/steps/15/logs/stdio

2026-04-07 00:03:57,628 - oe-selftest - INFO - oelib.buildhistory.TestBlobParsing.test_compare_dict_blobs_default (subunit.RemotedTestCase)
2026-04-07 00:03:57,628 - oe-selftest - INFO -  ... FAIL

Stderr:
2026-04-06 22:32:36,881 - oe-selftest - INFO - Adding: &quot;include selftest.inc&quot; in /srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-3927156/conf/local.conf
2026-04-06 22:32:36,881 - oe-selftest - INFO - Adding: &quot;include bblayers.inc&quot; in bblayers.conf
Loading cache...WARNING: /usr/lib/python3.10/asyncio/sslproto.py:320: ResourceWarning: unclosed transport &lt;asyncio.sslproto._SSLProtocolTransport object at 0x7f9063ee7460&gt;
  _warn(f&quot;unclosed transport {self!r}&quot;, ResourceWarning, source=self)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105016</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-04-09 14:46:22 +0000</bug_when>
    <thetext>Might be due to some recent denial of service attacks.
The two builds were about 12 hours apart.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105077</commentid>
    <comment_count>4</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-04-15 13:29:08 +0000</bug_when>
    <thetext>oe-selftest-debian ubuntu2204-vk-2 master completed at 2026-04-15 02:44:52+00:00
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/3677/steps/15/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105234</commentid>
    <comment_count>5</comment_count>
    <who name="Joshua Watt">JPEWhacker</who>
    <bug_when>2026-04-23 15:21:51 +0000</bug_when>
    <thetext>Since this is reporting an unclosed SSL connection, this is almost certainly an unclosed websocket used by the hash equivalence server. There are only a few places where hash equivalence clients are created. Almost all of them use a `with` block to ensure that the client is properly cleaned up, except for one spot. In the SignatureGeneratorUniHashMixIn class in bb/lib/siggen.py, it has:

```
    @contextmanager
    def client(self):
        with self._client_env():
            if getattr(self, &apos;_client&apos;, None) is None:
                self._client = hashserv.create_client(self.server, **self.get_hashserv_creds())
            yield self._client

    def reset(self, data):
        self.__close_clients()
        return super().reset(data)

    def exit(self):
        self.__close_clients()
        return super().exit()

    def __close_clients(self):
        with self._client_env():
            if getattr(self, &apos;_client&apos;, None) is not None:
                self._client.close()
                self._client = None
            if getattr(self, &apos;_client_pool&apos;, None) is not None:
                self._client_pool.close()
                self._client_pool = None
```

In this case, siggen will create a client (if one doesn&apos;t already exist) in the `client()` call, but it will not clean it up unless `reset()` or `exit()` is called; this seems like the most likely culprit as to the error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105242</commentid>
    <comment_count>6</comment_count>
    <who name="Aníbal Limón">anibal</who>
    <bug_when>2026-04-23 17:21:40 +0000</bug_when>
    <thetext>(In reply to Joshua Watt from comment #5)
&gt; Since this is reporting an unclosed SSL connection, this is almost certainly
&gt; an unclosed websocket used by the hash equivalence server. There are only a
&gt; few places where hash equivalence clients are created. Almost all of them
&gt; use a `with` block to ensure that the client is properly cleaned up, except
&gt; for one spot. In the SignatureGeneratorUniHashMixIn class in
&gt; bb/lib/siggen.py, it has:
&gt; 
&gt; ```
&gt;     @contextmanager
&gt;     def client(self):
&gt;         with self._client_env():
&gt;             if getattr(self, &apos;_client&apos;, None) is None:
&gt;                 self._client = hashserv.create_client(self.server,
&gt; **self.get_hashserv_creds())
&gt;             yield self._client
&gt; 
&gt;     def reset(self, data):
&gt;         self.__close_clients()
&gt;         return super().reset(data)
&gt; 
&gt;     def exit(self):
&gt;         self.__close_clients()
&gt;         return super().exit()
&gt; 
&gt;     def __close_clients(self):
&gt;         with self._client_env():
&gt;             if getattr(self, &apos;_client&apos;, None) is not None:
&gt;                 self._client.close()
&gt;                 self._client = None
&gt;             if getattr(self, &apos;_client_pool&apos;, None) is not None:
&gt;                 self._client_pool.close()
&gt;                 self._client_pool = None
&gt; ```
&gt; 
&gt; In this case, siggen will create a client (if one doesn&apos;t already exist) in
&gt; the `client()` call, but it will not clean it up unless `reset()` or
&gt; `exit()` is called; this seems like the most likely culprit as to the error.

Thanks Joshua, I&apos;ll try to reproduce it and if succeed do a patch for it, may be a test case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105291</commentid>
    <comment_count>7</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2026-04-29 09:13:44 +0000</bug_when>
    <thetext>On a debian 11 system with python 3.9, the bitbake-cookerdaemon.log is full of these messages.

The oe-selftest failure is obviously bad timing of the garbage collection but if we can remove them from the log generally, it would mean we likely fix the oe-selftest issue even if we can&apos;t direction reproduce it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105413</commentid>
    <comment_count>8</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-05-12 08:22:46 +0000</bug_when>
    <thetext>oe-selftest-debian debian11-vk-1 master completed at 2026-05-07 04:37:57+00:00
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/3804/steps/15/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105463</commentid>
    <comment_count>9</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-05-15 08:53:27 +0000</bug_when>
    <thetext>Is this one another synpto of the same issue? In recipetool.

oe-selftest-armhost ubuntu2204-vk-arm2 master completed at 2026-05-14 03:09:43+00:00
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3954/steps/15/logs/stdio

oe-selftest-armhost ubuntu2204-vk-arm2 master completed at 2026-05-12 05:20:32+00:00
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3935/steps/15/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105471</commentid>
    <comment_count>10</comment_count>
    <who name="Aníbal Limón">anibal</who>
    <bug_when>2026-05-15 16:05:43 +0000</bug_when>
    <thetext>(In reply to Richard Purdie from comment #7)
&gt; On a debian 11 system with python 3.9, the bitbake-cookerdaemon.log is full
&gt; of these messages.
&gt; 
&gt; The oe-selftest failure is obviously bad timing of the garbage collection
&gt; but if we can remove them from the log generally, it would mean we likely
&gt; fix the oe-selftest issue even if we can&apos;t direction reproduce it.

Reviewing the Python3 issues there was two tickets related to this behavior one found in 3.4/3.5 [1] and other in 3.7 - 3.11 [2].

Reading [2], I found Python 3.11 changed the whole implementation of asyncio/ssl [3].

Have this error been seen on newer Linux distros, we could add a warning suppress based on the Python version as workaround while we investigate more.

[1] https://bugs.python.org/issue23243 
[2] https://bugs.python.org/issue46318
[3] https://bugs.python.org/issue44011</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105674</commentid>
    <comment_count>11</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-05-29 14:40:13 +0000</bug_when>
    <thetext>oe-selftest-debian debian11-vk-3 master completed at 2026-05-22 03:59:11+00:00
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/3893/steps/15/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105781</commentid>
    <comment_count>12</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-06-09 09:10:48 +0000</bug_when>
    <thetext>oe-selftest-debian debian11-vk-1 master completed at 2026-06-06 00:52:49+00:00
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/3982/steps/15/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105915</commentid>
    <comment_count>13</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-06-18 10:32:29 +0000</bug_when>
    <thetext>oe-selftest-armhost ubuntu2204-vk-arm2 master-next completed at 2026-06-18 09:36:50+00:00
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/4143/steps/15/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105955</commentid>
    <comment_count>14</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2026-06-19 07:29:18 +0000</bug_when>
    <thetext>oe-selftest-debian debian11-vk-1 contrib/ycongal/wrynose-nut completed at 2026-06-18 19:20:45+00:00
https://autobuilder.yoctoproject.org/valkyrie/?#/builders/35/builds/4070</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105978</commentid>
    <comment_count>15</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-06-22 09:06:15 +0000</bug_when>
    <thetext>oe-selftest-debian ubuntu2204-vk-1 master completed at 2026-06-22 02:41:46+00:00
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/4116/steps/15/logs/stdio

oe-selftest-armhost ubuntu2204-vk-arm2 master completed at 2026-06-21 03:09:16+00:00
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/4168/steps/15/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106035</commentid>
    <comment_count>16</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-06-29 08:30:02 +0000</bug_when>
    <thetext>oe-selftest-armhost ubuntu2204-vk-arm2 master completed at 2026-06-28 03:09:51+00:00
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/4217/steps/15/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106100</commentid>
    <comment_count>17</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2026-07-05 07:36:06 +0000</bug_when>
    <thetext>oe-selftest-armhost ubuntu2204-vk-arm2 wrynose completed at 2026-07-05 01:42:36+00:00
https://autobuilder.yoctoproject.org/valkyrie/?#/builders/23/builds/4277

Not the same test failing but same bug: the &quot;ResourceWarning: unclosed transport&quot; message is injected into a path.

Log:
2026-07-05 01:04:57,250 - oe-selftest - INFO - 1: 42/48 567/676 (2.45s) (0 failed) (recipetool.RecipetoolTests.test_recipetool_load_plugin)
2026-07-05 01:04:57,250 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
  File &quot;/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/lib/oeqa/selftest/cases/recipetool.py&quot;, line 892, in test_recipetool_load_plugin
    with open(srcfile) as fh:
FileNotFoundError: [Errno 2] No such file or directory: &apos;WARNING: /usr/lib/python3.10/asyncio/sslproto.py:320: ResourceWarning: unclosed transport &lt;asyncio.sslproto._SSLProtocolTransport object at 0xffff080d6bc0&gt;\n  _warn(f&quot;unclosed transport {self!r}&quot;, ResourceWarning, source=self)\n\n/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-1137552/meta-selftest/lib/recipetool/bbpath.py&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106232</commentid>
    <comment_count>18</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-07-21 09:09:02 +0000</bug_when>
    <thetext>oe-selftest-armhost ubuntu2204-vk-arm2 stable/2.18-nut&amp;stable/wrynose-nut completed at 2026-07-05 01:42:36+00:00
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/4277/steps/15/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106464</commentid>
    <comment_count>19</comment_count>
    <who name="Francisco Pedraza">pacopedraza87</who>
    <bug_when>2026-08-06 16:39:16 +0000</bug_when>
    <thetext>I spoke with Anibal, he is okay if I take this one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106465</commentid>
    <comment_count>20</comment_count>
    <who name="Francisco Pedraza">pacopedraza87</who>
    <bug_when>2026-08-06 16:41:00 +0000</bug_when>
    <thetext>(In reply to Francisco Pedraza from comment #19)
&gt; I spoke with Anibal, he is okay if I take this one.

https://lists.openembedded.org/g/openembedded-core/message/242917</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106585</commentid>
    <comment_count>21</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-08-20 13:05:19 +0000</bug_when>
    <thetext>Patch merged: https://git.openembedded.org/bitbake/commit/?id=7a3cb0d55e3698e883a9ff8491febc9d155482ca

The issue seems to be gone.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>