Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-11494

Lock acquisition on WrappedInputStream#unwrappedRpcBuffer may race with another thread

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.7.0
    • None
    • None

    Description

      In SaslRpcClient, starting at line 576:

          public int read(byte[] buf, int off, int len) throws IOException {
            synchronized(unwrappedRpcBuffer) {
              // fill the buffer with the next RPC message
              if (unwrappedRpcBuffer.remaining() == 0) {
                readNextRpcPacket();
              }
      

      readNextRpcPacket() may assign another ByteBuffer to unwrappedRpcBuffer, making the lock on previous ByteBuffer not useful.

      Attachments

        1. hadoop-11494-001.patch
          1 kB
          Ted Yu
        2. hadoop-11494-002.patch
          1 kB
          Ted Yu

        Activity

          People

            yuzhihong@gmail.com Ted Yu
            yuzhihong@gmail.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: