iovisor/bcc
Ver no GitHubIncorrect calculation of recv throughput in tcptop.py
Open
#5.352 aberto em 4 de jul. de 2025
bughelp wanted
Métricas do repositório
- Stars
- (22.409 stars)
- Métricas de merge de PR
- (Mesclagem média 12d 6h) (12 fundiu PRs em 30d)
Description
tcp_cleanup_rbuf is called several times in a loop inside tcp_recvmsg. At the same time, it is passed the accumulated parameter "copied". Thus, the same data is taken into account several times.
int tcp_recvmsg(...) {
...
int copied = 0;
...
do {
...
tcp_cleanup_rbuf(sk, copied);
...
copied += used;
...
} while (len > 0);
tcp_cleanup_rbuf(sk, copied);
return copied;
...
}