You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "James Peach (JIRA)" <ji...@apache.org> on 2016/11/09 18:35:58 UTC

[jira] [Resolved] (TS-4840) Crash when reattaching to C++ API Stats.

     [ https://issues.apache.org/jira/browse/TS-4840?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Peach resolved TS-4840.
-----------------------------
    Resolution: Fixed

> Crash when reattaching to C++ API Stats.
> ----------------------------------------
>
>                 Key: TS-4840
>                 URL: https://issues.apache.org/jira/browse/TS-4840
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: CPP API, Metrics
>    Affects Versions: 7.0.0
>            Reporter: James Peach
>            Assignee: James Peach
>            Priority: Blocker
>             Fix For: 7.1.0
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> {noformat}
> Program received signal SIGSEGV, Segmentation fault.
> 0x00000000007f733c in ink_atomic_swap<long> (mem=0x0, value=1) at ../../lib/ts/ink_atomic.h:76
> 76	  return __sync_lock_test_and_set(mem, value);
> (gdb) where
> #0  0x00000000007f733c in ink_atomic_swap<long> (mem=0x0, value=1) at ../../lib/ts/ink_atomic.h:76
> #1  0x00000000007f6e56 in RecSetGlobalRawStatSum (rsb=0x2f16290, id=6, data=1) at RecRawStats.cc:482
> #2  0x00000000005372c9 in TSStatIntSet (the_stat=6, value=1) at InkAPI.cc:6944
> #3  0x00002ae6d3398bb1 in atscppapi::Stat::set (this=0x2ae6d37c2890 <...>, value=1) at Stat.cc:78
> #4  0x00002ae6d35bb826 in TSPluginInit (argc=1, argv=0x7ffd0613bfe0) at /home/jpeach/n/....cc:753
> #5  0x00000000005550e5 in plugin_load (argc=1, argv=0x7ffd0613bfe0, validateOnly=false) at Plugin.cc:137
> {noformat}
> The change in TS-4793 regressed the C++ API Stat object. What happens is that if you restart {{traffic_server}} without {{traffic_manager}}, the {{TSStatFindName}} call finds the metric in the records hash table, but {{traffic_server}} has not set up the RSB entry so actually incrementing it crashes.
> If you call {{TSStatCreate}} twice for the same metric, you will end up with multiple RSB slots being consumed which is almost as bad.



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