hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dustin (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HIVE-18142) Data corruption can cause SerializationUtils.readRemainingLongs() function hang
Date Fri, 24 Nov 2017 07:07:01 GMT
Dustin created HIVE-18142:
-----------------------------

             Summary: Data corruption can cause SerializationUtils.readRemainingLongs() function
hang
                 Key: HIVE-18142
                 URL: https://issues.apache.org/jira/browse/HIVE-18142
             Project: Hive
          Issue Type: Bug
    Affects Versions: 1.0.0
            Reporter: Dustin
             Fix For: 2.1.0, 2.0.1


Similar to the SerializationUtils.readLongBE() function reported in [HIVE-13255|https://issues.apache.org/jira/browse/HIVE-13255],
when Instream is corrupted, the following loop can become infinite, too.


{code:java}
  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);
    }
    ...
}
{code}





--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message