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 "James Clampffer (JIRA)" <ji...@apache.org> on 2016/10/14 14:13:22 UTC

[jira] [Updated] (HDFS-10409) libhdfs++: Get rid of lock in RpcConnectionImpl destructor

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

James Clampffer updated HDFS-10409:
-----------------------------------
    Summary: libhdfs++: Get rid of lock in RpcConnectionImpl destructor  (was: libhdfs++: Something is holding connection_state_lock in RpcConnectionImpl destructor)

> libhdfs++: Get rid of lock in RpcConnectionImpl destructor
> ----------------------------------------------------------
>
>                 Key: HDFS-10409
>                 URL: https://issues.apache.org/jira/browse/HDFS-10409
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: James Clampffer
>            Assignee: James Clampffer
>         Attachments: HDFS-10409.HDFS-8707.000.patch, HDFS-10409.HDFS-8707.001.patch, locked_dtor.patch
>
>
> The destructor to RpcConnectionImpl grabs a lock using a std::lock_guard<>.  
> It turns out something is already holding the lock when this happens.  Best bet is something that looks like:
> {code}
> void SomeFunctionThatShouldntTakeLock(){
>   std::lock_guard<std::mutex> bad(connection_state_lock_)
>   conn_.reset(); //conn is a shared_ptr to RpcConnectionImpl
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org