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] [Updated] (HDFS-9749) libhdfs++: RPC engine will attempt to close an asio socket before it's been opened
Date Thu, 04 Feb 2016 14:10:40 GMT

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

Mime
View raw message