Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-46563

SIGUSR2 does not work with --fork

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.4.0-rc0, 4.7.0
    • Affects Version/s: None
    • Component/s: Diagnostics
    • None
    • Fully Compatible
    • ALL
    • v4.4, v4.2, v4.0
    • Dev Tools 2020-03-09, Dev Tools 2020-03-23

      Downloaded latest Ubuntu 18.0.4 build this morning from https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1804-latest.tgz, which unpacks to mongodb-linux-x86_64-ubuntu1804-4.3.3-713-g56655b0 and identifies itself in the log file as having been built from a commit made yesterday:

      {"t":{"$date":"2020-03-03T07:56:09.297-0500"},"s":"I", "c":"CONTROL", "id":20719,"ctx":"initandlisten","msg":"{mongodVersion_vii}","attr":{"mongodVersion_vii":"db version v4.3.3-713-g56655b0"}}
      {"t":{"$date":"2020-03-03T07:56:09.297-0500"},"s":"I", "c":"CONTROL", "id":23399,"ctx":"initandlisten","msg":"git version: {gitVersion}","attr":{"gitVersion":"56655b06ac46825c5937ccca5947dc84ccbca69c"}}
      {"t":{"$date":"2020-03-03T07:56:09.297-0500"},"s":"I", "c":"CONTROL", "id":23400,"ctx":"initandlisten","msg":"{openSSLVersion_OpenSSL_version}","attr":{"openSSLVersion_OpenSSL_version":"OpenSSL version: OpenSSL 1.1.1  11 Sep 2018"}}
      {"t":{"$date":"2020-03-03T07:56:09.297-0500"},"s":"I", "c":"CONTROL", "id":23401,"ctx":"initandlisten","msg":"allocator: {allocator}","attr":{"allocator":"tcmalloc"}}
      {"t":{"$date":"2020-03-03T07:56:09.297-0500"},"s":"I", "c":"CONTROL", "id":23402,"ctx":"initandlisten","msg":"{ss_str}","attr":{"ss_str":"modules: none"}}
      {"t":{"$date":"2020-03-03T07:56:09.297-0500"},"s":"I", "c":"CONTROL", "id":23403,"ctx":"initandlisten","msg":"build environment:"}
      {"t":{"$date":"2020-03-03T07:56:09.297-0500"},"s":"I", "c":"CONTROL", "id":23404,"ctx":"initandlisten","msg":"    {std_get_0_envDataEntry}: {std_get_1_envDataEntry}","attr":{"std_get_0_envDataEntry":"distmod","std_get_1_envDataEntry":"ubuntu1804"}}
      {"t":{"$date":"2020-03-03T07:56:09.297-0500"},"s":"I", "c":"CONTROL", "id":23404,"ctx":"initandlisten","msg":"    {std_get_0_envDataEntry}: {std_get_1_envDataEntry}","attr":{"std_get_0_envDataEntry":"distarch","std_get_1_envDataEntry":"x86_64"}}
      {"t":{"$date":"2020-03-03T07:56:09.297-0500"},"s":"I", "c":"CONTROL", "id":23404,"ctx":"initandlisten","msg":"    {std_get_0_envDataEntry}: {std_get_1_envDataEntry}","attr":{"std_get_0_envDataEntry":"target_arch","std_get_1_envDataEntry":"x86_64"}}
      {"t":{"$date":"2020-03-03T07:56:09.297-0500"},"s":"I", "c":"CONTROL", "id":51765,"ctx":"initandlisten","msg":"operating system: {name}, version: {version}","attr":{"name":"Ubuntu","version":"18.04"}}
      

      Tried SIGUSR2 and then 10 seconds later SIGSEGV to confirm that I was actually sending a signal

      > date; killall -SIGUSR2 mongod; sleep 10; date; killall -SIGSEGV mongod
      Tue Mar  3 08:15:37 EST 2020
      Tue Mar  3 08:15:47 EST 2020
      

      Log shows that the SIGSEGV at 08:15:47 worked but the SIGUSR2 10 seconds earlier at 08:15:37 had no effect

      {"t":{"$date":"2020-03-03T08:14:04.956-0500"},"s":"I", "c":"INDEX",   "id":20345,"ctx":"LogicalSessionCacheRefresh","msg":"index build: done building index {indexName} on ns {nss}","attr":{"indexName":"lsidTTLIndex","nss":"config.system.sessions"}}
      {"t":{"$date":"2020-03-03T08:15:47.686-0500"},"s":"F", "c":"-",       "id":0,"ctx":"initandlisten","msg":"{}","attr":{"message":"Invalid access at address: 0x3e800006cb0"}}
      {"t":{"$date":"2020-03-03T08:15:47.686-0500"},"s":"F", "c":"-",       "id":0,"ctx":"initandlisten","msg":"{}","attr":{"message":"Got signal: 11 (Segmentation fault)."}}
      

      I've also tried on a recent MacOS build and couldn't get SIGUSR2 to work.

            Assignee:
            billy.donahue@mongodb.com Billy Donahue
            Reporter:
            bruce.lucas@mongodb.com Bruce Lucas (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: