Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-2805

Push monitor thread can exit when address resolution fails

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 2.16.1, 2.17.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible

      Stack trace:

      [2021/10/07 01:23:53.118] #<Thread:0x00005574ad3ddcc8@/data/mci/637652d91ea6b18aea0acca48c974a1e/astrolabe-src/mongo-ruby-driver/lib/mongo/background_thread.rb:112 run> terminated with exception (report_on_exception is true):
      [2021/10/07 01:23:53.118] /data/mci/637652d91ea6b18aea0acca48c974a1e/astrolabe-src/mongo-ruby-driver/lib/mongo/address.rb:236:in `getaddrinfo': getaddrinfo: Name or service not known (SocketError)
      [2021/10/07 01:23:53.118] 	from /data/mci/637652d91ea6b18aea0acca48c974a1e/astrolabe-src/mongo-ruby-driver/lib/mongo/address.rb:236:in `block in socket'
      [2021/10/07 01:23:53.118] 	from /data/mci/637652d91ea6b18aea0acca48c974a1e/astrolabe-src/mongo-ruby-driver/lib/mongo/address.rb:286:in `map_exceptions'
      [2021/10/07 01:23:53.118] 	from /data/mci/637652d91ea6b18aea0acca48c974a1e/astrolabe-src/mongo-ruby-driver/lib/mongo/address.rb:221:in `socket'
      [2021/10/07 01:23:53.118] 	from /data/mci/637652d91ea6b18aea0acca48c974a1e/astrolabe-src/mongo-ruby-driver/lib/mongo/server/monitor/connection.rb:163:in `block in connect!'
      [2021/10/07 01:23:53.118] 	from /data/mci/637652d91ea6b18aea0acca48c974a1e/astrolabe-src/mongo-ruby-driver/lib/mongo/server/connection_common.rb:146:in `add_server_diagnostics'
      [2021/10/07 01:23:53.118] 	from /data/mci/637652d91ea6b18aea0acca48c974a1e/astrolabe-src/mongo-ruby-driver/lib/mongo/server/monitor/connection.rb:162:in `connect!'
      [2021/10/07 01:23:53.118] 	from /data/mci/637652d91ea6b18aea0acca48c974a1e/astrolabe-src/mongo-ruby-driver/lib/mongo/server/push_monitor.rb:141:in `block in check'
      [2021/10/07 01:23:53.118] 	from /data/mci/637652d91ea6b18aea0acca48c974a1e/astrolabe-src/mongo-ruby-driver/lib/mongo/server/push_monitor.rb:137:in `synchronize'
      [2021/10/07 01:23:53.118] 	from /data/mci/637652d91ea6b18aea0acca48c974a1e/astrolabe-src/mongo-ruby-driver/lib/mongo/server/push_monitor.rb:137:in `check'
      [2021/10/07 01:23:53.118] 	from /data/mci/637652d91ea6b18aea0acca48c974a1e/astrolabe-src/mongo-ruby-driver/lib/mongo/server/push_monitor.rb:100:in `block in do_work'
      [2021/10/07 01:23:53.118] 	from /data/mci/637652d91ea6b18aea0acca48c974a1e/astrolabe-src/mongo-ruby-driver/lib/mongo/monitoring.rb:330:in `publish_heartbeat'
      [2021/10/07 01:23:53.118] 	from /data/mci/637652d91ea6b18aea0acca48c974a1e/astrolabe-src/mongo-ruby-driver/lib/mongo/server/push_monitor.rb:99:in `do_work'
      [2021/10/07 01:23:53.118] 	from /data/mci/637652d91ea6b18aea0acca48c974a1e/astrolabe-src/mongo-ruby-driver/lib/mongo/background_thread.rb:115:in `block (2 levels) in start!'
      [2021/10/07 01:23:53.118] 	from /data/mci/637652d91ea6b18aea0acca48c974a1e/astrolabe-src/mongo-ruby-driver/lib/mongo/background_thread.rb:113:in `catch'
      [2021/10/07 01:23:53.118] 	from /data/mci/637652d91ea6b18aea0acca48c974a1e/astrolabe-src/mongo-ruby-driver/lib/mongo/background_thread.rb:113:in `block in start!'
      

      The driver should rescue this exception and continue working by either repeating the process in the same thread or creating a new monitor and thread.

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: