[ 
https://issues.apache.org/jira/browse/HDFS-9749?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bob Hansen updated HDFS-9749:
-----------------------------
    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

Committed to HDFS-8707.  Thanks, [~James Clampffer].

> 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)

Reply via email to