Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

Gem hangs forever after starting SC #316

Closed
bootstraponline opened this issue May 5, 2015 · 3 comments
Closed

Gem hangs forever after starting SC #316

bootstraponline opened this issue May 5, 2015 · 3 comments

Comments

@bootstraponline
Copy link
Contributor

I see [Sauce Connect is connecting to Sauce Labs...] then the sauce_ruby gem hangs forever. There is zero debugging information to determine what's going wrong.

Does Sauce have any large tests verified with CI to prove that the entire gem isn't super flaky?

/Users/user/.rvm/gems/ruby-2.2.2/gems/parallel-1.4.1/lib/parallel.rb:406:in `block in trap_interrupt'
/Users/user/.rvm/gems/ruby-2.2.2/gems/parallel-1.4.1/lib/parallel.rb:353:in `call'
/Users/user/.rvm/gems/ruby-2.2.2/gems/parallel-1.4.1/lib/parallel.rb:353:in `join'
/Users/user/.rvm/gems/ruby-2.2.2/gems/parallel-1.4.1/lib/parallel.rb:353:in `block in wait_for_threads'
/Users/user/.rvm/gems/ruby-2.2.2/gems/parallel-1.4.1/lib/parallel.rb:351:in `map'
/Users/user/.rvm/gems/ruby-2.2.2/gems/parallel-1.4.1/lib/parallel.rb:351:in `wait_for_threads'
/Users/user/.rvm/gems/ruby-2.2.2/gems/parallel-1.4.1/lib/parallel.rb:142:in `block in in_threads'
/Users/user/.rvm/gems/ruby-2.2.2/gems/parallel-1.4.1/lib/parallel.rb:394:in `kill_on_ctrl_c'
/Users/user/.rvm/gems/ruby-2.2.2/gems/parallel-1.4.1/lib/parallel.rb:142:in `in_threads'
/Users/user/.rvm/gems/ruby-2.2.2/gems/parallel-1.4.1/lib/parallel.rb:241:in `work_in_threads'
/Users/user/.rvm/gems/ruby-2.2.2/gems/parallel-1.4.1/lib/parallel.rb:191:in `map'
/Users/user/.rvm/gems/ruby-2.2.2/gems/parallel_tests-1.3.7/lib/parallel_tests/cli.rb:24:in `block in execute_in_parallel'
/Users/user/.rvm/gems/ruby-2.2.2/gems/parallel_tests-1.3.7/lib/parallel_tests/cli.rb:23:in `execute_in_parallel'
/Users/user/.rvm/gems/ruby-2.2.2/gems/sauce_ruby-3.5.6/lib/parallel_tests/cli_patch.rb:13:in `block in run_tests_in_parallel'
/Users/user/.rvm/gems/ruby-2.2.2/gems/parallel_tests-1.3.7/lib/parallel_tests/cli.rb:197:in `block in report_time_taken'
/Users/user/.rvm/gems/ruby-2.2.2/gems/parallel_tests-1.3.7/lib/parallel_tests.rb:70:in `delta'
/Users/user/.rvm/gems/ruby-2.2.2/gems/parallel_tests-1.3.7/lib/parallel_tests/cli.rb:197:in `report_time_taken'
/Users/user/.rvm/gems/ruby-2.2.2/gems/sauce_ruby-3.5.6/lib/parallel_tests/cli_patch.rb:6:in `run_tests_in_parallel'
/Users/user/.rvm/gems/ruby-2.2.2/gems/parallel_tests-1.3.7/lib/parallel_tests/cli.rb:16:in `run'
/Users/user/.rvm/gems/ruby-2.2.2/gems/sauce_ruby-3.5.6/lib/tasks/parallel_testing.rb:80:in `run_parallel_tests'
/Users/user/.rvm/gems/ruby-2.2.2/gems/sauce_ruby-3.5.6/lib/tasks/parallel_testing.rb:11:in `block (2 levels) in <top (required)>'
@bootstraponline
Copy link
Contributor Author

I added dynamic tracing of the source code and found that the sauce gem is stuck in an infinite loop. This shouldn't happen and it's not acceptable for production code. Infinite looping is a basic programming error. I have another demo tomorrow and it doesn't look great if SC is failing.

# https://github.com/saucelabs/sauce_ruby/blob/aebd4e7bb1e838c201fc907406c6cf2761fb5bf3/lib/sauce/parallel.rb#L12
while not File.exist? "sauce_connect.ready"
  sleep 0.5
end
require 'trace_files'

sauce_ruby_files = Dir.glob('/Users/user/.rvm/gems/ruby-2.2.2/gems/sauce-3.5.6/**/*.rb')
TraceFiles.set trace: sauce_ruby_files
github successfully loads once (FAILED - 1)
          Sauce::RSpec.stop_tools
      def self.stop_tools
        Sauce::Utilities::Connect.close
      def self.close
        if @tunnel
          if ParallelTests.first_process?
            ParallelTests.wait_for_other_processes_to_finish
          while not File.exist? "sauce_connect.ready"
            sleep 0.5
          while not File.exist? "sauce_connect.ready"
            sleep 0.5
          while not File.exist? "sauce_connect.ready"
            sleep 0.5
          while not File.exist? "sauce_connect.ready"
            sleep 0.5
          while not File.exist? "sauce_connect.ready"
            sleep 0.5
          while not File.exist? "sauce_connect.ready"
            sleep 0.5
          while not File.exist? "sauce_connect.ready"
            sleep 0.5
          while not File.exist? "sauce_connect.ready"
            sleep 0.5
          while not File.exist? "sauce_connect.ready"
            sleep 0.5
          while not File.exist? "sauce_connect.ready"
            sleep 0.5
          while not File.exist? "sauce_connect.ready"
            sleep 0.5
          while not File.exist? "sauce_connect.ready"
            sleep 0.5
          while not File.exist? "sauce_connect.ready"
            sleep 0.5
          while not File.exist? "sauce_connect.ready"
            sleep 0.5
          while not File.exist? "sauce_connect.ready"
            sleep 0.5
          while not File.exist? "sauce_connect.ready"
            sleep 0.5
          while not File.exist? "sauce_connect.ready"
            sleep 0.5
          while not File.exist? "sauce_connect.ready"
            sleep 0.5
          while not File.exist? "sauce_connect.ready"
            sleep 0.5
          while not File.exist? "sauce_connect.ready"
            sleep 0.5
          while not File.exist? "sauce_connect.ready"
            sleep 0.5
          while not File.exist? "sauce_connect.ready"
            sleep 0.5
          while not File.exist? "sauce_connect.ready"
            sleep 0.5

@jlipps
Copy link
Contributor

jlipps commented May 5, 2015

yikes, sounds like the gem needs some work

@timothyjoh
Copy link

Definitely seeing the same things here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants