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

uuid_media_3p - seg fault on 2nd attempt

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6.10
    • Fix Version/s: None
    • Component/s: freeswitch-core
    • Security Level: public
    • Labels:
      None
    • CPU Architecture:
      x86-64
    • Kernel:
      Linux
    • Userland:
      GNU/Linux
    • Distribution:
      Ubuntu
    • Distribution Version:
      Ubuntu 14.04 LTS
    • Compiler:
      gcc
    • Compiler Version:
      gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
    • FreeSWITCH GIT Revision:
      18dbefa6dab992cd86211584eca916584234708c
    • GIT Master Revision hash::
      44d5ece4a954dc42ebe0a5fdb3a63aaf6cc764d1

      Description

      Second use of uuid_media_3p causes freswitch to seg fault.

      "uuid_media_3p <uuid>" followed by "uuid_media_3p off <uuid>" works fine. Freeswitch re-invites to capture and release media as expected.

      call "uuid_media_3p <uuid> " again to capture the media again and FS will seg fault.

      looking at a back trace from the core_dump it looks like strlen(r_sdp) is being passed something it doesn't like, probably NULL. @ src/switch_core_media.c:3746



      Full back trace:
      Core was generated by `/usr/bin/freeswitch -u freeswitch -ncwait'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0 strlen () at ../sysdeps/x86_64/strlen.S:106
      106 ../sysdeps/x86_64/strlen.S: No such file or directory.
      (gdb) bt
      #0 strlen () at ../sysdeps/x86_64/strlen.S:106
      #1 0x00007f617a919274 in switch_core_media_negotiate_sdp (session=0x7f614c1ca238, r_sdp=0x0, proceed=0x7f6149a0f39f "", sdp_type=SDP_TYPE_REQUEST) at src/switch_core_media.c:3746
      #2 0x00007f617105d385 in ?? () from /usr/lib/freeswitch/mod/mod_sofia.so
      #3 0x00007f617103588f in ?? () from /usr/lib/freeswitch/mod/mod_sofia.so
      #4 0x00007f6171037d9b in ?? () from /usr/lib/freeswitch/mod/mod_sofia.so
      #5 0x00007f6171003f49 in ?? () from /usr/lib/freeswitch/mod/mod_sofia.so
      #6 0x00007f617a8f6af5 in switch_core_session_perform_receive_message (session=session@entry=0x7f614c1ca238, message=message@entry=0x7f6149a10af0,
          file=file@entry=0x7f617ac0c985 "src/switch_ivr.c", func=func@entry=0x7f617ac0d7f0 <__func__.17963> "switch_ivr_parse_signal_data", line=line@entry=847) at src/switch_core_session.c:785
      #7 0x00007f617a99412c in switch_ivr_parse_signal_data (session=session@entry=0x7f614c1ca238, all=all@entry=SWITCH_TRUE, only_session_thread=only_session_thread@entry=SWITCH_FALSE)
          at src/switch_ivr.c:847
      #8 0x00007f617a99417c in switch_ivr_parse_all_signal_data (session=session@entry=0x7f614c1ca238) at src/switch_ivr.c:860
      #9 0x00007f617a994197 in switch_ivr_parse_all_messages (session=session@entry=0x7f614c1ca238) at src/switch_ivr.c:806
      #10 0x00007f617a99671e in switch_ivr_parse_all_events (session=session@entry=0x7f614c1ca238) at src/switch_ivr.c:872
      #11 0x00007f617a8fed9f in switch_core_session_run (session=0x7f614c1ca238) at src/switch_core_state_machine.c:674
      #12 0x00007f617a8f84fe in switch_core_session_thread (thread=<optimized out>, obj=0x7f614c1ca238) at src/switch_core_session.c:1630
      #13 0x00007f617a8f4233 in switch_core_session_thread_pool_worker (thread=0x7f614c1e54d0, obj=<optimized out>) at src/switch_core_session.c:1693
      #14 0x00007f617abb48d0 in dummy_worker (opaque=0x7f614c1e54d0) at threadproc/unix/thread.c:151
      #15 0x00007f617a651184 in start_thread (arg=0x7f6149a11700) at pthread_create.c:312
      #16 0x00007f617a37e37d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111


      DIALPLAN:
          <extension name="TelcoToEnterprise_VFestTLSnoSRTP">
              <condition field="${sip_h_X-SourceGroup}" expression="^103$"/>
                      <action application="export" data="sip_append_audio_sdp=a=fmtp:18 annexb=no"/>
                      <action application="export" data="rtp_rewrite_timestamps=true"/>
                      <action application="export" data="suppress_cng=true"/>

                     <!-- sip_invite_call_id is require so that the channel create event can have a Sip Call Id recognised from the C# code -->
                      <action application="export" data="sip_invite_call_id=${sip_call_id}"/>
                      <action application="set" data="effective_caller_id_name=_undef_"/>
                      <action application="export" data="nolocal:sip_invite_from_uri=${sip_full_from}" />

                     <!-- codec control -->
                      <action application="set" data="inherit_codec=true"/>
                      <action application="export" data="media_mix_inbound_outbound_codecs=true"/>

                      <action application="export" data="rtp_jitter_buffer_during_bridge=true"/>
                      <action application="export" data="jitterbuffer_msec=40"/>
                      <action application="export" data="rtp_manual_rtp_bugs=FLUSH_JB_ON_DTMF"/>
                     <!-- On Demand Media Variables -->


                      <action application="lua" data="/etc/freeswitch/scripts/lua/api/V1/SetupMedia.lua" />
                      <action application="export" data="nolocal:sip_h_P-Asserted-Identity=sip:${sip_from_uri};${sip_from_params}" />


                      <!-- Dial to other trunk -->
                      <action application="bridge" data="{sip_wait_for_aleg_ack=true,ignore_early_media=ring_ready,sip_h_X-Gateway=104:8}sofia/VodafoneSV/${sip_req_uri};${sip_req_params}"/>
              </condition>

          </extension>


      unusual SIPPROFILE SETTINGS:

          <param name="proxy-refer" value="true" />
          <param name="inbound-late-negotiation" value="true"/>
          <param name="enable-3pcc" value="proxy"/>


      anything else you need? let me know!

        Attachments

          Activity

            People

            • Assignee:
              anthm Anthony Minessale II
              Reporter:
              RWMoore Rob Moore
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: