Skip to content

Freeze in SSLSocket.read after returning from sleep #116223

@Ark-kun

Description

@Ark-kun

Bug report

Bug description:

I was running a script (in Jupyter/IPython/VSCode Interactive) that uses the requests library to download data. System hibernated and then woke up. After waking up, the download call stuck for hours. I've used the Austin profiler to get the stack trace. It looks like the code is stuck in SSLSocket.read.
The process has been stuck for several hours. There is unsaved variable data that I really don't want to lose.

My expectation is that SSLSocket.read should not get stuck for hours without error.

Is there any additional debug information I should collect in such cases?

c:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py:Session.get:600
c:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py:Session.request:587
c:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py:Session.send:745
c:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\models.py:Response.content:899
c:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\models.py:Response.iter_content.<locals>.generate:816
c:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\response.py:HTTPResponse.stream:628
c:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\response.py:HTTPResponse.read:567
c:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\response.py:HTTPResponse._fp_read:533
c:\Users\User\AppData\Local\Programs\Python\Python311\Lib\http\client.py:HTTPResponse.read:465
c:\Users\User\AppData\Local\Programs\Python\Python311\Lib\socket.py:SocketIO.readinto:706
c:\Users\User\AppData\Local\Programs\Python\Python311\Lib\ssl.py:SSLSocket.recv_into:1278
c:\Users\User\AppData\Local\Programs\Python\Python311\Lib\ssl.py:SSLSocket.read:1134 161

CPython versions tested on:

3.11

Operating systems tested on:

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic-SSLtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions