Jamis: Yap. That did the trick. Cool!
Everything works with cap2 just fine. Haven't deployed any real app yet. It would be nice to get a general update/plans on cap2 specifically the "opt-in" stuff. Thanks On Apr 11, 9:12 pm, Jamis Buck <[EMAIL PROTECTED]> wrote: > As a follow up to Ezra's email, I've added a check for the fastthread > library if ruby version 1.8.6 is detected. Let me know if that makes > any difference. It cleared things right up, for me. > > - Jamis > > On Apr 11, 2007, at 7:27 AM, rubdabadub wrote: > > > > > Yes, The deadlock error. I am on OSX 10.4 and ruby 1.8.6 (2007-03-13 > > patchlevel 0) [powerpc-darwin8.9.0] > > and Rails 1.2.3. > > > I am running ruby darwin ports if thats says something .. > > > Cheers > > > On Apr 11, 3:21 pm, Jamis Buck <[EMAIL PROTECTED]> wrote: > >> On Apr 11, 2007, at 5:10 AM, rubdabadub wrote: > > >>> FYI: > > >>> I still receive the rake error. SVN rev - 6512 > > >> The deadlock when running rake, you mean? What ruby version are you > >> using? What is your operating system? > > >> - Jamis > > >>> Cheers > > >>> On Mar 30, 9:40 pm, Jamis Buck <[EMAIL PROTECTED]> wrote: > >>>> Ah! Brilliant, Doug. Thanks for the patch! That cleared the problem > >>>> right up. > > >>>> - Jamis > > >>>> On Mar 30, 2007, at 12:51 PM, Doug Barth wrote: > > >>>>> The problem here is that your signaling thread is signaling > >>>>> before the > >>>>> originating thread has had the chance to wait on the condition. > >>>>> This > >>>>> results in the wait hanging forever waiting for a signal. The > >>>>> fix is > >>>>> to synchronize the creation of the background thread as well. > >>>>> Here's a > >>>>> patch that fixes the issue. I have also removed the Thread.pass > >>>>> calls > >>>>> as they not needed. > > >>>>> Index: gateway.rb > >>>>> ================================================================== > >>>>> = > >>>>> --- gateway.rb (revision 6494) > >>>>> +++ gateway.rb (working copy) > >>>>> @@ -38,18 +38,18 @@ > >>>>> mutex = Mutex.new > >>>>> waiter = ConditionVariable.new > > >>>>> - @thread = Thread.new do > >>>>> - logger.trace "starting connection to gateway > >>>>> `#{server.host}'" if logger > >>>>> - SSH.connect(server, @options) do |@session| > >>>>> - logger.trace "gateway connection established" if logger > >>>>> - Thread.pass > >>>>> - mutex.synchronize { waiter.signal } > >>>>> - @session.loop { [EMAIL PROTECTED] } > >>>>> + mutex.synchronize do > >>>>> + @thread = Thread.new do > >>>>> + logger.trace "starting connection to gateway > >>>>> `#{server.host}'" if logger > >>>>> + SSH.connect(server, @options) do |@session| > >>>>> + logger.trace "gateway connection established" if > >>>>> logger > >>>>> + mutex.synchronize { waiter.signal } > >>>>> + @session.loop do > >>>>> + [EMAIL PROTECTED] > >>>>> + end > >>>>> + end > >>>>> end > >>>>> - end > > >>>>> - mutex.synchronize do > >>>>> - Thread.pass > >>>>> waiter.wait(mutex) > >>>>> end > >>>>> end > > >>>>> On Mar 30, 9:38 am, Jamis Buck <[EMAIL PROTECTED]> wrote: > >>>>>> Yeah...I've not been able to figure that out. It only happens > >>>>>> intermittently to me. If you go into test/gateway_test.rb and > >>>>>> comment > >>>>>> out the > >>>>>> test_initialize_when_connect_lags_should_open_and_set_session_val > >>>>>> ue > >>>>>> test (lines 13-17), it should go away. > > >>>>>> Any threading/concurrency gurus around that would like to help > >>>>>> explain what I'm doing wrong? It only seems to affect the tests; > >>>>>> Capistrano itself hasn't seemed to be impacted by this. > > >>>>>> - Jamis > > >>>>>> P.S. Good to see some people starting to play with cap2! > > >>>>>> On Mar 30, 2007, at 8:29 AM, rubdabadub wrote: > > >>>>>>> Hi: > > >>>>>>> I am just wondering what does this mean.. I get when i run the > >>>>>>> tests > > >>>>>>> ................................................................ > >>>>>>> .. > >>>>>>> .. > >>>>>>> .. > >>>>>>> ...................................................deadlock > >>>>>>> 0x14bc084: sleep:- - ./test/cli/../../lib/capistrano/ > >>>>>>> gateway.rb:46 > >>>>>>> deadlock 0x31704: sleep:- (main) - ./test/cli/../../lib/ > >>>>>>> capistrano/ > >>>>>>> gateway.rb:53 > > >>>>>>> Does it mean I am missing something or?? > > >>>>>>> Thanks --~--~---------~--~----~------------~-------~--~----~ To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/capistrano -~----------~----~----~----~------~----~------~--~---