[ 
https://issues.apache.org/jira/browse/TS-4793?focusedWorklogId=27310&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-27310
 ]

ASF GitHub Bot logged work on TS-4793:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 26/Aug/16 22:14
            Start Date: 26/Aug/16 22:14
    Worklog Time Spent: 10m 
      Work Description: GitHub user jpeach opened a pull request:

    https://github.com/apache/trafficserver/pull/936

    TS-4793: Make the C++ API reattach to existing stats.

    Sometimes you want multiple plugins to increment the same stats,
    or you create transient objects that emit stats. In these cases,
    we should reattach to an existing stat rather than trigerring
    assertions trying to recreate them.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jpeach/trafficserver fix/4793

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafficserver/pull/936.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #936
    
----
commit 98d0246494d681a6249153adf8311164f53502a2
Author: James Peach <[email protected]>
Date:   2016-08-26T22:04:49Z

    TS-4793: Make the C++ API reattach to existing stats.
    
    Sometimes you want multiple plugins to increment the same stats,
    or you create transient objects that emit stats. In these cases,
    we should reattach to an existing stat rather than trigerring
    assertions trying to recreate them.

----


Issue Time Tracking
-------------------

            Worklog Id:     (was: 27310)
            Time Spent: 10m
    Remaining Estimate: 0h

> C++ API doesn't reattach to stats.
> ----------------------------------
>
>                 Key: TS-4793
>                 URL: https://issues.apache.org/jira/browse/TS-4793
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: CPP API
>            Reporter: James Peach
>            Assignee: James Peach
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> If you have multiple plugins that need to increment the same metrics, the C++ 
> API fails to reattach to the existing metrics:
> {noformat}
> 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]
> {noformat}
> This happens because it calls {{TSStatCreate}} twice.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to