Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-4793

C++ API doesn't reattach to stats.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: CPP API
    • Labels:
      None

      Description

      If you have multiple plugins that need to increment the same metrics, the C++ API fails to reattach to the existing metrics:

      FATAL: RecRawStats.cc:551: failed assertion `false`
      traffic_server: using root directory '/n/trafficserver'
      [Aug 26 21:42:21.974] {0x2b3ec6e06340} NOTE: crashlog started, target=12081, debug=false syslog=true, uid=0 euid=0
      [Aug 26 21:42:21.976] {0x2b3ec6e06340} NOTE: logging to 0x182c330
      [Aug 26 21:42:21.998] {0x2b3ec6e06340} ERROR: wrote crash log to /n/log/trafficserver/crash-2016-08-26-214221.log
      traffic_server: Aborted (Signal sent by tkill() 12081 1007)
      traffic_server - STACK TRACE:
      /n/trafficserver/bin/traffic_server(_Z19crash_logger_invokeiP9siginfo_tPv+0x8e)[0x4acb7e]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x10330)[0x2b5aff773330]
      /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37)[0x2b5b003dbc37]
      /lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x2b5b003df028]
      /n/trafficserver/lib/libtsutil.so.7(+0x29061)[0x2b5afe71e061]
      /n/trafficserver/lib/libtsutil.so.7(+0x272e5)[0x2b5afe71c2e5]
      /n/trafficserver/bin/traffic_server[0x76814b]
      /n/trafficserver/bin/traffic_server(_Z19_RecRegisterRawStatP15RecRawStatBlock4RecTPKc8RecDataT11RecPersistTiPFiS3_S4_P7RecDataS0_iE+0xb8)[0x768208]
      /n/trafficserver/bin/traffic_server(TSStatCreate+0x69)[0x4cda39]
      /n/trafficserver/lib/libatscppapi.so.7(_ZN9atscppapi4Stat4initESsNS0_8SyncTypeEb+0x2d)[0x2b5b024f1d6d]
      /n/trafficserver/libexec/neumob-nproxy.so(TSPluginInit+0x259)[0x2b5b0291ac0e]
      /n/trafficserver/bin/traffic_server(_Z11plugin_initb+0x3cf)[0x4e768f]
      /n/trafficserver/bin/traffic_server(main+0x1077)[0x4956c7]
      /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x2b5b003c6f45]
      

      This happens because it calls TSStatCreate twice.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jamespeach James Peach
                Reporter:
                jamespeach James Peach
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m