Hi team, we met an error snappy: corrupt input while using snappy to compress through a TCP connection.
How we build the connection:
On the source side:
conn.reader = snappy.NewReader(io.Reader(net.Conn))
conn.writeCloser = snappy.NewBufferedWriter(io.WriteCloser(net.Conn))
conn.Write(buf)
On the destination side:
conn.reader = snappy.NewReader(io.Reader(net.Conn))
conn.writeCloser = snappy.NewBufferedWriter(io.WriteCloser(net.Conn))
conn.Read(buf)
We get the error snappy: corrupt input when conn.Read(buf). And this error happens intermittently.
Is this caused by network problem?
We read some snappy code, and we know that this error is reported because the checksum or the decode result length is wrong. But we use snappy based on a TCP connection and TCP can guarantee data integrity. So if snappy needs several network packages to decode the complete data? Or this is caused by some problem with the network card, the hardware cannot verify the data correctly.
Is this caused by memory problem?
I also find some discussions on the network that suspect this is caused by memory overflow or runtime memory limit not enough. But I cannot make sure. Since we don't get any other error messages.
I'd appreciate any help or suggestions on how to debug. Thanks!
Hi team, we met an error
snappy: corrupt inputwhile using snappy to compress through a TCP connection.How we build the connection:
On the source side:
On the destination side:
We get the error
snappy: corrupt inputwhenconn.Read(buf). And this error happens intermittently.Is this caused by network problem?
We read some snappy code, and we know that this error is reported because the checksum or the decode result length is wrong. But we use snappy based on a TCP connection and TCP can guarantee data integrity. So if snappy needs several network packages to decode the complete data? Or this is caused by some problem with the network card, the hardware cannot verify the data correctly.
Is this caused by memory problem?
I also find some discussions on the network that suspect this is caused by memory overflow or runtime memory limit not enough. But I cannot make sure. Since we don't get any other error messages.
I'd appreciate any help or suggestions on how to debug. Thanks!