[ https://issues.apache.org/jira/browse/HDFS-15250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17103624#comment-17103624 ]
Hadoop QA commented on HDFS-15250: ---------------------------------- | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 1m 25s{color} | {color:blue} Docker mode activated. {color} | || || || || {color:brown} Prechecks {color} || | {color:green}+1{color} | {color:green} dupname {color} | {color:green} 0m 0s{color} | {color:green} No case conflicting files found. {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:red}-1{color} | {color:red} test4tests {color} | {color:red} 0m 0s{color} | {color:red} The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. {color} | || || || || {color:brown} trunk Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 21m 7s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 49s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 23s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} mvnsite {color} | {color:green} 0m 53s{color} | {color:green} trunk passed {color} | | {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 16m 38s{color} | {color:green} branch has no errors when building and testing our client artifacts. {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 31s{color} | {color:green} trunk passed {color} | | {color:blue}0{color} | {color:blue} spotbugs {color} | {color:blue} 2m 22s{color} | {color:blue} Used deprecated FindBugs config; considering switching to SpotBugs. {color} | | {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 2m 20s{color} | {color:green} trunk passed {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 0m 48s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 45s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 0m 45s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 17s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} mvnsite {color} | {color:green} 0m 46s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 0s{color} | {color:green} The patch has no whitespace issues. {color} | | {color:green}+1{color} | {color:green} shadedclient {color} | {color:green} 15m 32s{color} | {color:green} patch has no errors when building and testing our client artifacts. {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 28s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 2m 27s{color} | {color:green} the patch passed {color} | || || || || {color:brown} Other Tests {color} || | {color:green}+1{color} | {color:green} unit {color} | {color:green} 1m 58s{color} | {color:green} hadoop-hdfs-client in the patch passed. {color} | | {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 30s{color} | {color:green} The patch does not generate ASF License warnings. {color} | | {color:black}{color} | {color:black} {color} | {color:black} 68m 29s{color} | {color:black} {color} | \\ \\ || Subsystem || Report/Notes || | Docker | ClientAPI=1.40 ServerAPI=1.40 base: https://builds.apache.org/job/PreCommit-HDFS-Build/29259/artifact/out/Dockerfile | | JIRA Issue | HDFS-15250 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/13002512/HDFS-15250-002.patch | | Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle | | uname | Linux a05100928763 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux | | Build tool | maven | | Personality | personality/hadoop.sh | | git revision | trunk / cb64e993c27 | | Default Java | Private Build-1.8.0_252-8u252-b09-1~18.04-b09 | | Test Results | https://builds.apache.org/job/PreCommit-HDFS-Build/29259/testReport/ | | Max. process+thread count | 295 (vs. ulimit of 5500) | | modules | C: hadoop-hdfs-project/hadoop-hdfs-client U: hadoop-hdfs-project/hadoop-hdfs-client | | Console output | https://builds.apache.org/job/PreCommit-HDFS-Build/29259/console | | versions | git=2.17.1 maven=3.6.0 findbugs=3.1.0-RC1 | | Powered by | Apache Yetus 0.12.0 https://yetus.apache.org | This message was automatically generated. > Setting `dfs.client.use.datanode.hostname` to true can crash the system > because of unhandled UnresolvedAddressException > ----------------------------------------------------------------------------------------------------------------------- > > Key: HDFS-15250 > URL: https://issues.apache.org/jira/browse/HDFS-15250 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: Ctest > Assignee: Ctest > Priority: Major > Attachments: HDFS-15250-001.patch, HDFS-15250-002.patch > > > *Problem:* > `dfs.client.use.datanode.hostname` by default is set to false, which means > the client will use the IP address of the datanode to connect to the > datanode, rather than the hostname of the datanode. > In `org.apache.hadoop.hdfs.client.impl.BlockReaderFactory.nextTcpPeer`: > > {code:java} > try { > Peer peer = remotePeerFactory.newConnectedPeer(inetSocketAddress, token, > datanode); > LOG.trace("nextTcpPeer: created newConnectedPeer {}", peer); > return new BlockReaderPeer(peer, false); > } catch (IOException e) { > LOG.trace("nextTcpPeer: failed to create newConnectedPeer connected to" > + "{}", datanode); > throw e; > } > {code} > > If `dfs.client.use.datanode.hostname` is false, then it will try to connect > via IP address. If the IP address is illegal and the connection fails, > IOException will be thrown from `newConnectedPeer` and be handled. > If `dfs.client.use.datanode.hostname` is true, then it will try to connect > via hostname. If the hostname cannot be resolved, UnresolvedAddressException > will be thrown from `newConnectedPeer`. However, UnresolvedAddressException > is not a subclass of IOException so `nextTcpPeer` doesn’t handle this > exception at all. This unhandled exception could crash the system. > > *Solution:* > Since the method is handling the illegal IP address, then the illegal > hostname should be also handled as well. One solution is to add the handling > logic in `nextTcpPeer`: > {code:java} > } catch (IOException e) { > LOG.trace("nextTcpPeer: failed to create newConnectedPeer connected to" > + "{}", datanode); > throw e; > } catch (UnresolvedAddressException e) { > ... // handling logic > }{code} > I am very happy to provide a patch to do this. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org