ConfigureConnectionLanes: reconfiguring lanes can leave one lane in a stale priority class
Los mantenedores suelen responder en 2 días
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- cpp
- Área
- networking
Línea de trabajo
Read CSteamNetworkConnectionBase::SNP_ConfigureLanes in steamnetworkingsockets_snp.cpp, focusing on the loop that merges sorted priority classes and assigns m_idxPriorityClass. Reproduce by swapping lane priorities, then check lane status; also try priorities {0, 1, 2} followed by {1, 1, 0} to expose the out-of-bounds case. Done means every lane's class matches the current priorities after each configuration; linked PR #454 is already open.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happens
The docs for ConfigureConnectionLanes say lanes may be reconfigured at any time. When a connection reconfigures its lanes, the lane with the lowest priority value (the one that sorts first) keeps whatever m_idxPriorityClass it had from the previous configuration. Every other lane gets its class index reassigned.
Swapping priorities on two lanes is enough to see it. Lane 1 should now be strictly ahead of lane 0, but it stays in class 1 next to lane 0. Class 0 ends up with no lanes, and the two lanes share bandwidth by weight instead of by priority.
If the stale index is greater than or equal to the new number of priority classes, m_vecPriorityClasses[ l.m_idxPriorityClass ] in the "Setup each lane" loop reads past the end of the vector. For example: priorities { 0, 1, 2 }, then { 1, 1, 0 }. Lane 2 keeps class 2, but there are now only 2 classes.
What should happen
After every call, each lane's priority class should match the priorities passed to that call.
Minimal repro
// hSender from CreateSocketPair( ..., true, ... ), fixed send rate of 128 KB/s
int prio1[2] = { 0, 1 };
ConfigureConnectionLanes( hSender, 2, prio1, nullptr );
int prio2[2] = { 1, 0 };
ConfigureConnectionLanes( hSender, 2, prio2, nullptr );
// queue 64 KB of unreliable messages on each lane, then:
GetConnectionRealTimeStatus( hSender, &status, 2, laneStatus );
Expected: lane 1 queue time is about 500 ms and lane 0 is about 1000 ms.
Actual: both lanes report 1000 ms, because they are scheduled in the same class.
Root cause
In CSteamNetworkConnectionBase::SNP_ConfigureLanes (steamnetworkingsockets_snp.cpp), the loop that merges sorted priority classes starts at j = 1 and only assigns m_idxPriorityClass for pPriorityClass[j]. The entry at sorted position 0 is never assigned. On the first configuration this goes unnoticed, because a newly created lane defaults to class 0. On a later reconfiguration, that lane may already exist with a nonzero class.
- Lenguaje dominante
- C++
- Estrellas
- 10k
- Forks
- 767
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ValveSoftware/GameNetworkingSockets
-
ICE (native client): relay-only connections time out against a real TURN server; host-socket checks starve the relay pairsPosiblemente ocupada @Mr444-dev la tomó hace 4 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
ValveSoftware/GameNetworkingSockets#452 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 4/5 Más de una semana Aptitud para principiantes 12/100
ValveSoftware/GameNetworkingSockets#465 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 18/100
ValveSoftware/GameNetworkingSockets#464 ·
Los mantenedores suelen responder en 2 días
-
Assertion Failed: pSock->m_callback.m_fnCallback (socketthread.cpp:2609) after re-initializing the library with GameNetworkingSockets_Kill + GameNetworkingSockets_InitPosiblemente ocupada @siddiqueirshad la tomó hace 10 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
ValveSoftware/GameNetworkingSockets#458 ·
Los mantenedores suelen responder en 2 días
-
ISteamNetworkingSockets: Trying to use over 8 network lanes/channels failsPosiblemente ocupada @jpggvilaca la tomó hace 14 días. Abierto
Dificultad 4/5 1-2 días Aptitud para principiantes 55/100
ValveSoftware/GameNetworkingSockets#455 ·
Los mantenedores suelen responder en 2 días
Todos los issues de ValveSoftware/GameNetworkingSockets
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Sunrisepeak/mcpp-language-server#80 ·
Los mantenedores suelen responder en 1 día
-
#2754 make deepseek api not workAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
xiaoyifang/goldendict-ng#3148 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
triton-inference-server/server#9069 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 4 días