Skip to content

CancellableStream returned by docker_client.api.exec_start does not adequately release resources when closed, causing "I/O operation on closed file" errors #3345

Open
@TTimo

Description

@TTimo

CancellableStream returned by docker_client.api.exec_start does not adequately release resources when closed, this leads to errors during python shutdown such as this:

  File "/usr/lib/python3.13/site-packages/urllib3/response.py", line 1113, in close
    self._fp.close()
  File "/usr/lib/python3.13/http/client.py", line 432, in close
    super().close() # set "closed" flag
  File "/usr/lib/python3.13/http/client.py", line 445, in flush
    self.fp.flush()
ValueError: I/O operation on closed file.

I believe this is related, if not the same issue, as: #3282

urllib3 Response objects need to be explicitly closed or they risk causing the problems above on exit.

(I will propose a patch shortly)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions