Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EEE98200D5C for ; Fri, 15 Dec 2017 22:29:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id ED43D160C14; Fri, 15 Dec 2017 21:29:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 17827160C04 for ; Fri, 15 Dec 2017 22:29:04 +0100 (CET) Received: (qmail 32470 invoked by uid 500); 15 Dec 2017 21:29:04 -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 32459 invoked by uid 99); 15 Dec 2017 21:29:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Dec 2017 21:29:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id A43441A0252 for ; Fri, 15 Dec 2017 21:29:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 5gguDZ8v0dUX for ; Fri, 15 Dec 2017 21:29:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 470D35F3D1 for ; Fri, 15 Dec 2017 21:29: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 BE5D1E0F88 for ; Fri, 15 Dec 2017 21:29: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 832B727409 for ; Fri, 15 Dec 2017 21:29:00 +0000 (UTC) Date: Fri, 15 Dec 2017 21:29:00 +0000 (UTC) From: "genericqa (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-11957) if an IOException error is thrown in DomainSocket.close we go into infinite loop. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 15 Dec 2017 21:29:06 -0000 [ https://issues.apache.org/jira/browse/HADOOP-11957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16293270#comment-16293270 ] genericqa commented on HADOOP-11957: ------------------------------------ | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 11m 55s{color} | {color:blue} Docker mode activated. {color} | || || || || {color:brown} Prechecks {color} || | {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s{color} | {color:green} The patch does not contain any @author tags. {color} | | {color:green}+1{color} | {color:green} test4tests {color} | {color:green} 0m 0s{color} | {color:green} The patch appears to include 1 new or modified test files. {color} | || || || || {color:brown} trunk Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 32m 49s{color} | {color:green} trunk passed {color} | | {color:red}-1{color} | {color:red} compile {color} | {color:red} 7m 27s{color} | {color:red} root in trunk failed. {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 12s{color} | {color:green} trunk passed {color} | | {color:red}-1{color} | {color:red} mvnsite {color} | {color:red} 0m 15s{color} | {color:red} hadoop-common in trunk failed. {color} | | {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 0m 44s{color} | {color:green} branch has no errors when building and testing our client artifacts. {color} | | {color:red}-1{color} | {color:red} findbugs {color} | {color:red} 0m 15s{color} | {color:red} hadoop-common in trunk failed. {color} | | {color:red}-1{color} | {color:red} javadoc {color} | {color:red} 0m 14s{color} | {color:red} hadoop-common in trunk failed. {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:red}-1{color} | {color:red} mvninstall {color} | {color:red} 0m 13s{color} | {color:red} hadoop-common in the patch failed. {color} | | {color:red}-1{color} | {color:red} compile {color} | {color:red} 0m 14s{color} | {color:red} root in the patch failed. {color} | | {color:red}-1{color} | {color:red} javac {color} | {color:red} 0m 14s{color} | {color:red} root in the patch failed. {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 18s{color} | {color:green} the patch passed {color} | | {color:red}-1{color} | {color:red} mvnsite {color} | {color:red} 0m 14s{color} | {color:red} hadoop-common in the patch failed. {color} | | {color:red}-1{color} | {color:red} whitespace {color} | {color:red} 0m 0s{color} | {color:red} The patch has 137 line(s) that end in whitespace. Use git apply --whitespace=fix <>. Refer https://git-scm.com/docs/git-apply {color} | | {color:red}-1{color} | {color:red} whitespace {color} | {color:red} 0m 6s{color} | {color:red} The patch 1536 line(s) with tabs. {color} | | {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 1m 19s{color} | {color:green} patch has no errors when building and testing our client artifacts. {color} | | {color:red}-1{color} | {color:red} findbugs {color} | {color:red} 0m 15s{color} | {color:red} hadoop-common in the patch failed. {color} | | {color:red}-1{color} | {color:red} javadoc {color} | {color:red} 0m 14s{color} | {color:red} hadoop-common in the patch failed. {color} | || || || || {color:brown} Other Tests {color} || | {color:red}-1{color} | {color:red} unit {color} | {color:red} 0m 16s{color} | {color:red} hadoop-common in the patch failed. {color} | | {color:blue}0{color} | {color:blue} asflicense {color} | {color:blue} 0m 13s{color} | {color:blue} ASF License check generated no output? {color} | | {color:black}{color} | {color:black} {color} | {color:black} 57m 36s{color} | {color:black} {color} | \\ \\ || Subsystem || Report/Notes || | Docker | Client=17.05.0-ce Server=17.05.0-ce Image:yetus/hadoop:5b98639 | | JIRA Issue | HADOOP-11957 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12732085/HADOOP-11957.001.patch | | Optional Tests | asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle | | uname | Linux 27f3ad4a6ff3 3.13.0-133-generic #182-Ubuntu SMP Tue Sep 19 15:49:21 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux | | Build tool | maven | | Personality | /testptch/patchprocess/precommit/personality/provided.sh | | git revision | trunk / 949be14 | | maven | version: Apache Maven 3.3.9 | | Default Java | 1.8.0_151 | | compile | https://builds.apache.org/job/PreCommit-HADOOP-Build/13842/artifact/out/branch-compile-root.txt | | mvnsite | https://builds.apache.org/job/PreCommit-HADOOP-Build/13842/artifact/out/branch-mvnsite-hadoop-common-project_hadoop-common.txt | | findbugs | https://builds.apache.org/job/PreCommit-HADOOP-Build/13842/artifact/out/branch-findbugs-hadoop-common-project_hadoop-common.txt | | javadoc | https://builds.apache.org/job/PreCommit-HADOOP-Build/13842/artifact/out/branch-javadoc-hadoop-common-project_hadoop-common.txt | | mvninstall | https://builds.apache.org/job/PreCommit-HADOOP-Build/13842/artifact/out/patch-mvninstall-hadoop-common-project_hadoop-common.txt | | compile | https://builds.apache.org/job/PreCommit-HADOOP-Build/13842/artifact/out/patch-compile-root.txt | | javac | https://builds.apache.org/job/PreCommit-HADOOP-Build/13842/artifact/out/patch-compile-root.txt | | mvnsite | https://builds.apache.org/job/PreCommit-HADOOP-Build/13842/artifact/out/patch-mvnsite-hadoop-common-project_hadoop-common.txt | | whitespace | https://builds.apache.org/job/PreCommit-HADOOP-Build/13842/artifact/out/whitespace-eol.txt | | whitespace | https://builds.apache.org/job/PreCommit-HADOOP-Build/13842/artifact/out/whitespace-tabs.txt | | findbugs | https://builds.apache.org/job/PreCommit-HADOOP-Build/13842/artifact/out/patch-findbugs-hadoop-common-project_hadoop-common.txt | | javadoc | https://builds.apache.org/job/PreCommit-HADOOP-Build/13842/artifact/out/patch-javadoc-hadoop-common-project_hadoop-common.txt | | unit | https://builds.apache.org/job/PreCommit-HADOOP-Build/13842/artifact/out/patch-unit-hadoop-common-project_hadoop-common.txt | | Test Results | https://builds.apache.org/job/PreCommit-HADOOP-Build/13842/testReport/ | | Max. process+thread count | 105 (vs. ulimit of 5000) | | modules | C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common | | Console output | https://builds.apache.org/job/PreCommit-HADOOP-Build/13842/console | | Powered by | Apache Yetus 0.7.0-SNAPSHOT http://yetus.apache.org | This message was automatically generated. > if an IOException error is thrown in DomainSocket.close we go into infinite loop. > --------------------------------------------------------------------------------- > > Key: HADOOP-11957 > URL: https://issues.apache.org/jira/browse/HADOOP-11957 > Project: Hadoop Common > Issue Type: Bug > Components: net > Affects Versions: 2.7.1 > Reporter: Anu Engineer > Assignee: Anu Engineer > Attachments: HADOOP-11957.001.patch > > > if an IOException error is thrown in DomainSocket.close we go into infinite loop. > Issue : If the shutdown0(fd) call throws an IOException we break out of the if shutdown call but will continue to loop in the while loop infinitely since we have no way of decrementing the counter. Please scroll down and see the comment marked with Bug Bug to see where the issue is. > {code:title=DomainSocket.java} > @Override > public void close() throws IOException { > // Set the closed bit on this DomainSocket > int count = 0; > try { > count = refCount.setClosed(); > } catch (ClosedChannelException e) { > // Someone else already closed the DomainSocket. > return; > } > // Wait for all references to go away > boolean didShutdown = false; > boolean interrupted = false; > while (count > 0) { > if (!didShutdown) { > try { > // Calling shutdown on the socket will interrupt blocking system > // calls like accept, write, and read that are going on in a > // different thread. > shutdown0(fd); > } catch (IOException e) { > LOG.error("shutdown error: ", e); > } > didShutdown = true; > // *BUG BUG* <-- Here the code will never exit the loop > // if the count is greater then 0. we need to break out > // of the while loop in case of IOException Error > } > try { > Thread.sleep(10); > } catch (InterruptedException e) { > interrupted = true; > } > count = refCount.getReferenceCount(); > } > // At this point, nobody has a reference to the file descriptor, > // and nobody will be able to get one in the future either. > // We now call close(2) on the file descriptor. > // After this point, the file descriptor number will be reused by > // something else. Although this DomainSocket object continues to hold > // the old file descriptor number (it's a final field), we never use it > // again because this DomainSocket is closed. > close0(fd); > if (interrupted) { > Thread.currentThread().interrupt(); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-issues-help@hadoop.apache.org