HCCleanupAsync deadlock on HCWebSocketConnectAsync failure.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- networking
Research direction
Start by reproducing the HCWebSocketConnectAsync 401 failure on XBOX GDK 250402, then trace HCCleanupAsync through the WebSocket cleanup path. Inspect WinHttpConnection::StartWinHttpClose and the WinHttpCloseHandle failure shown in the logs. Done means cleanup completes without deadlocking after the failed connection.
Written by the indexing model from the issue text.
Description
On XBOX GDK 250402 version after HCWebSocketConnectAsync failure(401 error code from http), the HCCleanupAsync creates deadlock and cannot be finished or even terminated. Possible reason that I found in logs is :
[0758][I][16:01:09.365][HTTPCLIENT] WinHttpConnection WinHttp callback statusCode=11
[0758][I][16:01:09.417][HTTPCLIENT] WinHttpConnection WinHttp callback statusCode=21
[0758][I][16:01:09.418][HTTPCLIENT] WinHttpConnection WinHttp callback statusCode=41
[0758][I][16:01:09.421][HTTPCLIENT] WinHttpConnection WinHttp callback statusCode=81
[0758][I][16:01:09.525][HTTPCLIENT] WinHttpConnection WinHttp callback statusCode=321
[0758][I][16:01:09.551][HTTPCLIENT] HCHttpCallPerform [ID 2] [TID 1880l] WINHTTP_CALLBACK_STATUS_SENDREQUEST_COMPLETE
[0758][I][16:01:09.551][HTTPCLIENT] WinHttpConnection WinHttp callback statusCode=641
[0758][I][16:01:09.551][HTTPCLIENT] WinHttpConnection WinHttp callback statusCode=1281
[0758][I][16:01:09.551][HTTPCLIENT] HCHttpCallPerform [ID 2] [TID 1880l] Websocket WINHTTP_CALLBACK_STATUS_HEADERS_AVAILABLE
[0758][E][16:01:09.551][HTTPCLIENT] HCHttpCallPerform [ID 2] [TID 1880l] WinHttpWebSocketCompleteUpgrade errorcode 4317
[0758][I][16:01:09.551][HTTPCLIENT] HCHttpCallResponseSetErrorCode [ID 2]: errorCode=80004005 (800710DD)
[0758][V][16:01:09.551][HTTPCLIENT] WinHttpConnection::StartWinHttpClose, current state=0 transitioning to ConnectionState::WinHttpClosing
[0758][E][16:01:09.551][HTTPCLIENT] WinHttpCloseHandle failed with errorCode=6
[0730][I][16:01:11.418][WEBSOCKET] HC_WEBSOCKET_OBSERVER::~HC_WEBSOCKET_OBSERVER
WinHttpCloseHandle couldn't be cleaned up, so it provokes deadlock.
Logs when I invoke HCCleanupAsync:
[071C][V][16:01:51.833][HTTPCLIENT] HC_PERFORM_ENV::Cleaning up, HTTP=0, WebSocket Connecting=0, WebSocket Connected=0
[071C][V][16:01:51.834][HTTPCLIENT] NetworkState::CleanupAsyncProvider::Begin: HTTP active=0, WebSocket Connecting=0, WebSocket Connected=0
[071C][V][16:01:55.382][HTTPCLIENT] CurlProvider::CleanupAsyncProvider, cleanupTasksRemaining=0
- Dominant language
- C++
- Stars
- 295
- Forks
- 144
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/libHttpClient
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
microsoft/libHttpClient#964 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
microsoft/libHttpClient#958 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
microsoft/libHttpClient#989 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
microsoft/libHttpClient#868 · 6 comments · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
microsoft/libHttpClient#795 ·
All issues in microsoft/libHttpClient
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·