GithubHelp home page GithubHelp logo

TSeerServer不稳定 core about tseer HOT 2 OPEN

tencent avatar tencent commented on May 22, 2024
TSeerServer不稳定 core

from tseer.

Comments (2)

troycheng avatar troycheng commented on May 22, 2024

/home/tcheng/tools/TSeer/TseerServer/src/RequestEtcdCallback.cpp:1299 就是一个日志输出语句:

ETCDPROC_LOG << ETCDFILE_FUN << "|response,ret= " << ret << "|retryTime= " << retryTime << endl;

其中ETCDFILE_FUN是一个宏定义:

#define ETCDFILE_FUN FILE_FUN <<EtcdReqStr(_etcdReqInfo)<<"|"

而EtcdReqStr这个函数,就是一个字符串拼接:

273 inline string EtcdReqStr(const EtcdReqestInfo& etcdReqInfo)
274 {
275     string client;
276     if (etcdReqInfo.current)
277     {
278         client = etcdReqInfo.current->getIp();
279     }
280     else
281     {
282         client = "NULL";
283     }
284     return "client=" + client + "|" + \
285             ActionStr(etcdReqInfo.etcdAction) + "|" +\
286             etcdReqInfo.moduletype + "." + \
287             etcdReqInfo.application + "." + \
288             etcdReqInfo.service_name + "|" + \
289             etcdReqInfo.node_name + "_" + \
290             etcdReqInfo.container_name + "|etcdhost=" + \
291             etcdReqInfo.etcdHost + ":" + \
292             TC_Common::tostr(etcdReqInfo.etcdPort) + "|" + \
293             MSTIMEINSTR(etcdReqInfo.startTime);
294 }

其中etcdReqInfo.current->getIp();也是直接返回_ip这个字符串,这个字符串初始值也是“NULL”,整个过程看起来并没有什么问题。目前是改写了一下这个函数,新加了一些日志,期望下次 core 的时候能有额外的发现

from tseer.

troycheng avatar troycheng commented on May 22, 2024

回头来继续看了一下这个问题,对最近的几次 core 分析,代码有修改,位置也有所不同,都最终都是 core 在
ETCDPROC_LOG << ETCDFILE_FUN << "|response,ret= " << ret << "|retryTime= " << retryTime << endl;
这一句里,只是每次断点位置不太一样,鉴于其它部分都是字符串拼接,这个 logger有问题的可能性比较大。其中一次的断点位置在 LoggerStream 的析构函数里,目前触发条件仍未理清,但感觉排查方向应该是对了

#0  0x00007fe20422aa1c in free () from /lib64/libc.so.6
#1  0x000000000063c7eb in std::ios_base::~ios_base() () at ../../../.././libstdc++-v3/src/c++98/ios.cc:93
#2  0x00000000004b6f56 in tars::LoggerStream::~LoggerStream() () at /mnt/homework/gcc/gcc/include/c++/4.8.2/bits/basic_ios.h:276

from tseer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.