Open lukashes opened 4 years ago
What was the problem? Here is a theory: while MarshalToSizedBuffer() is performing it's magic the structure is being modified in another thread .
@larytet yes, I think that's what's happening too, because we're having this problem as well. Is there a way to work around?
Got the same issue :/
Am on the latest version and am getting the exact same panic as OP. index out of range [-1]. The data I was trying to send was also pretty large and I'm getting this error like once every x hours. (95% of the time I don't get the error and everything works as it should work)
@003random Make sure that the data is not being modified while the MarshalToSizedBuffer() performs serialization. The most likely reason is that one thread called MarshalToSizedBuffer(data) and another thread in the same time modifies one of the buffers in the "data".
gogofaster is non-thread-safe
I suggest to close the issue. This is not a problem with the protobuf serialization.
When I wrote the issue, I used serialization in one thread. And I did not expect this kind of problem.
But issue is not actual for me, because I do not use protobuf now and can't confirm or refute problem is not reproduced. I think we can close issue already.
When I wrote the issue, I used serialization in one thread. And I did not expect this kind of problem.
But issue is not actual for me, because I do not use protobuf now and can't confirm or refute problem is not reproduced. I think we can close issue already.
The likely scenario:
Hi! I have panic in production really frequent now.
I am using prototool from Uber to build my pb-files with this configuration:
Stack:
And several times per one day I can see panic:
Entity is really big structure I can't post it here. Do you have any ideas whats wrong?