[rabbitmq-discuss] RabbitMQ crash caused by channel leak?

Ian Ragsdale ian.ragsdale at gmail.com
Thu Mar 11 20:28:48 GMT 2010


Hello all.  I've had a couple of RabbitMQ crashes recently, with a backtrace that looks like this:

=CRASH REPORT==== 11-Mar-2010::08:13:21 ===
  crasher:
    pid: <0.16638.1>
    registered_name: []
    exception error: a system limit has been reached
      in function  spawn/3
         called as spawn(rabbit_writer,mainloop,
                         [{wstate,#Port<0.451>,6539,131072}])
      in call from rabbit_writer:start/3
      in call from rabbit_reader:send_to_new_channel/3
      in call from rabbit_reader:handle_frame/4
      in call from rabbit_reader:handle_input/3
      in call from rabbit_reader:mainloop/3
      in call from rabbit_reader:start_connection/3
    initial call: rabbit_reader:init(<0.396.0>)
    ancestors: [rabbit_tcp_client_sup,rabbit_sup,<0.109.0>]
    messages: [{'EXIT',<0.31524.15>,
                      {system_limit,
                          [{erlang,spawn_opt,
                               [proc_lib,init_p,
                                [<0.31524.15>,[],gen,init_it,
                                 [gen_server2,<0.31524.15>,<0.31524.15>,
                                  rabbit_channel,
                                  [6528,<0.16638.1>,<0.31519.15>,
                                   <<"stormcloud">>,<<"/">>],
                                  []]],
                                [link]]},
                           {proc_lib,start_link,5},
                           {rabbit_channel,start_link,5},
                           {rabbit_framing_channel,'-start_link/2-fun-0-',2}]}},

<large amount of backtrace, messages, and a huge dictionary full of channels removed>

    trap_exit: true
    status: running
    heap_size: 514229
    stack_size: 23
    reductions: 68039905
  neighbours:


Based on the number of channels in the logged dictionary, I'm guessing I hit a limit on the number of channels, which I'm guessing was the cause of the crash.  Does this sound like a likely cause?  I've identified and removed the code that was creating all the channels, but I'm concerned that it appears to be so easy for a single rogue client to take down the entire server.  Is there a way for me to prevent this?

Thanks,
Ian






More information about the rabbitmq-discuss mailing list