Code Monkey home page Code Monkey logo

amqp-forkio-repro's Introduction

AMQP dangerous forkio repro

First, set up a ramitmq server locally.

Then run stack exec worker-exe in one terminal. And stack exec sender-exe in another.

You'll see this in the sender:

$ stack exec sender-exe
starting sender.
Sending two test messages
sender done.
Auto-closing the channel because we got: Left (ChanThreadKilledException {cause = ConnectionClosedException Normal "closed by user"})

You'll see this in the worker:

$ stack exec worker-exe
starting worker.
worker listening.
Auto-closing the channel because we got: Left didn't expect frame: HeartbeatPayload
 syd@nona  ~/src/amqp-forkio-repro  4  stack exec worker-exe
starting worker.
worker listening.
Auto-closing the channel because we got: Left didn't expect frame: HeartbeatPayload
CallStack (from HasCallStack):
  error, called at ./Network/AMQP/Internal.hs:116:14 in amqp-0.20.0.1-KTo8izWmHUKDlj6V7B3Ee5:Network.AMQP.Internal
ERROR: channel not open 1
ERROR: channel not open 1
ERROR: channel not open 1
ERROR: channel not open 1
ERROR: channel not open 1
ERROR: channel not open 1

As you can see, the worker has not crashed, even if the channel thread has crashed. The channel is considered closed because it's being auto-closed upon an exception, but messages are still being routed there.

amqp-forkio-repro's People

Watchers

 avatar  avatar  avatar

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.