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

erlang session elements not being removed from hash when the outbound erlang process does not respond

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 1.4.18
    • Component/s: mod_erlang_event
    • Labels:
      None
    • CPU Architecture:
      x86
    • Kernel:
      Linux
    • uname:
      Linux
    • Userland:
      GNU/Linux
    • Distribution:
      CentOS
    • Distribution Version:
      CentOS 6
    • Compiler:
      gcc
    • FreeSWITCH GIT Revision:
      5c29d8d4faae12bed7709e40e81d2baebf227ac1
    • GIT Master Revision hash::
      5c29d8d4faae12bed7709e40e81d2baebf227ac1
    • Target Version:

      Description

      Description:

      In testing latest FS with mod_erlang_event with erlang R14B02 , I notice that the erlang session elements are not being removed from hash when the outbound erlang process does not respond. This might eventually leave FS to high memory consumption as they don't seem to get cleared until a restart is issued.

      Freeswitch log :

      EXECUTE sofia/aaaaa/nobody@172.31.102.124 lua(aaaaa-in-caller.lua)
      EXECUTE sofia/aaaaa/nobody@172.31.102.124 erlang(freeswitch_handler:! iris@vsvoasrqsd31)
      2014-09-04 13:26:49.983836 [DEBUG] mod_erlang_event.c:1510 enter erlang_outbound_function freeswitch_handler:! iris@vsvoasrqsd31
      2014-09-04 13:26:49.983836 [DEBUG] mod_erlang_event.c:1529 Using existing listener for session
      2014-09-04 13:26:49.983836 [DEBUG] mod_erlang_event.c:1541 Creating new spawned session for listener
      2014-09-04 13:26:49.983836 [DEBUG] mod_erlang_event.c:1388 Added session to listener
      2014-09-04 13:26:49.983836 [DEBUG] mod_erlang_event.c:1395 get_pid
      2014-09-04 13:26:49.983836 [DEBUG] mod_erlang_event.c:1421 Waiting for reply 9.0.0@freeswitch@vsvoasrqsd31 206a75d6-3437-11e4-b644-6dc1101da4c5
      2014-09-04 13:26:53.383848 [WARNING] sofia.c:4915 Ping failed hpbx_2 with code 503 - count 1/0/1, state DOWN
      2014-09-04 13:26:54.983841 [WARNING] mod_erlang_event.c:1428 Timed out when waiting for outbound pid 9.0.0@freeswitch@vsvoasrqsd31 206a75d6-3437-11e4-b644-6dc1101da4c5
      2014-09-04 13:26:54.983841 [NOTICE] mod_erlang_event.c:1429 Hangup sofia/aaaaa/nobody@172.31.102.124 [CS_EXECUTE] [DESTINATION_OUT_OF_ORDER]
      2014-09-04 13:26:54.983841 [DEBUG] switch_channel.c:3134 Send signal sofia/aaaaa/nobody@172.31.102.124 [KILL]
      2014-09-04 13:26:54.983841 [DEBUG] switch_core_session.c:1338 Send signal sofia/aaaaa/nobody@172.31.102.124 [BREAK]
      2014-09-04 13:26:54.983841 [DEBUG] mod_erlang_event.c:1557 exit erlang_outbound_function
      2014-09-04 13:26:54.983841 [DEBUG] mod_erlang_event.c:156 Sending event CHANNEL_HANGUP to attached session 206a75d6-3437-11e4-b644-6dc1101da4c5
      2014-09-04 13:26:54.983841 [DEBUG] switch_core_session.c:2798 sofia/aaaaa/nobody@172.31.102.124 skip receive message [APPLICATION_EXEC_COMPLETE] (channel is hungup already)
      2014-09-04 13:26:54.983841 [DEBUG] mod_erlang_event.c:156 Sending event CHANNEL_EXECUTE_COMPLETE to attached session 206a75d6-3437-11e4-b644-6dc1101da4c5
      2014-09-04 13:26:54.983841 [DEBUG] switch_cpp.cpp:1051 sofia/aaaaa/nobody@172.31.102.124 destroy/unlink session from object
      2014-09-04 13:26:54.983841 [DEBUG] switch_core_session.c:2798 sofia/aaaaa/nobody@172.31.102.124 skip receive message [APPLICATION_EXEC_COMPLETE] (channel is hungup already)
      2014-09-04 13:26:54.983841 [DEBUG] switch_core_state_machine.c:477 (sofia/aaaaa/nobody@172.31.102.124) State EXECUTE going to sleep
      2014-09-04 13:26:54.983841 [DEBUG] switch_core_state_machine.c:415 (sofia/aaaaa/nobody@172.31.102.124) Running State Change CS_HANGUP
      2014-09-04 13:26:54.983841 [DEBUG] mod_erlang_event.c:156 Sending event CHANNEL_EXECUTE_COMPLETE to attached session 206a75d6-3437-11e4-b644-6dc1101da4c5
      2014-09-04 13:26:54.983841 [DEBUG] mod_erlang_event.c:156 Sending event CHANNEL_STATE to attached session 206a75d6-3437-11e4-b644-6dc1101da4c5
      2014-09-04 13:26:54.983841 [DEBUG] switch_core_state_machine.c:678 (sofia/aaaaa/nobody@172.31.102.124) State HANGUP
      2014-09-04 13:26:54.983841 [DEBUG] mod_sofia.c:506 Channel sofia/aaaaa/nobody@172.31.102.124 hanging up, cause: DESTINATION_OUT_OF_ORDER
      2014-09-04 13:26:54.983841 [DEBUG] mod_sofia.c:640 Responding to INVITE with: 502
      2014-09-04 13:26:54.983841 [DEBUG] switch_core_state_machine.c:48 sofia/aaaaa/nobody@172.31.102.124 Standard HANGUP, cause: DESTINATION_OUT_OF_ORDER
      2014-09-04 13:26:54.983841 [DEBUG] switch_core_state_machine.c:678 (sofia/aaaaa/nobody@172.31.102.124) State HANGUP going to sleep
      2014-09-04 13:26:54.983841 [DEBUG] switch_core_state_machine.c:689 (sofia/aaaaa/nobody@172.31.102.124) Callstate Change RINGING -> HANGUP
      2014-09-04 13:26:54.983841 [DEBUG] switch_core_state_machine.c:446 (sofia/aaaaa/nobody@172.31.102.124) State Change CS_HANGUP -> CS_REPORTING
      2014-09-04 13:26:54.983841 [DEBUG] switch_core_session.c:1338 Send signal sofia/aaaaa/nobody@172.31.102.124 [BREAK]
      2014-09-04 13:26:54.983841 [DEBUG] switch_core_state_machine.c:415 (sofia/aaaaa/nobody@172.31.102.124) Running State Change CS_REPORTING
      2014-09-04 13:26:54.983841 [DEBUG] switch_core_state_machine.c:761 (sofia/aaaaa/nobody@172.31.102.124) State REPORTING
      2014-09-04 13:26:54.983841 [DEBUG] switch_core_state_machine.c:92 sofia/aaaaa/nobody@172.31.102.124 Standard REPORTING, cause: DESTINATION_OUT_OF_ORDER
      2014-09-04 13:26:54.983841 [DEBUG] switch_core_state_machine.c:761 (sofia/aaaaa/nobody@172.31.102.124) State REPORTING going to sleep
      send 641 bytes to udp/[172.31.102.124]:5060 at 13:26:54.993926:
         ------------------------------------------------------------------------
         SIP/2.0 502 Bad Gateway
         Via: SIP/2.0/UDP 172.31.102.124:5060;rport=5060;branch=z9hG4bKPjxwocr7.J76ANooqaLAK.ORL0wCozv-Ld
         Max-Forwards: 70
         From: <sip:172.31.102.124>;tag=9s6r75EiDSMLaaT7acpF2Dz6VpyAGVmI
         To: <sip:1004@vsvoasrqsd31.eng.aaaaa.net>;tag=Z2Qy0j2F089rp
         Call-ID: MvurEJonnObJ3CeE-GGiOeY2bkEmtW3m
         CSeq: 6862 INVITE
         User-Agent: aaaaa Voice
         Accept: application/sdp
         Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
         Supported: timer, precondition, path, replaces
         Allow-Events: talk, hold, conference, refer
         Reason: Q.850;cause=27;text="DESTINATION_OUT_OF_ORDER"
         Content-Length: 0
         
         ------------------------------------------------------------------------
      
      

      freeswitch@default> erlang sessions iris@vsvoasrqsd31
      Outbound session for 031f1664-3462-11e4-b65c-6dc1101da4c5 in state CS_DESTROY
      Outbound session for fdc53496-3461-11e4-b654-6dc1101da4c5 in state CS_DESTROY
      Outbound session for f875e346-3461-11e4-b64c-6dc1101da4c5 in state CS_DESTROY
      Outbound session for 206a75d6-3437-11e4-b644-6dc1101da4c5 in state CS_DESTROY

      
      

        Attachments

          Activity

            People

            • Assignee:
              brian@freeswitch.org Brian West
              Reporter:
              jcherukuri_necc Jyotshna Cherukuri
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: