-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
零星的crash #2461
Copy link
Copy link
Open
Description
您好,我一直使用drogon作为http请求的工具,总体而言非常稳定高效。
我的使用方法是开启一个单独的线程
std::thread t([] () {
sigset_t sigset;
sigemptyset(&sigset);
sigaddset(&sigset, SIGINT);
pthread_sigmask(SIG_BLOCK, &sigset, nullptr);
// drogon::app().setIntSignalHandler(sg);
int cpu_cnt = util::common_util::GetCpuCount();
drogon::app().disableSigtermHandling().setThreadNum(MAX(cpu_cnt - 2, 2)).run();
// drogon::app().addListener("0.0.0.0", 80);
// drogon::app().run();
});
t.detach();
然后调用这个函数,传入回调处理函数
ptr_->sendRequest(req_ptr, [f] (const drogon::ReqResult & rq, const drogon::HttpResponsePtr & hh) { f(rq, hh); }, 2);
最近有一些零星的crash发生,core dump之后gdb的结果是
(gdb) where
#0 0x00007fb702f4eafe in epoll_wait () from /lib64/libc.so.6
#1 0x00007fb70381a37a in trantor::EpollPoller::poll(int, std::vector<trantor::Channel*, std::allocator<trantor::Channel*> >*) () from /usr/local/lib/libhttp_util.so
#2 0x00007fb7037f5b18 in trantor::EventLoop::loop() () from /usr/local/lib/libhttp_util.so
#3 0x00007fb7037268da in drogon::HttpAppFrameworkImpl::run() () from /usr/local/lib/libhttp_util.so
#4 0x000000000041b5d6 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<main::{lambda()#1}> > >::_M_run() [clone .lto_priv.0] ()
#5 0x00007fb70355419d in std::execute_native_thread_routine (__p=0xb2ea820) at /home/nwani/m3/conda-bld/compilers_linux-64_1560109574129/work/.build/x86_64-conda_cos6-linux-gnu/src/gcc/libstdc++-v3/src/c++11/thread.cc:80
#6 0x00007fb702e9f832 in start_thread () from /lib64/libc.so.6
#7 0x00007fb702e3f480 in clone3 () from /lib64/libc.so.6
似乎是epoll这里crash了,不知道是不是和机器负载太大有关
这个crash发生的频率不高,但是是经常发生(有的时候一天几次,有的时候几天一次,都是相同的crash点)
希望您能给一些排查建议,十分感谢
ps. 我使用的版本是commit 7877fdc 去年11月14日的那个版本
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels