Occasional stream corruption
MikeQ
michaelquilleash at hotmail.com
Thu Nov 19 07:15:59 EST 2009
Trustin Lee wrote:
>
> If you write messages from multiple threads, the order of the write
> requests will be mixed. However, the content of each write request
> should never get mixed. That is, if you write "AB" and "CD" from two
> threads, the resulting output could be either "ABCD" or "CDAB", while
> "BACD", "ABDC", "CDBA", and "DCAB" are impossible. If you are seeing
> the abnormal corruption, please let me know. I'd like to investigate
> further with more information.
>
Thanks for the reply.
Understood, but I am only using a single thread to write the reply. I do
write the response in "pieces" so there may be several calls to write() per
complete response but if ordering of write() implies physical ordering of
data this should be working ok.
The problem is tough to reproduce as it is pretty random and only happens
occasionally.
I'll try and get some more info and come back to you.
I think I need to drop some debugging helper in to trace the raw content
going through the handlers. If I insert a handler into the downstream chain
can I just log out the raw bytes and see if I can isolate the issue by
inspecting the packets? Without otherwise disturbing the flow of the
traffic?
Cheers.
--
View this message in context: http://n2.nabble.com/Occasional-stream-corruption-tp3993030p4031489.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list