Comments (12)
@alexnorthsoul in what context does this happen? A BodyFrame is not supposed to be the first frame in the buffer (from my understanding). I was fighting this issue myself today.
For me, an exception was thrown on the callback block of the first message received, causing the channel's buffer to not be cleared by this line:
clear_frames_on(frame.channel) if @frames[frame.channel]
in #receive_frame
. So each subsequent message received on that channel would call first_frame.method_class
on the leftover BodyFrame.
I was about to submit an issue myself but just saw yours.
My thought is that #receive_frameset
should have some sort of assurance of cleanup. Even if one of my messages blows out the top of the call stack, AMQP shouldn't leave itself in a bad state.
Anywhere you call user specified code without a guaranteed cleanup there can be bugs like the one outlined above.
from amqp.
@Inanepenguin's hypothesis sounds realistic
from amqp.
@michaelklishin any chance the "graceful cleanup" in #receive_format
could make it in? I can look into trying to submit a PR, I'd have to come up to speed on the style/best practice for the repo. Like I said, I was about to open an issue myself as this just happened to me today. Very coincidental timing!
from amqp.
Feel free to submit a PR, thank you.
On 1 oct 2015, at 11:32, Peter Wilson [email protected] wrote:
@michaelklishin any chance the "graceful cleanup" in #receive_format could make it in? I can look into trying to submit a PR, I'd have to come up to speed on the style/best practice for the repo. Like I said, I was about to open an issue myself as this just happened to me today. Very coincidental timing!
—
Reply to this email directly or view it on GitHub.
from amqp.
The issue is still exists in gem 1.6.0 but solved in 1.5.1. Do you plan to update 1.6.x gem ?
from amqp.
@relonger that's curious. What specific commit is in 1.5.x-stable
but not master? Happy to release a new 1.6.x
version later today or tomorrow.
from amqp.
This commit dd0b2de seems to solve the problem.
from amqp.
@relonger I cherry-picked 02a9298 to master, please give it a try.
from amqp.
Could you release a 1.6.1 with this commit included ?
from amqp.
@maattdd do you confirm that the issue is gone in master?
from amqp.
@michaelklishin yes I confirm this bug is in 1.6.0 but fixed in master.
from amqp.
@maattdd I released a 1.7.0
.
from amqp.
Related Issues (20)
- Check if queue exists HOT 1
- Multiple server-named queues after auto_recovery HOT 3
- Connecting to a durable queue by name with wrong keyword args should error HOT 3
- channel.on_error callback is deleted after recovery HOT 5
- undefined method next_channel_id error in channel.reuse method HOT 3
- Make AMQP::Queue.generate_consumer_tag to use self.class.consumer_class.tag_generator HOT 1
- amq-protocol 2.0.0 requires ruby 2.0 HOT 4
- http_proxy paramater is not provided in AMQP connection
- Emit more specific error than `[amqp] Detected TCP connection failure` HOT 5
- Outer variables are not available in Channel scope due to block.call HOT 4
- Can I set multiple hosts to option of connection like bunny? HOT 2
- Problem with ssl HOT 3
- Does add_periodic_timer() executes its block when system time changes HOT 1
- Changes in the behavior regarding cancel callback execution. HOT 3
- Doc reference URL has gone away HOT 1
- attributes defined twice HOT 1
- AMQP doesn't share AMQ::Settings HOT 4
- release? HOT 2
- Client connections to RabbitMQ do not verify the server's certificate or hostname HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amqp.