繁体   English   中英

TNonblockingIOThread :: notify中的节俭分段错误(TNonblockingServer :: TConnection * conn)

[英]thrift segmentation fault in TNonblockingIOThread::notify(TNonblockingServer::TConnection* conn)

bt日志:

signal 11 (Segmentation fault), address is (nil) from 0x7f0280708196
[bt]: (1) /lib/x86_64-linux-gnu/libc.so.6(abort+0x2d6) [0x7f0280708196]
[bt]: (2) /lib/x86_64-linux-gnu/libc.so.6(abort+0x2d6) [0x7f0280708196]
[bt]: (3) /lib/x86_64-linux-gnu/libc.so.6(+0x777ea) [0x7f02807487ea]
[bt]: (4) /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c) 
[0x7f02807ea15c]
[bt]: (5) /lib/x86_64-linux-gnu/libc.so.6(+0x117160) [0x7f02807e8160]
[bt]: (6) /lib/x86_64-linux-gnu/libc.so.6(+0x1190a7) [0x7f02807ea0a7]
[bt]: (7) ./bazel-bin/weardex-search-replica(_ZN6apache6thrift6server20TNonblockingIOThread6notifyEPNS1_18TNonblockingServer11TConnectionE+0x95) [0x18b4aa5]
[bt]: (8) ./bazel-bin/weardex-search-replica(_ZN6apache6thrift6server18TNonblockingServer11TConnection4Task3runEv+0x2a7) [0x18bc2a7]
[bt]: (9) ./bazel-bin/weardex-search-replica(_ZN6apache6thrift11concurrency13ThreadManager6Worker3runEv+0x512) [0x189cdc2]
[bt]: (10) ./bazel-bin/weardex-search-replica(_ZN6apache6thrift11concurrency13PthreadThread10threadMainEPv+0xd6) [0x18aff26]
[bt]: (11) /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba) [0x7f0281d0d6ba]
[bt]: (12) /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f02807d841d]

启动服务器的代码:

std::shared_ptr<ReplicaIndexingServiceHandler> handler(new ReplicaIndexingServiceHandler(raft));
std::shared_ptr<TProcessor> processor(new ReplicaIndexingServiceProcessor(handler));
std::shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
std::shared_ptr<TNonblockingServerTransport> transport(new TNonblockingServerSocket(FLAGS_thrift_port));

std::shared_ptr<ThreadManager> threadManager = ThreadManager::newSimpleThreadManager(FLAGS_thrift_worker_count);
std::shared_ptr<PosixThreadFactory> threadFactory = std::shared_ptr<PosixThreadFactory>(new PosixThreadFactory());
threadManager->threadFactory(threadFactory);
threadManager->start();

_server = std::make_shared<TNonblockingServer>(processor, protocolFactory, transport, threadManager);

LOG(INFO) << "thrift server going to start at port: " << FLAGS_thrift_port;
try {
    _server->serve();
} catch (std::exception& tx) {
    LOG(ERROR) << "thrift server exception, err: " << tx.what();
}

我尝试过节俭的0.9.3和0.11.0,但它们都在同一地方失败了。

我有几百台旧服务器,例如1%的服务器将始终在此位置崩溃。

升级到V0.12.0可以解决分段错误,但是V0.12.0尚未正式发布。 我发现相关票证已更改了已崩溃的错误: THRIFT-4618

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM