-
Notifications
You must be signed in to change notification settings - Fork 591
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
BasicGetResult body memory safety in 6.x #994
Comments
This is a |
Yep, I'm aware of this and it's fine for consumers which receive messages via push from broker. I would like to stress that it looks like there is no way to safely use |
We'd have to investigate how much changed already between 6.x and #919, in general though, it should be possible. One thing though is that |
I would accept #995 me too, because it's easier, and then wait the better fix coming from 8.x |
Fine by me 👍🏼 |
Hi, I'm encountering this issue too. |
Apparently my issue was different - it had been passing the body between different threads which resulted in the data getting garbaged. |
The fix was released as part of 6.2.2. |
Hi,
It looks I've accidentally found an amusing bug. Let me start from this example(by the way, I'm using v6.2.1):
After a couple of seconds mismatches have been found:
An array under
BasicGetResult.Body
was reused.The reason of it might be the following: after a completion of BasicGet RPC continuation, a command is disposed and an array under
BasicGetResult.Body
is returned toArrayPool
. This makes usage ofBasicGetResult.Body
unpredictable at least(EasyNetQ/EasyNetQ#1153) because it is unsafe to useBasicGetResult.Body
right aftermodel.BasicGet
returns it.It looks like the only fix is to copy a body a bit before a completion of a continuation.
Could you please confirm the issue?
The text was updated successfully, but these errors were encountered: