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

Investigate InvalidProtocolBufferException #1115

Open
ManfredKarrer opened this issue Dec 21, 2017 · 7 comments
Open

Investigate InvalidProtocolBufferException #1115

ManfredKarrer opened this issue Dec 21, 2017 · 7 comments

Comments

@ManfredKarrer
Copy link
Member

We get from time to time InvalidProtocolBufferExceptions like the one below.
It might be non critical and caused due network diconnections but would be good to investigate what causes them and find out more about that.

com.google.protobuf.InvalidProtocolBufferException: While parsing a protocol message, the input ended unexpectedly in the middle of a field. This could mean either that the input has been truncated or that an embedded message misreported its own length.
at com.google.protobuf.InvalidProtocolBufferException.truncatedMessage(InvalidProtocolBufferException.java:82)
at com.google.protobuf.CodedInputStream$StreamDecoder.readRawBytesSlowPath(CodedInputStream.java:2803)
at com.google.protobuf.CodedInputStream$StreamDecoder.readBytes(CodedInputStream.java:2336)
at io.bisq.generated.protobuffer.PB$ProtectedStorageEntry.(PB.java:43287)

@ManfredKarrer
Copy link
Member Author

@tau3 Do you have idea what causes that? It might have been a result of a connection loss during PB parsing and maybe it was related to your recent fix in the Connection class?

@tau3
Copy link
Contributor

tau3 commented Feb 5, 2018

@ManfredKarrer i'm not sure actually. Should we add trace logging calls where proto is written to output streams? At least we will be able to see actual message and reported size.

@ManfredKarrer
Copy link
Member Author

@tau3 It might be that it just happens when network connection breaks. I saw it in dev mode when I kill the app without proper shutdown.
I will be hard to trace with logs as it does not happen often and then there will be a lot of log data. But you can try... but anyway was not super critical, just was wondering if you might have stumbled over such an exception in other projects...

@stale
Copy link

stale bot commented Jan 17, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@ManfredKarrer
Copy link
Member Author

Still relevant

@ghubstan
Copy link
Member

ghubstan commented Aug 3, 2019

I've seen this problem before while working with Hadoop, HBase, and a proprietary, distributed OLAP engine. Network failures often coincided with the exception.

I wondered if instrumenting protobuf's generated classes in a way that could provide more info about the causes of these exceptions was possible, but it seems not, and probably not a good idea anyway.

I see non-proto generated Bisq code catches InvalidProtocolBufferExceptions in one place: bisq.network.crypto.EncryptionService.java. Do you think detecting and reporting Socket problems in that and other catch blocks that might be handling bubbled up Throwables would be possible and useful in determining if these exceptions always or usually occur after network failures?

@ghost
Copy link

ghost commented Aug 5, 2019

If helpful, see my weekly report(s) about pricenodes monitoring.
edit: oups, forgot the link -> bisq-network/roles#10 (comment)
It has also link to detailed data.

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

No branches or pull requests

5 participants
@ripcurlx @ManfredKarrer @tau3 @ghubstan and others