Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tcp readed data has other bytes than expected #257

Open
eschgi opened this issue Jan 30, 2018 · 4 comments
Open

tcp readed data has other bytes than expected #257

eschgi opened this issue Jan 30, 2018 · 4 comments

Comments

@eschgi
Copy link

eschgi commented Jan 30, 2018

Hello,

in our company we use your library in our python services to manage our tcp connections. Actually we have a very strange problem and we do not know exactly from which layer the problem is caused.

From our analytics the problem could be produced by our code or the pyuv library or the libuv library.

We receive following piece of data from the tcp socket:

{"LM":0,"FTT":0.515,"TU1":0.515,"TU2":\xd8\xee\x8c\x03"ENTNAHME":null,"WT":0,"ARTICLEID":172,"NET":0.524,"TO2":0.0,"TO1":0.545,"TARE":0.018,"QN":0.515}

This payload should be a json document, but the value of TU2 was replaced by this value: \xd8\xee\x8c\x03. This value was logged with repr(). The real value is 4 Bytes long.

What we have found out that every time when this error occurs 4 Bytes are replaced with a wrong value. The big problem is that we can't reproduce the error.

So my question is if it is possible to update the pyuv library to the latest libuv version.
So we could test the new version and check if the error still exists.

Our used os is WINDOWS!

Thank you and kind regards!

@saghul
Copy link
Owner

saghul commented Jan 30, 2018

Hi!

I doubt the libuv version has anything to do with this problem. Where do those 4 bytes come from? What encoding is that string using? Any chance you can take a packet capture with Wireshark to analyze it?

Cheers!

@eschgi
Copy link
Author

eschgi commented Jan 30, 2018

Hi!

Thanks for the quick response. We have already done a wireshark packet capture. What we have seen is that the packets are correct in the wireshark packet capture. When we then read the data from the socket, the data is wrong.

We don't know where this 4 bytes are come from =(! Encoding is UTF-8.

Cheers!

@saghul
Copy link
Owner

saghul commented Jan 30, 2018

Ohai! Any chance you can share a packet capture? Also, can you reproduce the bug by simulating the payload?

@eschgi
Copy link
Author

eschgi commented Jan 31, 2018

No, we can't reproduce the bug. I can share the packet capture, but i think it would not help much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants