You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Dustin (JIRA)" <ji...@apache.org> on 2017/11/24 07:07:01 UTC

[jira] [Created] (HIVE-18142) Data corruption can cause SerializationUtils.readRemainingLongs() function hang

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)