hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bob Hansen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-9749) libhdfs++: RPC engine will attempt to close an asio socket before it's been opened
Date Wed, 03 Feb 2016 18:59:39 GMT

    [ https://issues.apache.org/jira/browse/HDFS-9749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15130889#comment-15130889
] 

Bob Hansen commented on HDFS-9749:
----------------------------------

+1; clear improvement to a clear bug.

> 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
>         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
(v6.3.4#6332)

Mime
View raw message