Uploaded image for project: 'Couchbase C client library libcouchbase'
  1. Couchbase C client library libcouchbase
  2. CCBC-105

SASL Authentication errors (and possibly others) don't stop the event loop

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.0beta
    • Fix Version/s: 2.0.0beta2
    • Component/s: library
    • Security Level: Public
    • Labels:
      None

      Description

      When encountering an authentication error, the client library should break out the event loop after invoking the error callback.

      This means that users who are using libcouchbase and are somehow getting SASL auth errors will have their applications hang instantly, unless the user breaks out of the event loop manually from the error callback.

        Issue Links

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

          Activity

          Hide
          avsej Sergey Avseyev added a comment -

          They should use error callbacks

          Show
          avsej Sergey Avseyev added a comment - They should use error callbacks
          Hide
          mnunberg Mark Nunberg added a comment - - edited

          It remains to be seen why SASL auth at all fails (this shouldn't happen.. it should either be a REST failure or the correct SASL password should be retrieved from the vbucket config).

          Nevertheless I'm initially marked this as critical since a library should never hang under any circumstances.

          Show
          mnunberg Mark Nunberg added a comment - - edited It remains to be seen why SASL auth at all fails (this shouldn't happen.. it should either be a REST failure or the correct SASL password should be retrieved from the vbucket config). Nevertheless I'm initially marked this as critical since a library should never hang under any circumstances.
          Hide
          avsej Sergey Avseyev added a comment -

          how are you driving the event loop? does your code define error_callback?

          Show
          avsej Sergey Avseyev added a comment - how are you driving the event loop? does your code define error_callback?
          Hide
          mnunberg Mark Nunberg added a comment -

          The code has an error_callback and it just prints out the error but doesn't do anything. Generally speaking I'm using lcb_wait and expecting libcouchbase to promptly return control to my application when the event loop has nothing more to wait for.

          I know it's an easy work-around to just manually break out of the event loop, but it's not documented in our API that 'wait might not always return'.. so if we're gonna maintain old behavior, this should be specified in big red letters.

          Show
          mnunberg Mark Nunberg added a comment - The code has an error_callback and it just prints out the error but doesn't do anything. Generally speaking I'm using lcb_wait and expecting libcouchbase to promptly return control to my application when the event loop has nothing more to wait for. I know it's an easy work-around to just manually break out of the event loop, but it's not documented in our API that 'wait might not always return'.. so if we're gonna maintain old behavior, this should be specified in big red letters.
          Hide
          avsej Sergey Avseyev added a comment -
          Show
          avsej Sergey Avseyev added a comment - http://review.couchbase.org/21344 fix freezing

            People

            • Assignee:
              avsej Sergey Avseyev
              Reporter:
              mnunberg Mark Nunberg
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes