hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HADOOP-11494) Lock acquisition on WrappedInputStream#unwrappedRpcBuffer may race with another thread
Date Thu, 29 Jan 2015 01:10:35 GMT

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

Ted Yu updated HADOOP-11494:
----------------------------
    Attachment: hadoop-11494-001.patch

Please take a look at patch v1 which synchronizes on an Object instead of the ByteBuffer

> Lock acquisition on WrappedInputStream#unwrappedRpcBuffer may race with another thread
> --------------------------------------------------------------------------------------
>
>                 Key: HADOOP-11494
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11494
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>         Attachments: hadoop-11494-001.patch
>
>
> In SaslRpcClient, starting at line 576:
> {code}
>     public int read(byte[] buf, int off, int len) throws IOException {
>       synchronized(unwrappedRpcBuffer) {
>         // fill the buffer with the next RPC message
>         if (unwrappedRpcBuffer.remaining() == 0) {
>           readNextRpcPacket();
>         }
> {code}
> readNextRpcPacket() may assign another ByteBuffer to unwrappedRpcBuffer, making the lock
on previous ByteBuffer not useful.



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

Mime
View raw message