You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2018/03/22 21:57:05 UTC
[jira] [Commented] (HDFS-9749) libhdfs++: RPC engine will attempt
to close an asio socket before it's been opened
[ https://issues.apache.org/jira/browse/HDFS-9749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16410409#comment-16410409 ]
Hudson commented on HDFS-9749:
------------------------------
SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #13869 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/13869/])
HDFS-9749: libhdfs++: RPC engine will attempt to close an asio socket (james.clampffer: rev f591b95e08efca8ed422341a40c40afba3164334)
* (edit) hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/rpc_connection.h
> libhdfs++: RPC engine will attempt to close an asio socket before it's been opened
> ----------------------------------------------------------------------------------
>
> Key: HDFS-9749
> URL: https://issues.apache.org/jira/browse/HDFS-9749
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: hdfs-client
> Reporter: James Clampffer
> Assignee: James Clampffer
> Priority: Major
> Attachments: HDFS-9749.HDFS-8707.000.patch, cancel_backtrace.txt
>
>
> Libhdfs++ can work itself into a state where it needs to shutdown, in this case due to config issues, and during deconstruction attempts to call shutdown() and close() on an asio::tcp::socket that was never opened. This causes asio to throw a std::system_error which ends up terminating the process. See attached stack for details.
> The fix is just to make sure the rpc_connection is actually connected before attempting to close it.
> {code}
> - next_layer_.cancel();
> - next_layer_.close();
> + if(connected_) {
> + next_layer_.cancel();
> + next_layer_.close();
> + }
> connected_ = false;
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org