From common-issues-return-154622-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Tue Jul 10 18:00:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 8B4D2180663 for ; Tue, 10 Jul 2018 18:00:04 +0200 (CEST) Received: (qmail 97008 invoked by uid 500); 10 Jul 2018 16:00:03 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 96996 invoked by uid 99); 10 Jul 2018 16:00:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jul 2018 16:00:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 0E694C0321 for ; Tue, 10 Jul 2018 16:00:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id ZvnV4fuQKj8N for ; Tue, 10 Jul 2018 16:00:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 5E2285F1EE for ; Tue, 10 Jul 2018 16:00:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id A9C48E015C for ; Tue, 10 Jul 2018 16:00:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 686CB21EE9 for ; Tue, 10 Jul 2018 16:00:00 +0000 (UTC) Date: Tue, 10 Jul 2018 16:00:00 +0000 (UTC) From: "Sean Mackrory (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-15541) AWS SDK can mistake stream timeouts for EOF and throw SdkClientExceptions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-15541?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 538842#comment-16538842 ]=20 Sean Mackrory commented on HADOOP-15541: ---------------------------------------- Thanks Steve, commited. I'd like to commit this right now to address the kn= own issue. I wanna do a bit of searching around and see if I can find any c= ases of IOExceptions where it would make sense to reuse the stream before t= aking it further. I'll a separate JIRA for that before resolving... > AWS SDK can mistake stream timeouts for EOF and throw SdkClientExceptions > ------------------------------------------------------------------------- > > Key: HADOOP-15541 > URL: https://issues.apache.org/jira/browse/HADOOP-15541 > Project: Hadoop Common > Issue Type: Bug > Components: fs/s3 > Affects Versions: 2.9.1, 2.8.4, 3.0.2, 3.1.1 > Reporter: Sean Mackrory > Assignee: Sean Mackrory > Priority: Major > Attachments: HADOOP-15541.001.patch > > > I've gotten a few reports of read timeouts not being handled properly in = some Impala workloads. What happens is the following sequence of events (cr= edit to Sailesh Mukil for figuring this out): > * S3AInputStream.read() gets a SocketTimeoutException when it calls wrap= pedStream.read() > * This is handled by onReadFailure -> reopen -> closeStream. When we try= to drain the stream, SdkFilterInputStream.read() in the AWS SDK fails beca= use of checkLength. The underlying Apache Commons stream returns -1 in the = case of a timeout, and EOF. > * The SDK assumes the -1 signifies an EOF, so assumes the bytes read mus= t equal expected bytes, and because they don't (because it's a timeout and = not an EOF) it throws an SdkClientException. > This is tricky to test for without a ton of mocking of AWS SDK internals,= because you have to get into this conflicting state where the SDK has only= read a subset of the expected bytes and gets a -1. > closeStream will abort the stream in the event of an IOException when dra= ining. We could simply also abort in the event of an SdkClientException. I'= m testing that this results in correct functionality in the workloads that = seem to hit these timeouts a lot, but all the s3a tests continue to work wi= th that change. I'm going to open an issue with the AWS SDK Github as well,= but I'm not sure what the ideal outcome would be unless there's a good way= to distinguish between a stream that has timed out and a stream that read = all the data without huge rewrites. > =C2=A0 > =C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-issues-help@hadoop.apache.org