Code Monkey home page Code Monkey logo

Comments (12)

peterwilson avatar peterwilson commented on July 23, 2024

@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.

michaelklishin avatar michaelklishin commented on July 23, 2024

@Inanepenguin's hypothesis sounds realistic

from amqp.

peterwilson avatar peterwilson commented on July 23, 2024

@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.

michaelklishin avatar michaelklishin commented on July 23, 2024

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.

relonger avatar relonger commented on July 23, 2024

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.

michaelklishin avatar michaelklishin commented on July 23, 2024

@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.

relonger avatar relonger commented on July 23, 2024

This commit dd0b2de seems to solve the problem.

from amqp.

michaelklishin avatar michaelklishin commented on July 23, 2024

@relonger I cherry-picked 02a9298 to master, please give it a try.

from amqp.

maattdd avatar maattdd commented on July 23, 2024

Could you release a 1.6.1 with this commit included ?

from amqp.

michaelklishin avatar michaelklishin commented on July 23, 2024

@maattdd do you confirm that the issue is gone in master?

from amqp.

maattdd avatar maattdd commented on July 23, 2024

@michaelklishin yes I confirm this bug is in 1.6.0 but fixed in master.

from amqp.

michaelklishin avatar michaelklishin commented on July 23, 2024

@maattdd I released a 1.7.0.

from amqp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.