Skip to content

Handle infinity timeout when awaiting boot finish #2144

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

Merged
merged 1 commit into from
Oct 17, 2019

Conversation

michaelklishin
Copy link
Collaborator

@michaelklishin michaelklishin commented Oct 17, 2019

Proposed Changes

rabbitmqctl await_startup can fail with an exception that looks like this:

Error:
{:badarith, [{:erlang, :div, [:infinity, 100], []}, {:rabbit, :wait_for_boot_to_finish, 3, [file: 'src/rabbit.erl', line: 787]}, {:rpc, :"-handle_call_call/6-fun-0-", 5, [file: 'rpc.erl', line: 197]}]}

when timeout ends up being infinity in the function that awaits boot completion by periodically checking every N milliseconds.

Spotted by @lukebakken.

Types of Changes

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)

Checklist

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in related repositories

@michaelklishin michaelklishin merged commit a23ef3a into master Oct 17, 2019
@lukebakken lukebakken deleted the await_boot_finish_avoid_infinity_division branch October 17, 2019 22:11
michaelklishin added a commit that referenced this pull request Oct 17, 2019
…ty_division

Handle infinity timeout when awaiting boot finish

(cherry picked from commit a23ef3a)
michaelklishin added a commit that referenced this pull request Oct 17, 2019
…ty_division

Handle infinity timeout when awaiting boot finish

(cherry picked from commit a23ef3a)
@michaelklishin
Copy link
Collaborator Author

Backported to v3.8.x and v3.7.x.

@michaelklishin michaelklishin added this to the 3.7.20 milestone Oct 17, 2019
lukebakken added a commit that referenced this pull request Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants