take ipv4 tcp tracer as an example:
In tracer/tcp_ipv4, TCPTracer.send() make a channel without buffer which is used to receive the result hop.
However, when send() is timeout, the func returns. So there will be no receivers to receive the channel, which causes the channel blocked forever.
The result hop sended to the channel after timeout will block forever too. And the inflightRequestLock never unlocks, causing all the send() goroutines blocked forever and the waitgroup will never done. Then, deadlock.
The same thing occurs in ipv6 tcp and udp tracer too.
This bugfix makes the channel with 1 buffer, which can avoid the send block.
take ipv4 tcp tracer as an example: In tracer/tcp_ipv4, TCPTracer.send() make a channel without buffer which is used to receive the result hop. However, when send() is timeout, the func returns. So there will be no receivers to receive the channel, which causes the channel blocked forever.
The result hop sended to the channel after timeout will block forever too. And the inflightRequestLock never unlocks, causing all the send() goroutines blocked forever and the waitgroup will never done. Then, deadlock.
The same thing occurs in ipv6 tcp and udp tracer too.
This bugfix makes the channel with 1 buffer, which can avoid the send block.