ISteamNetworkingSockets: Trying to use over 8 network lanes/channels fails
Maintainer thường phản hồi trong vòng 2 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cpp
- Lĩnh vực
- networking
Hướng nghiên cứu
Read GetLane() in src/steamnetworkingsockets/clientlib/steamnetworkingsockets_snp.cpp, focusing on how SerializeVarInt() encodes lane IDs and how m_cbHdr is calculated. Reproduce the failure with more than eight lanes, then check whether the header length and connection behavior are correct after the reported change.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hello! We're pivoting our Godot project's network services to Steam's, using ISteamNetworkingSockets via GodotSteam (GodotSteam versions 4.17.1 and 4.23, if relevant) instead of EOS.
We'd split our traffic into 21 channels while using EOS to get around another issue we were having, but found when migrating to Steam that Steam appears to only support 8 - if you try to use more than 8 channels/lanes, you'll get a message like:
Steam connection 2199661473 status changed: 3 -> 4. End reason: 5002 (SNP decode unreliable msgnum underflow. 0 mod 10000, highest seen 0). Remote: 76561198127298424. Description: #2199661473 P2P ICE steamid:76561198127298424 vport 41500
30.300396825394, peer 1: Client left: 704154296
After some research (I assumed it was my code first, then GodotSteam's second, I now see this in GetLane() in src/steamnetworkingsockets/clientlib/steamnetworkingsockets_snp.cpp (main branch as of this writing):
// Get a conservative size for the header we will need to select the specified lane.
// This assumes the lanes will be encoded in order.
if ( nLaneID == 0 ) // Lane zero is the default
{
Assert( m_idxLane0 == -1 );
pNewLane->m_cbHdr = 0;
m_idxLane0 = len( m_vecLanes )-1;
}
else
{
if ( nLaneID <= 7 )
{
pNewLane->m_cbHdr = 1;
pNewLane->m_hdr[0] = (uint8)( 0x87 + nLaneID );
} else {
pNewLane->m_hdr[0] = 0x8f;
uint8 *p = SerializeVarInt( &pNewLane->m_hdr[1], (unsigned)nLaneID );
pNewLane->m_cbHdr = p - &pNewLane->m_hdr[1];
}
m_cbRemainingForSegments -= pNewLane->m_cbHdr;
}
Specifically, if I'm reading it right, this line may be in error:
pNewLane->m_cbHdr = p - &pNewLane->m_hdr[1];
It looks like this logic is trying to put the number of bytes for the lane being used into pNewLane->m_cbHdr - so for 8 lanes, this ought to be 2 bytes, but the above logic will return 1, and the connection will fail with the above error. I think that line should read:
pNewLane->m_cbHdr = p - &pNewLane->m_hdr[0];
Sorry if this isn't the right place to report this! Also happy to be wrong if I'm misreading how that works. Thanks!
- Ngôn ngữ chính
- C++
- Star
- 10k
- Fork
- 767
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ValveSoftware/GameNetworkingSockets
-
ICE (native client): relay-only connections time out against a real TURN server; host-socket checks starve the relay pairsCó thể đã có người làm @Mr444-dev đã nhận 4 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
ValveSoftware/GameNetworkingSockets#452 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 Hơn một tuần Mức phù hợp với người mới 12/100
ValveSoftware/GameNetworkingSockets#465 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 18/100
ValveSoftware/GameNetworkingSockets#464 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Assertion Failed: pSock->m_callback.m_fnCallback (socketthread.cpp:2609) after re-initializing the library with GameNetworkingSockets_Kill + GameNetworkingSockets_InitCó thể đã có người làm @siddiqueirshad đã nhận 10 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
ValveSoftware/GameNetworkingSockets#458 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
ConfigureConnectionLanes: reconfiguring lanes can leave one lane in a stale priority classCó thể đã có người làm @sebxt đã nhận 18 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
ValveSoftware/GameNetworkingSockets#453 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của ValveSoftware/GameNetworkingSockets
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Sunrisepeak/mcpp-language-server#80 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
#2754 make deepseek api not workĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
xiaoyifang/goldendict-ng#3148 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 91/100
triton-inference-server/server#9069 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 4 ngày