From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: * X-Spam-ASN: AS33070 50.56.128.0/17 X-Spam-Status: No, score=1.8 required=3.0 tests=FROM_LOCAL_NOVOWEL, MSGID_FROM_MTA_HEADER,RDNS_NONE shortcircuit=no autolearn=no version=3.3.2 Path: news.gmane.org!not-for-mail From: Thorsten von Eicken Newsgroups: gmane.comp.lang.ruby.rainbows.general Subject: Re: HUP restart is delayed by 2 minutes Date: Mon, 17 Mar 2014 14:23:46 -0700 Organization: RightScale, Inc. Message-ID: <532767E2.70509@rightscale.com> References: <52E89997.6020504@rightscale.com> <20140129070259.GA5938@dcvr.yhbt.net> <52E8AD1B.8090009@rightscale.com> <20140129083147.GA26652@dcvr.yhbt.net> <52E9607A.60107@rightscale.com> <20140129220352.GA24393@dcvr.yhbt.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1395091772 12461 80.91.229.3 (17 Mar 2014 21:29:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Mar 2014 21:29:32 +0000 (UTC) Cc: Rainbows! list To: Eric Wong Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Mon Mar 17 22:29:42 2014 Return-path: Envelope-to: gclrrg-rainbows-talk@m.gmane.org X-Original-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Delivered-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Greylist: delayed 352 seconds by postgrey-1.31 at rubyforge; Mon, 17 Mar 2014 21:29:34 UTC X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:organization:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=cOWlVNC3n3WxAJktZsSLWOicJ++Dkgx4Jn9K2nT/SqU=; b=VfE71nMs4c7aY4xE9PJzXFnT5/6qdJ9wfYgN2XfdqsumWCfdnlyMUuxt9u/IJuVn7V 90OyzlBAIRmdUHxxe77TnITV+k+xBo7YHRLrfV6u77T5vOigu38Jjf09OAaCpSn8Yey7 qNENYioQUQgRgx51r/NYN7UJt0hKg93RIXylCBGnuj6e0zuZK5ZCWunTzNkf/zSCYT/9 tr4olL41NhOnq3QAXAP8yI3hjhR4udzdgEmBscdVBpdTpoBvfTNFrf1oCEkkY0vF7mVR l1qZiNNXFI06FRClaOLaxH+lDNp2HAth21q1LukAEkcenNwv/drHCPih7jvxhCnO5BZ2 JRdg== X-Gm-Message-State: ALoCoQk4QWUFXt0yn41R+nNQaUIg7K+73COVE4olpM/ZDdEKV2PkiRrUIMzPzlVB0Ie++MBi/Ty3 X-Received: by 10.66.232.7 with SMTP id tk7mr28858796pac.94.1395091417414; Mon, 17 Mar 2014 14:23:37 -0700 (PDT) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 In-Reply-To: <20140129220352.GA24393-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org> X-Enigmail-Version: 1.6 X-BeenThere: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Errors-To: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Broken-Reverse-DNS: no host name found for IP address 50.56.192.79 Xref: news.gmane.org gmane.comp.lang.ruby.rainbows.general:592 Archived-At: Received: from [50.56.192.79] (helo=rubyforge.org) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WPf6L-0003y6-H4 for gclrrg-rainbows-talk@m.gmane.org; Mon, 17 Mar 2014 22:29:41 +0100 Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 29E472E18A; Mon, 17 Mar 2014 21:29:41 +0000 (UTC) Received: from mail-pb0-f49.google.com (mail-pb0-f49.google.com [209.85.160.49]) by rubyforge.org (Postfix) with ESMTP id 1B3862E183 for ; Mon, 17 Mar 2014 21:29:34 +0000 (UTC) Received: by mail-pb0-f49.google.com with SMTP id jt11so6186200pbb.8 for ; Mon, 17 Mar 2014 14:29:32 -0700 (PDT) Received: from [192.168.0.2] (sb0-cf9a657f.dsl.impulse.net. [207.154.101.127]) by mx.google.com with ESMTPSA id id10sm46125249pbc.35.2014.03.17.14.23.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Mar 2014 14:23:36 -0700 (PDT) Thanks for the 4.6.1 update. I pulled it a few weeks ago, but I am still having problems with the rainbows restart and EM. I pretty consistently get a segfault: /var/lib/gems/1.9.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187: [BUG] Segmentation fault ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux] -- Control frame information ----------------------------------------------- c:0014 p:---- s:0064 b:0064 l:000063 d:000063 CFUNC :run_machine c:0013 p:0325 s:0061 b:0061 l:000060 d:000060 METHOD /var/lib/gems/1.9.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187 c:0012 p:0304 s:0054 b:0054 l:0008e8 d:0008e8 METHOD /var/lib/gems/1.9.1/gems/rainbows-4.6.1/lib/rainbows/event_machine.rb:86 c:0011 p:0103 s:0047 b:0047 l:000046 d:000046 METHOD /var/lib/gems/1.9.1/gems/rainbows-4.6.1/lib/rainbows/http_server.rb:45 c:0010 p:0146 s:0041 b:0041 l:000040 d:000040 METHOD /var/lib/gems/1.9.1/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:521 c:0009 p:0252 s:0034 b:0034 l:000033 d:000033 METHOD /var/lib/gems/1.9.1/gems/rainbows-4.6.1/lib/rainbows/http_server.rb:61 c:0008 p:0058 s:0030 b:0030 l:000029 d:000029 METHOD /var/lib/gems/1.9.1/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:532 c:0007 p:0347 s:0026 b:0026 l:000025 d:000025 METHOD /var/lib/gems/1.9.1/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:290 c:0006 p:0264 s:0019 b:0019 l:001f28 d:001f28 TOP /var/lib/gems/1.9.1/gems/rainbows-4.6.1/bin/rainbows:127 c:0005 p:---- s:0013 b:0013 l:000012 d:000012 FINISH c:0004 p:---- s:0011 b:0011 l:000010 d:000010 CFUNC :load c:0003 p:0127 s:0007 b:0007 l:000ae8 d:002080 EVAL /var/lib/gems/1.9.1/bin/rainbows:19 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:0000 s:0002 b:0002 l:000ae8 d:000ae8 TOP -- Ruby level backtrace information ---------------------------------------- /var/lib/gems/1.9.1/bin/rainbows:19:in `
' /var/lib/gems/1.9.1/bin/rainbows:19:in `load' /var/lib/gems/1.9.1/gems/rainbows-4.6.1/bin/rainbows:127:in `' /var/lib/gems/1.9.1/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:290:in `join' /var/lib/gems/1.9.1/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:532:in `maintain_worker_count' /var/lib/gems/1.9.1/gems/rainbows-4.6.1/lib/rainbows/http_server.rb:61:in `spawn_missing_workers' /var/lib/gems/1.9.1/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:521:in `spawn_missing_workers' /var/lib/gems/1.9.1/gems/rainbows-4.6.1/lib/rainbows/http_server.rb:45:in `worker_loop' /var/lib/gems/1.9.1/gems/rainbows-4.6.1/lib/rainbows/event_machine.rb:86:in `worker_loop' /var/lib/gems/1.9.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run' /var/lib/gems/1.9.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine' -- C level backtrace information ------------------------------------------- /var/lib/gems/1.9.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187: [BUG] Segmentation fault ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux] I'm happy to provide additional information, if useful! Cheers, Thorsten On 1/29/2014 2:03 PM, Eric Wong wrote: > Thanks! Can you try this? Sorry I haven't maintained EM support > well, I forgot some versions were broken under Ruby 2.x :x > > (also "gem install --pre -v 4.6.0.4.g4108 rainbows" should work) > > --- a/lib/rainbows/event_machine.rb > +++ b/lib/rainbows/event_machine.rb > @@ -88,7 +88,17 @@ module Rainbows::EventMachine > raise RuntimeError, "EM @conns instance variable not accessible!" > Rainbows::EventMachine::Server.const_set(:CUR, conns) > Rainbows.at_quit do > - EM.next_tick { conns.each_value { |c| client_class === c and c.quit } } > + EM.next_tick do > + LISTENERS.clear > + conns.each_value do |c| > + case c > + when client_class > + c.quit > + when Rainbows::EventMachine::Server > + c.detach > + end > + end > + end > end > EM.add_periodic_timer(1) do > EM.stop if ! Rainbows.tick && conns.empty? && EM.reactor_running? > _______________________________________________ Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org http://rubyforge.org/mailman/listinfo/rainbows-talk Do not quote signatures (like this one) or top post when replying