Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-18142

Data corruption can cause SerializationUtils.readRemainingLongs() function hang

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.0.0
    • None
    • None
    • None

    Description

      Similar to the SerializationUtils.readLongBE() function reported in HIVE-13397, when Instream is corrupted, the following loop can become infinite, too.

        private void readRemainingLongs(long[] buffer, int offset, InStream input, int remainder,
            int numBytes) throws IOException {
          final int toRead = remainder * numBytes;
          // bulk read to buffer
          int bytesRead = input.read(readBuffer, 0, toRead);
          while (bytesRead != toRead) {
            bytesRead += input.read(readBuffer, bytesRead, toRead - bytesRead);
          }
          ...
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            dustinday John Doe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: