Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-660

Concurrency issue can cause corrupted messages to be sent to the server

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Blocker - P1 Blocker - P1
    • 2.9.2, 2.10.0
    • Affects Version/s: 2.9.0, 2.9.1
    • Component/s: None
    • Environment:
      Linux 3.0.0-12-server x86_64, 1.6.0_26-b03
    • Major Change

      The 2.9.0 version of the driver introduced a regression which can cause corrupted wire protocol messages to be sent to the server.

      In practice, the impact of the bug is mitigated by these circumstances:

      1. Occurs when connected to a replica set or multiple mongos using the new HA support for mongos (but not a single mongos or a standalone).
      2. It's triggered only if the driver gets an IOException while performing a normal query (not commands) and attempts to retry the query.

      If both of these occur, it becomes likely that the driver will send corrupted messages to the server, and keep sending them until the application is restarted.

      The affect of sending corrupted messages to the server is undefined. In some cases, the server will assert and send back an error. In others, it will crash. And in others, it will add corrupt documents to the database. Using --objcheck can mitigate the latter case, but not fully.

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            ghik Roman Janusz
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: