Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-816

Gryo deserialization of error response with null message causes NPE and protocol desync

Details

    Description

      The issue can be easily reproduced by submitting a query that throws an exception with a null message, e.g.

      :> throw new RuntimeException()

      This results in a NPE on the client end in GryoMessageSerializerV1d0.dese
      rializeResponse

      The offending code is the invocation of .intern() on statusMsg on line 208

      There are several ways to fix this problem, but I don't see the utility behind interning the message so I suggest removing the call to intern.

      Attachments

        Issue Links

          Activity

            I removed the string interning, but perhaps as importantly I stopped the driver from closing the channel if a SerializationException was encountered. In this way, it becomes possible for the connection to keep working in the face of what might not be a permanent error. Not sure what other errors might raise that fit that pattern, but as they occur we can add them to the list. I'd like to save channel close for the kinds of errors that might not be one-offs - something that's like permanently destructive such that that host will just never work with the driver.

            Anyway, this was a nice bug report. Thanks for posting it.

            spmallette Stephen Mallette added a comment - I removed the string interning, but perhaps as importantly I stopped the driver from closing the channel if a SerializationException was encountered. In this way, it becomes possible for the connection to keep working in the face of what might not be a permanent error. Not sure what other errors might raise that fit that pattern, but as they occur we can add them to the list. I'd like to save channel close for the kinds of errors that might not be one-offs - something that's like permanently destructive such that that host will just never work with the driver. Anyway, this was a nice bug report. Thanks for posting it.

            People

              spmallette Stephen Mallette
              gereedy Geoff Reedy
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: