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

Ns_server_stats doesn't always exit when sigar dies which leads to a deadlock

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Unknown

    Description

      ns_server_stats never recovers if sigar exists while ns_server_stats is reading from the port.

      How to reproduce:

      diff --git a/programs/sigar_port.c b/programs/sigar_port.c
      index c98e4786..a7517917 100644
      --- a/programs/sigar_port.c
      +++ b/programs/sigar_port.c
      @@ -298,7 +298,7 @@ int main(int argc, char *argv[])
               }
               procs_stale = populate_interesting_procs(sigar, procs, procs_count, &reply);
      -
      +        return 0;
               fwrite(&reply, sizeof(reply), 1, stdout);
               fflush(stdout);
           }
      

      Ns_server_stats:

      (n_0@node0.localhost)26> erlang:process_info(whereis(ns_server_stats), [current_function, message_queue_len]).
      [{current_function,{ns_server_stats,recv_data_loop,2}},
       {message_queue_len,28}]
      

      Attachments

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

        Activity

          People

            timofey.barmin Timofey Barmin
            timofey.barmin Timofey Barmin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty