Asterisk
  1. Asterisk
  2. ASTERISK-26738

Frequent segfaults since activation of DNS SRV, in pjsip_auth_clt_reinit_req at /pjsip/sip_auth_client.c, and pj_atomic_inc_and_get at pj/os_core_unix.c

    Details

    • Type: Bug Bug
    • Status: Closed
    • Severity: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 13.13.1
    • Target Release Version/s: 13.15.0, 14.4.0, 15.0.0
    • Component/s: Resources/res_pjsip
    • Security Level: None
    • Labels:
      None
    • Environment:
      Centos 6 64bit
      FreePBX 13.0.190.7
      IPv4 and IPv6
      dual core processor
    • Frequency of Occurrence:
      Frequent

      Description

      After switching to DNS SRV w/ 5 parallel trunks I'm getting frequent segfaults like the attached one. Backtrace is built on base of patched Schmooze RPM source package:

      • Patch to get libasteriskpj.so.2 symbols
      • Patch from ASTERISK-26675 (segfault has been seen already w/o this patch - but it doesn't obviously fix this problem)

      Parallel running tcpdump shows, that REGISTER is sent at the time of the crash.
      In detail:

      • The DNS SRV entry has two hostnames (see ASTERISK-26735). All the time before the crash, ipaddress 217.0.23.108 is used for REGISTER.
      • At the moment of the crash, 2(!!) REGISTERS are sent nearly at the same time (0.01s difference) for the same trunk! The first to 217.0.23.140, the second to the usual 217.0.23.108. The answer from 217.0.23.108 comes first (200 ok), the answer from 217.0.23.140 comes 0.09s later and is 401 unauthorized. That's the end. Now the crash appears.
      1. backtrace-2017-01-20T21.21.25.txt
        58 kB
        Michael Maier
      2. backtrace-2017-01-20T23.21.00+0100.txt
        53 kB
        Michael Maier
      3. backtrace-2017-01-21T05.19.00+0100.txt
        55 kB
        Michael Maier
      4. backtrace-2017-01-21T12.43.36+0100.txt
        57 kB
        Michael Maier
      5. backtrace-2017-02-14T21.29.39+0100.txt
        65 kB
        Michael Maier
      6. debug-2017-01-21T12.43.36+0100.txt
        2 kB
        Michael Maier

        Issue Links

          Activity

          Hide
          Friendly Automation added a comment -

          Change 5041 merged by zuul:
          pjproject: Fixes to resolve DNS SRV crashes.

          https://gerrit.asterisk.org/5041

          Show
          Friendly Automation added a comment - Change 5041 merged by zuul: pjproject: Fixes to resolve DNS SRV crashes. https://gerrit.asterisk.org/5041
          Hide
          Friendly Automation added a comment -

          Change 5030 merged by Joshua Colp:
          pjproject: Increase SENDER_WIDTH column size for 64-bit system logs.

          https://gerrit.asterisk.org/5030

          Show
          Friendly Automation added a comment - Change 5030 merged by Joshua Colp: pjproject: Increase SENDER_WIDTH column size for 64-bit system logs. https://gerrit.asterisk.org/5030
          Hide
          Friendly Automation added a comment -

          Change 5031 merged by Joshua Colp:
          pjproject: Fixes to resolve DNS SRV crashes.

          https://gerrit.asterisk.org/5031

          Show
          Friendly Automation added a comment - Change 5031 merged by Joshua Colp: pjproject: Fixes to resolve DNS SRV crashes. https://gerrit.asterisk.org/5031
          Hide
          Friendly Automation added a comment -

          Change 5033 merged by Joshua Colp:
          pjproject: Increase SENDER_WIDTH column size for 64-bit system logs.

          https://gerrit.asterisk.org/5033

          Show
          Friendly Automation added a comment - Change 5033 merged by Joshua Colp: pjproject: Increase SENDER_WIDTH column size for 64-bit system logs. https://gerrit.asterisk.org/5033
          Hide
          Friendly Automation added a comment -

          Change 5034 merged by Joshua Colp:
          pjproject: Fixes to resolve DNS SRV crashes.

          https://gerrit.asterisk.org/5034

          Show
          Friendly Automation added a comment - Change 5034 merged by Joshua Colp: pjproject: Fixes to resolve DNS SRV crashes. https://gerrit.asterisk.org/5034

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development