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

[CBSE] : Eventing : Handle socket creation failures gracefully instead of SEGFAULTing

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • Morpheus
    • Cheshire-Cat
    • eventing
    • Untriaged
    • 1
    • Unknown

    Description

      While spawning and communicating with a CPP consumer, if the corresponding port from Supervisor -> consumer doesn't open due to any issues (known / unknown) such as permissions etc, the producer should handle this in a graceful manner and should warn the end user of the same via an Alert in the UI or via an entry in diag.log.

      Current behaviour:

      While spawning a CPP consumer, supervisor:

      1. Creates a socket.

      2. Creates a listener using this socket.

      3. Spawns a goroutine which starts listening on this socket.

      Note that we start listening even before verifying whether the listener has been created successfully in the first place or not.
      If there any any permission issues etc, the goroutine while listening will segfault as it will be listening on a socket which couldn't be created.

      This crashes the eventing producer and can lead to outage situations.

      Expected fix:

      Before you start using the listener verify whether it has been created first. If not, best to alert the end user of the error message instead of failing silently.

      Attachments

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

        Activity

          People

            abhishek.jindal Abhishek Jindal
            abhishek.jindal Abhishek Jindal
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty