Skip to content
This repository was archived by the owner on Aug 30, 2022. It is now read-only.

invoke set_tag from lua core in jaegertracing::Span::SetTag(opentracing::v2::string_view, opentracing::v2::Value const&) () #139

Closed
dengguojie opened this issue Dec 7, 2018 · 4 comments

Comments

@dengguojie
Copy link

dengguojie commented Dec 7, 2018

(gdb) bt
#0 0x00007f62e0aa2dc9 in __memcpy_ssse3_back () from /lib64/libc.so.6
#1 0x00007f62db5ae12a in void std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) [clone .isra.210] () from /home/xx/dispatcher/nginx/lualib/libjaegertracing_plugin.linux_amd64.so
#2 0x00007f62db5b11af in opentracing::v2::Value::Value(opentracing::v2::Value const&) () from /home/xx/dispatcher/nginx/lualib/libjaegertracing_plugin.linux_amd64.so
#3 0x00007f62db5b2321 in jaegertracing::Span::SetTag(opentracing::v2::string_view, opentracing::v2::Value const&) ()
from /home/xx/dispatcher/nginx/lualib/libjaegertracing_plugin.linux_amd64.so
#4 0x00007f62dbf2eb2b in lua_bridge_tracer::(anonymous namespace)::DynamicSpan::SetTag(opentracing::v2::string_view, opentracing::v2::Value const&) ()
from /home/xx/dispatcher/nginx/lualib/opentracing_bridge_tracer.so
#5 0x00007f62dbf38745 in lua_bridge_tracer::LuaSpan::set_tag(lua_State*) () from /home/xx/dispatcher/nginx/lualib/opentracing_bridge_tracer.so
#6 0x00007f62e1b538fe in lj_BC_FUNCC () from /home/xx/dispatcher/nginx/sbin/../../luajit/lib/libluajit-5.1.so.2

@isaachier
Copy link
Contributor

I'm going to guess this is an issue of using a string_view improperly from lua.

@dengguojie
Copy link
Author

But #2 stack shows the opentracing::Value where i guess is:
template
Tag(const std::string& key, ValueArg&& value)
: _key(key)
, _value(std::forward(value))
{
}
in https://github.com/jaegertracing/jaeger-client-cpp/blob/master/src/jaegertracing/Tag.h

@dengguojie
Copy link
Author

when i call like
span:set_tag("span.kind", 'client') --string
it will core
But
span:set_tag("span.kind", 12345) --number
it will be OK

@isaachier
Copy link
Contributor

Either way, it is an issue in the Lua tracer or an issue in the Value move constructor defined in opentracing-cpp. This should not be a Jaeger issue. Sorry I am not sure on the details to help more here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants