Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-8149

Status Message Garbage against a Windows Cluster

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.0.1
    • Fix Version/s: 2.2.0
    • Component/s: clients
    • Security Level: Public
    • Labels:
    • Operating System:
      Windows 32-bit

      Description

      Something that was reported earlier somewhere, but I could never track it down until now.

      I'm currently at the DevDay vienna and one person used the Java SDK against a Windows Couchbase Server 2.0 install (locally). So everything works well, but when he wants to print out the status message on async operations the string that comes back is total garbage. It doesnt help to change the encoding inside the IDE, so I guess its something different.

      The interesting part is that when I let him point the same code to my Mac OS Couchbase Server 2.0 instance, the message comes back perfectly fine. I've never seen this on mac/linux before.

      So my question is first: is there anything that is different on Windows in terms of encoding and such that makes a difference here? So Win client -> Win server breaks, Win client -> Mac server works.

      I'll attach a screenshot from him to show what it looks like. It comes up when you use getStatus().getMessage() on a async operation.

      Thanks,
      Michael

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        daschl Michael Nitschinger created issue -
        daschl Michael Nitschinger made changes -
        Field Original Value New Value
        Attachment 130424_ml_opstatus_message_unicode_bug.png [ 17193 ]
        Hide
        daschl Michael Nitschinger added a comment -

        One more addition:

        during the current dev day here in Prague, one guy showed me the same problem but he was using the .NET SDK against a Windows machine. I told him also to try against my local bucket on Mac and did work fine again.

        So since both Java and .NET face the same issues against a Windows machine, maybe its a bug in our Windows build?

        Show
        daschl Michael Nitschinger added a comment - One more addition: during the current dev day here in Prague, one guy showed me the same problem but he was using the .NET SDK against a Windows machine. I told him also to try against my local bucket on Mac and did work fine again. So since both Java and .NET face the same issues against a Windows machine, maybe its a bug in our Windows build?
        daschl Michael Nitschinger made changes -
        Labels windows
        Operating System Windows 32-bit [ 10025 ]
        Hide
        daschl Michael Nitschinger added a comment -

        The person (already a customer), said that this has been an issue in 1.8.X as well, so it must be in there "since some time".

        Show
        daschl Michael Nitschinger added a comment - The person (already a customer), said that this has been an issue in 1.8.X as well, so it must be in there "since some time".
        Hide
        trond Trond Norbye added a comment -

        Can you add a code snippet on how to reproduce the problem in a client so I know where to look on the server?

        Cheers,

        Show
        trond Trond Norbye added a comment - Can you add a code snippet on how to reproduce the problem in a client so I know where to look on the server? Cheers,
        maria Maria McDuff (Inactive) made changes -
        Fix Version/s 2.0.2 [ 10418 ]
        Hide
        daschl Michael Nitschinger added a comment -

        Hey Trond,

        can you pass me an IP address where I get access to a windows box to run this? I don't have a specific snippet for you but it should be done easily. Let me give you the information that I recall.

        • I only think the message is broken on some of the responses (in the screenshot you can see its a cas response failure on the message).

        It always happens when you inspect the status of the returned future. So the snippet would be * do something *, especially with cas() and then grab the future and do a getStatus().getMessage() and just print it to STDOUT. This shoud suffice.

        Again, if you have a box where I can try I'll do so.

        Show
        daschl Michael Nitschinger added a comment - Hey Trond, can you pass me an IP address where I get access to a windows box to run this? I don't have a specific snippet for you but it should be done easily. Let me give you the information that I recall. I only think the message is broken on some of the responses (in the screenshot you can see its a cas response failure on the message). It always happens when you inspect the status of the returned future. So the snippet would be * do something *, especially with cas() and then grab the future and do a getStatus().getMessage() and just print it to STDOUT. This shoud suffice. Again, if you have a box where I can try I'll do so.
        Hide
        ingenthr Matt Ingenthron added a comment -

        Siri: this seems to be a problem with character encoding in responses on Windows. Unfortunately, we don't have a test case, but since it's an error code response over memcached protocol it may be possible to look for the cause in code inspection.

        Note that Windows -> Mac works, but Windows -> Windows fails. Does not appear to be a client issue.

        Show
        ingenthr Matt Ingenthron added a comment - Siri: this seems to be a problem with character encoding in responses on Windows. Unfortunately, we don't have a test case, but since it's an error code response over memcached protocol it may be possible to look for the cause in code inspection. Note that Windows -> Mac works, but Windows -> Windows fails. Does not appear to be a client issue.
        ingenthr Matt Ingenthron made changes -
        Assignee Matt Ingenthron [ ingenthr ] Sriram Melkote [ siri ]
        maria Maria McDuff (Inactive) made changes -
        Fix Version/s 2.0.3 [ 10620 ]
        Fix Version/s 2.0.2 [ 10418 ]
        Hide
        maria Maria McDuff (Inactive) added a comment -

        deferring to 2.0.3 since this is not a regression.

        Show
        maria Maria McDuff (Inactive) added a comment - deferring to 2.0.3 since this is not a regression.
        siri Sriram Melkote made changes -
        Assignee Sriram Melkote [ siri ] Michael Nitschinger [ daschl ]
        daschl Michael Nitschinger made changes -
        Assignee Michael Nitschinger [ daschl ] Sriram Melkote [ siri ]
        siri Sriram Melkote made changes -
        Assignee Sriram Melkote [ siri ] Michael Nitschinger [ daschl ]
        Hide
        siri Sriram Melkote added a comment -

        Sorry Michael. I've now extended the volume for additional 30GB free. Thanks!

        Show
        siri Sriram Melkote added a comment - Sorry Michael. I've now extended the volume for additional 30GB free. Thanks!
        Hide
        daschl Michael Nitschinger added a comment -

        Okay, it is easily reproducable on the target system.

        I left the IntelliJ open, but in case its closed just reopen it. The only project is called "mb8149" and contains a main() method that you just need to run. (select file on the left, right click, "Run MainApp.main()".

        You'll see the garbled message in the log underneath. It just does a cas() update of the document with an invalid cas key.. if I run the same code locally, I correctly get "Data exists for key" so there is no weird character in there. The message on the windows box is completely broken.

        Let me know if you need anything else!

        Show
        daschl Michael Nitschinger added a comment - Okay, it is easily reproducable on the target system. I left the IntelliJ open, but in case its closed just reopen it. The only project is called "mb8149" and contains a main() method that you just need to run. (select file on the left, right click, "Run MainApp.main()". You'll see the garbled message in the log underneath. It just does a cas() update of the document with an invalid cas key.. if I run the same code locally, I correctly get "Data exists for key" so there is no weird character in there. The message on the windows box is completely broken. Let me know if you need anything else!
        Hide
        daschl Michael Nitschinger added a comment -

        Assigning back to you for investigations!

        Show
        daschl Michael Nitschinger added a comment - Assigning back to you for investigations!
        daschl Michael Nitschinger made changes -
        Assignee Michael Nitschinger [ daschl ] Sriram Melkote [ siri ]
        siri Sriram Melkote made changes -
        Assignee Sriram Melkote [ siri ] Ptratap prataprc [ prataprc ]
        siri Sriram Melkote made changes -
        Assignee Pratap Chakravarthy [ prataprc ] Sriram Melkote [ siri ]
        maria Maria McDuff (Inactive) made changes -
        Fix Version/s 3.0 [ 10414 ]
        Fix Version/s 2.2.0 [ 10620 ]
        siri Sriram Melkote made changes -
        Assignee Sriram Melkote [ siri ] Mike Wiederhold [ mikew ]
        Hide
        siri Sriram Melkote added a comment -

        I looked at this briefly before the VM got stopped (due to too low a price) on EC2. There didn't seem to be anything wrong from ns_server - either the message from memcached was wrong, or the buffer was being decoded wrongly by the client. In any case, since I'm not the correct person for ns_server (Alk), memcached (Mike) or the client (Michael), I'm reassigning rather than sit on this any longer for lack of time.

        Show
        siri Sriram Melkote added a comment - I looked at this briefly before the VM got stopped (due to too low a price) on EC2. There didn't seem to be anything wrong from ns_server - either the message from memcached was wrong, or the buffer was being decoded wrongly by the client. In any case, since I'm not the correct person for ns_server (Alk), memcached (Mike) or the client (Michael), I'm reassigning rather than sit on this any longer for lack of time.
        Hide
        ingenthr Matt Ingenthron added a comment -

        I'm assigning this to Trond, raising it to critical and re-adding 2.2 per a discussion with Ravi. The concern here is that if we have garbage or invalid encoding in error messages, what else has garbage/invalid encoding.

        Trond: the request here is to inspect the path to try to find any possible causes. We hope it's just a simple problem with string encoding. Please check with Michael if additional info is needed.

        Show
        ingenthr Matt Ingenthron added a comment - I'm assigning this to Trond, raising it to critical and re-adding 2.2 per a discussion with Ravi. The concern here is that if we have garbage or invalid encoding in error messages, what else has garbage/invalid encoding. Trond: the request here is to inspect the path to try to find any possible causes. We hope it's just a simple problem with string encoding. Please check with Michael if additional info is needed.
        ingenthr Matt Ingenthron made changes -
        Priority Major [ 3 ] Critical [ 2 ]
        Assignee Mike Wiederhold [ mikew ] Trond Norbye [ trond ]
        Fix Version/s 2.2.0 [ 10620 ]
        Hide
        siri Sriram Melkote added a comment -

        Note that the message seems to have lot of \u0000, so it may be that we encoded 0's as a string for some reason

        Show
        siri Sriram Melkote added a comment - Note that the message seems to have lot of \u0000, so it may be that we encoded 0's as a string for some reason
        maria Maria McDuff (Inactive) made changes -
        Fix Version/s 2.2.0 [ 10620 ]
        Hide
        trond Trond Norbye added a comment -

        The error function passed a stack buffer for transfer which seemed extremely likely to be the root cause here. It has been fixed in http://review.couchbase.org/#/c/28388/

        Show
        trond Trond Norbye added a comment - The error function passed a stack buffer for transfer which seemed extremely likely to be the root cause here. It has been fixed in http://review.couchbase.org/#/c/28388/
        trond Trond Norbye made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.2.0 [ 10620 ]
        Fix Version/s 3.0 [ 10414 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            trond Trond Norbye
            Reporter:
            daschl Michael Nitschinger
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes