Uploaded image for project: 'FreeSWITCH'
  1. FreeSWITCH
  2. FS-9678

FreeSWITCH not shutting down when profiles fails to load and shutdown-on-fail is set to true(when started in the back ground mode)

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.6.6
    • Fix Version/s: None
    • Component/s: mod_sofia
    • Security Level: public
    • Labels:
      None
    • Environment:
      CentOS 7
    • CPU Architecture:
      x86-64
    • Kernel:
      Linux
    • Userland:
      GNU/Linux
    • Distribution:
      CentOS
    • Distribution Version:
      CentOS 7
    • Compiler:
      gcc
    • FreeSWITCH GIT Revision:
      v1.6.6
    • GIT Master Revision hash::
      fbcb3f7 2016-10-26 02:10:21Z 64bit
    • Target Version:

      Description

      FREESWITCH is not shutting down when "shutdown-on-fail" is set to true in sofia profiles and when the profile failed to load .Attached below is the log file with debug level set.
      1. latestmaster.txt
        69 kB
        Jyotshna Cherukuri
      2. shutdownonfail.txt
        49 kB
        Jyotshna Cherukuri

        Activity

        Hide
        jcherukuri_necc Jyotshna Cherukuri added a comment -
        [~mikej]

        Good point ! The issue happens when freeswitch is running in the background . (./freeswitch -nonat -nc -heavy-timer)

        I just tested it by running in the foreground and it got shutdown

        Show
        jcherukuri_necc Jyotshna Cherukuri added a comment - [~mikej] Good point ! The issue happens when freeswitch is running in the background . (./freeswitch -nonat -nc -heavy-timer) I just tested it by running in the foreground and it got shutdown
        Hide
        mikej Mike Jerris added a comment -
        in the case of background... the runtime loop isn't running yet when we signal it to stop running.. this is a bug when trying to shutdown before we are up and running...
        Show
        mikej Mike Jerris added a comment - in the case of background... the runtime loop isn't running yet when we signal it to stop running.. this is a bug when trying to shutdown before we are up and running...
        Hide
        jcherukuri_necc Jyotshna Cherukuri added a comment -
        [~brian] ^^
        Show
        jcherukuri_necc Jyotshna Cherukuri added a comment - [~brian] ^^
        Hide
        jcherukuri_necc Jyotshna Cherukuri added a comment -
        [~mikej]

        I see from the code that "runtime.running = 1" is already being set prior to switch_core_runtime_loop API in switch_core_init_and_modload. So when I commented out the one in switch_core_runtime_loop() , FreeSIWTCH got shutdown in background mode .

        Is there any reason/logic why that was set in 2 places first of all ?
        Show
        jcherukuri_necc Jyotshna Cherukuri added a comment - [~mikej] I see from the code that "runtime.running = 1" is already being set prior to switch_core_runtime_loop API in switch_core_init_and_modload. So when I commented out the one in switch_core_runtime_loop() , FreeSIWTCH got shutdown in background mode . Is there any reason/logic why that was set in 2 places first of all ?
        Hide
        mikej Mike Jerris added a comment -
        fixed in master
        Show
        mikej Mike Jerris added a comment - fixed in master

          People

          • Assignee:
            brian Brian West
            Reporter:
            jcherukuri_necc Jyotshna Cherukuri
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development