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

ConcurrencyError: can not set IO blocking after select; concurrent select detected?

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 12_01_17
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      jruby 1.7.12, Amazon Linux, openjdk-1.7.0

      Ran into this in our error grabber. Not sure if it's useful or not, but it smells like the same connection (/socket) was being concurrently used by two threads.

      org/jruby/RubyIO.java:3673:in select
      from gems/mongo-1.10.1-java/lib/mongo/connection/socket/tcp_socket.rb:70:in read
      from gems/mongo-1.10.1-java/lib/mongo/networking.rb:344:in receive_data
      from gems/mongo-1.10.1-java/lib/mongo/networking.rb:329:in receive_message_on_socket
      from gems/mongo-1.10.1-java/lib/mongo/networking.rb:189:in receive_header
      from gems/mongo-1.10.1-java/lib/mongo/networking.rb:180:in receive
      from gems/mongo-1.10.1-java/lib/mongo/networking.rb:144:in receive_message
      from gems/mongo-1.10.1-java/lib/mongo/cursor.rb:543:in send_initial_query
      from gems/mongo-1.10.1-java/lib/mongo/cursor.rb:540:in send_initial_query
      from gems/mongo-1.10.1-java/lib/mongo/functional/logging.rb:55:in instrument
      from gems/mongo-1.10.1-java/lib/mongo/functional/logging.rb:20:in instrument
      from gems/mongo-1.10.1-java/lib/mongo/functional/logging.rb:54:in instrument
      from gems/mongo-1.10.1-java/lib/mongo/cursor.rb:539:in send_initial_query
      from gems/mongo-1.10.1-java/lib/mongo/cursor.rb:524:in refresh
      from gems/mongo-1.10.1-java/lib/mongo/cursor.rb:136:in next
      from gems/mongo-1.10.1-java/lib/mongo/db.rb:556:in command
      from gems/mongo-1.10.1-java/lib/mongo/connection/pool.rb:151:in ping
      from gems/mongo-1.10.1-java/lib/mongo/connection/pool.rb:131:in refresh_ping_time
      from org/jruby/RubyFixnum.java:275:in times
      from gems/mongo-1.10.1-java/lib/mongo/connection/pool.rb:129:in refresh_ping_time
      from gems/mongo-1.10.1-java/lib/mongo/connection/pool.rb:118:in ping_time
      from org/jruby/ext/thread/Mutex.java:149:in synchronize
      from gems/mongo-1.10.1-java/lib/mongo/connection/pool.rb:116:in ping_time
      from gems/mongo-1.10.1-java/lib/mongo/functional/read_preference.rb:167:in select_near_pool
      from org/jruby/RubyArray.java:1613:in each
      from org/jruby/RubyEnumerable.java:1215:in min_by
      from gems/mongo-1.10.1-java/lib/mongo/functional/read_preference.rb:167:in select_near_pool
      from gems/mongo-1.10.1-java/lib/mongo/functional/read_preference.rb:162:in select_secondary_pool
      from gems/mongo-1.10.1-java/lib/mongo/functional/read_preference.rb:138:in select_pool
      from gems/mongo-1.10.1-java/lib/mongo/functional/read_preference.rb:115:in read_pool
      from gems/mongo-1.10.1-java/lib/mongo/mongo_replica_set_client.rb:359:in checkout_reader
      from gems/mongo-1.10.1-java/lib/mongo/mongo_replica_set_client.rb:343:in checkout
      from gems/mongo-1.10.1-java/lib/mongo/mongo_replica_set_client.rb:358:in checkout_reader
      from gems/mongo-1.10.1-java/lib/mongo/cursor.rb:615:in checkout_socket_from_connection
      from gems/mongo-1.10.1-java/lib/mongo/cursor.rb:542:in send_initial_query
      from gems/mongo-1.10.1-java/lib/mongo/cursor.rb:540:in send_initial_query
      from gems/mongo-1.10.1-java/lib/mongo/functional/logging.rb:55:in instrument
      from gems/mongo-1.10.1-java/lib/mongo/functional/logging.rb:20:in instrument
      from gems/mongo-1.10.1-java/lib/mongo/functional/logging.rb:54:in instrument
      from gems/mongo-1.10.1-java/lib/mongo/cursor.rb:539:in send_initial_query
      from gems/mongo-1.10.1-java/lib/mongo/cursor.rb:524:in refresh
      from gems/mongo-1.10.1-java/lib/mongo/cursor.rb:513:in num_remaining
      from gems/mongo-1.10.1-java/lib/mongo/cursor.rb:187:in has_next?

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            cheald Chris Heald
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: