Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PeriodicPoller::JVM load average on linux when an exception occur reading the file doesn't raise an exception #6549

Closed
colinsurprenant opened this issue Jan 17, 2017 · 4 comments
Assignees

Comments

@colinsurprenant
Copy link
Contributor

Got this intermittent failure on my PR Travis tests.
https://travis-ci.org/elastic/logstash/jobs/192806190

 1) LogStash::Instrument::PeriodicPoller::JVM load average on linux when an exception occur reading the file doesn't raise an exception
     Failure/Error: expect(::File).to receive(:read).with("/proc/loadavg").and_raise("Didnt work out so well")
       (<File (class)>).read("/proc/loadavg")
           expected: 1 time with arguments: ("/proc/loadavg")
           received: 2 times with arguments: ("/proc/loadavg")
     # ./logstash-core/spec/logstash/instrument/periodic_poller/jvm_spec.rb:47:in `(root)'
     # ./vendor/bundle/jruby/1.9/gems/rspec-wait-0.0.9/lib/rspec/wait.rb:46:in `(root)'
     # ./rakelib/test.rake:49:in `(root)'
     # ./vendor/bundle/jruby/1.9/gems/rake-12.0.0/lib/rake/task.rb:250:in `execute'
     # ./vendor/bundle/jruby/1.9/gems/rake-12.0.0/lib/rake/task.rb:250:in `execute'
     # ./vendor/bundle/jruby/1.9/gems/rake-12.0.0/lib/rake/task.rb:194:in `invoke_with_call_chain'
     # ./vendor/bundle/jruby/1.9/gems/rake-12.0.0/lib/rake/task.rb:187:in `invoke_with_call_chain'
     # ./vendor/bundle/jruby/1.9/gems/rake-12.0.0/lib/rake/task.rb:180:in `invoke'
     # ./vendor/bundle/jruby/1.9/gems/rake-12.0.0/lib/rake/application.rb:152:in `invoke_task'
     # ./vendor/bundle/jruby/1.9/gems/rake-12.0.0/lib/rake/application.rb:108:in `top_level'
     # ./vendor/bundle/jruby/1.9/gems/rake-12.0.0/lib/rake/application.rb:108:in `top_level'
     # ./vendor/bundle/jruby/1.9/gems/rake-12.0.0/lib/rake/application.rb:117:in `run_with_threads'
     # ./vendor/bundle/jruby/1.9/gems/rake-12.0.0/lib/rake/application.rb:102:in `top_level'
     # ./vendor/bundle/jruby/1.9/gems/rake-12.0.0/lib/rake/application.rb:80:in `run'
     # ./vendor/bundle/jruby/1.9/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
     # ./vendor/bundle/jruby/1.9/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
     # ./vendor/bundle/jruby/1.9/gems/rake-12.0.0/exe/rake:27:in `(root)'
Finished in 3 minutes 25.3 seconds (files took 6.15 seconds to load)
2148 examples, 1 failure
Failed examples:
rspec ./logstash-core/spec/logstash/instrument/periodic_poller/jvm_spec.rb:50 # LogStash::Instrument::PeriodicPoller::JVM load average on linux when an exception occur reading the file doesn't raise an exception
Randomized with seed 31247
@ph
Copy link
Contributor

ph commented Jan 18, 2017

My theories

  • either we have a background rogue agent running that make the mock fails
  • Or some linux only test case are conflicting.

The same seed doesn't raise the problem on mac, trying on linux.

@ph
Copy link
Contributor

ph commented Jan 18, 2017

Ran this suite with the same seed multiple time on linux / mac without reproducing it, so this lead me to believe that we effectively have a rogue agent/pipeline running.

@ph
Copy link
Contributor

ph commented Jan 18, 2017

I took some time to investigate it, this is a symptom of another problem, I am pretty sure we have a periodic poller in the background started by the agent and doing some work and because of timing it can make this mock fails.

Refactoring the agent with #6455 will make sure the poller/webserver are only started when really needed. but we also need to make sure that correctly shutdown the classes.

@jsvd
Copy link
Member

jsvd commented Jan 20, 2017

this is a dup of #6354

@jsvd jsvd closed this as completed Jan 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants