You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Kan Zhang (JIRA)" <ji...@apache.org> on 2010/02/17 18:17:27 UTC

[jira] Created: (HADOOP-6572) RPC responses may be out-of-order with respect to SASL

RPC responses may be out-of-order with respect to SASL
------------------------------------------------------

                 Key: HADOOP-6572
                 URL: https://issues.apache.org/jira/browse/HADOOP-6572
             Project: Hadoop Common
          Issue Type: Bug
          Components: ipc, security
            Reporter: Kan Zhang
            Assignee: Kan Zhang


SASL enforces its own message ordering. When RPC server sends its responses back, response A may be wrapped by SASL before response B but is put on response queue after response B. This results in RPC client receiving wrapped response B ahead of A. When the received messages are unwrapped by SASL, SASL complaints the messages are out of order.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6572) RPC responses may be out-of-order with respect to SASL

Posted by "Devaraj Das (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12835654#action_12835654 ] 

Devaraj Das commented on HADOOP-6572:
-------------------------------------

+1

> RPC responses may be out-of-order with respect to SASL
> ------------------------------------------------------
>
>                 Key: HADOOP-6572
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6572
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: ipc, security
>            Reporter: Kan Zhang
>            Assignee: Kan Zhang
>         Attachments: c6572-02.patch
>
>
> SASL enforces its own message ordering. When RPC server sends its responses back, response A may be wrapped by SASL before response B but is put on response queue after response B. This results in RPC client receiving wrapped response B ahead of A. When the received messages are unwrapped by SASL, SASL complaints the messages are out of order.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6572) RPC responses may be out-of-order with respect to SASL

Posted by "Kan Zhang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834896#action_12834896 ] 

Kan Zhang commented on HADOOP-6572:
-----------------------------------

It's not easy to write a unit test since the bug depends on a race condition among RPC handler threads. But we have run the same manual tests with the patch and the errors disappeared.

> RPC responses may be out-of-order with respect to SASL
> ------------------------------------------------------
>
>                 Key: HADOOP-6572
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6572
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: ipc, security
>            Reporter: Kan Zhang
>            Assignee: Kan Zhang
>         Attachments: c6572-02.patch
>
>
> SASL enforces its own message ordering. When RPC server sends its responses back, response A may be wrapped by SASL before response B but is put on response queue after response B. This results in RPC client receiving wrapped response B ahead of A. When the received messages are unwrapped by SASL, SASL complaints the messages are out of order.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6572) RPC responses may be out-of-order with respect to SASL

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12835663#action_12835663 ] 

Hudson commented on HADOOP-6572:
--------------------------------

Integrated in Hadoop-Common-trunk-Commit #177 (See [http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk-Commit/177/])
    . Makes sure that SASL encryption and push to responder queue for the RPC response happens atomically. Contributed by Kan Zhang.


> RPC responses may be out-of-order with respect to SASL
> ------------------------------------------------------
>
>                 Key: HADOOP-6572
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6572
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: ipc, security
>            Reporter: Kan Zhang
>            Assignee: Kan Zhang
>             Fix For: 0.22.0
>
>         Attachments: c6572-02.patch
>
>
> SASL enforces its own message ordering. When RPC server sends its responses back, response A may be wrapped by SASL before response B but is put on response queue after response B. This results in RPC client receiving wrapped response B ahead of A. When the received messages are unwrapped by SASL, SASL complaints the messages are out of order.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6572) RPC responses may be out-of-order with respect to SASL

Posted by "Devaraj Das (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Devaraj Das updated HADOOP-6572:
--------------------------------

    Attachment: 6572-bp20.patch

The backported patch for Y20. Not for commit here.

> RPC responses may be out-of-order with respect to SASL
> ------------------------------------------------------
>
>                 Key: HADOOP-6572
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6572
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: ipc, security
>            Reporter: Kan Zhang
>            Assignee: Kan Zhang
>             Fix For: 0.22.0
>
>         Attachments: 6572-bp20.patch, c6572-02.patch
>
>
> SASL enforces its own message ordering. When RPC server sends its responses back, response A may be wrapped by SASL before response B but is put on response queue after response B. This results in RPC client receiving wrapped response B ahead of A. When the received messages are unwrapped by SASL, SASL complaints the messages are out of order.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6572) RPC responses may be out-of-order with respect to SASL

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834860#action_12834860 ] 

Hadoop QA commented on HADOOP-6572:
-----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12436116/c6572-02.patch
  against trunk revision 910741.

    +1 @author.  The patch does not contain any @author tags.

    -1 tests included.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h1.grid.sp2.yahoo.net/10/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h1.grid.sp2.yahoo.net/10/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h1.grid.sp2.yahoo.net/10/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h1.grid.sp2.yahoo.net/10/console

This message is automatically generated.

> RPC responses may be out-of-order with respect to SASL
> ------------------------------------------------------
>
>                 Key: HADOOP-6572
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6572
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: ipc, security
>            Reporter: Kan Zhang
>            Assignee: Kan Zhang
>         Attachments: c6572-02.patch
>
>
> SASL enforces its own message ordering. When RPC server sends its responses back, response A may be wrapped by SASL before response B but is put on response queue after response B. This results in RPC client receiving wrapped response B ahead of A. When the received messages are unwrapped by SASL, SASL complaints the messages are out of order.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6572) RPC responses may be out-of-order with respect to SASL

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12836153#action_12836153 ] 

Hudson commented on HADOOP-6572:
--------------------------------

Integrated in Hadoop-Common-trunk #255 (See [http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/255/])
    

> RPC responses may be out-of-order with respect to SASL
> ------------------------------------------------------
>
>                 Key: HADOOP-6572
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6572
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: ipc, security
>            Reporter: Kan Zhang
>            Assignee: Kan Zhang
>             Fix For: 0.22.0
>
>         Attachments: 6572-bp20.patch, c6572-02.patch
>
>
> SASL enforces its own message ordering. When RPC server sends its responses back, response A may be wrapped by SASL before response B but is put on response queue after response B. This results in RPC client receiving wrapped response B ahead of A. When the received messages are unwrapped by SASL, SASL complaints the messages are out of order.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6572) RPC responses may be out-of-order with respect to SASL

Posted by "Devaraj Das (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Devaraj Das updated HADOOP-6572:
--------------------------------

       Resolution: Fixed
    Fix Version/s: 0.22.0
           Status: Resolved  (was: Patch Available)

I just committed this. Thanks, Kan!

> RPC responses may be out-of-order with respect to SASL
> ------------------------------------------------------
>
>                 Key: HADOOP-6572
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6572
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: ipc, security
>            Reporter: Kan Zhang
>            Assignee: Kan Zhang
>             Fix For: 0.22.0
>
>         Attachments: c6572-02.patch
>
>
> SASL enforces its own message ordering. When RPC server sends its responses back, response A may be wrapped by SASL before response B but is put on response queue after response B. This results in RPC client receiving wrapped response B ahead of A. When the received messages are unwrapped by SASL, SASL complaints the messages are out of order.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6572) RPC responses may be out-of-order with respect to SASL

Posted by "Kan Zhang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kan Zhang updated HADOOP-6572:
------------------------------

    Attachment: c6572-02.patch

adding a patch that ensures call responses are added to the response queue in the same order as they are wrapped by SASL.

> RPC responses may be out-of-order with respect to SASL
> ------------------------------------------------------
>
>                 Key: HADOOP-6572
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6572
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: ipc, security
>            Reporter: Kan Zhang
>            Assignee: Kan Zhang
>         Attachments: c6572-02.patch
>
>
> SASL enforces its own message ordering. When RPC server sends its responses back, response A may be wrapped by SASL before response B but is put on response queue after response B. This results in RPC client receiving wrapped response B ahead of A. When the received messages are unwrapped by SASL, SASL complaints the messages are out of order.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6572) RPC responses may be out-of-order with respect to SASL

Posted by "Kan Zhang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kan Zhang updated HADOOP-6572:
------------------------------

    Status: Patch Available  (was: Open)

> RPC responses may be out-of-order with respect to SASL
> ------------------------------------------------------
>
>                 Key: HADOOP-6572
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6572
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: ipc, security
>            Reporter: Kan Zhang
>            Assignee: Kan Zhang
>         Attachments: c6572-02.patch
>
>
> SASL enforces its own message ordering. When RPC server sends its responses back, response A may be wrapped by SASL before response B but is put on response queue after response B. This results in RPC client receiving wrapped response B ahead of A. When the received messages are unwrapped by SASL, SASL complaints the messages are out of order.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6572) RPC responses may be out-of-order with respect to SASL

Posted by "Kan Zhang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834848#action_12834848 ] 

Kan Zhang commented on HADOOP-6572:
-----------------------------------

An error log we observed.

Error: javax.security.sasl.SaslException: DIGEST-MD5: Out of order sequencing of messages from server. Got: 9 Expected: 8 at com.sun.security.sasl.digest.DigestMD5Base$DigestIntegrity.unwrap(DigestMD5Base.java:1015) at com.sun.security.sasl.digest.DigestMD5Base.unwrap(DigestMD5Base.java:201) at org.apache.hadoop.security.SaslInputStream.readMoreData(SaslInputStream.java:97) at org.apache.hadoop.security.SaslInputStream.read(SaslInputStream.java:231) at java.io.FilterInputStream.read(FilterInputStream.java:116) at org.apache.hadoop.ipc.Client$Connection$PingInputStream.read(Client.java:329) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read(BufferedInputStream.java:237) at java.io.DataInputStream.readInt(DataInputStream.java:370) at org.apache.hadoop.ipc.Client$Connection.receiveResponse(Client.java:620) at org.apache.hadoop.ipc.Client$Connection.run(Client.java:565) 

> RPC responses may be out-of-order with respect to SASL
> ------------------------------------------------------
>
>                 Key: HADOOP-6572
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6572
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: ipc, security
>            Reporter: Kan Zhang
>            Assignee: Kan Zhang
>
> SASL enforces its own message ordering. When RPC server sends its responses back, response A may be wrapped by SASL before response B but is put on response queue after response B. This results in RPC client receiving wrapped response B ahead of A. When the received messages are unwrapped by SASL, SASL complaints the messages are out of order.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.