fixee commented on issue #961: 服务中可能会使什么原因导致CLOSE_WAIT出现 URL: https://github.com/apache/incubator-brpc/issues/961#issuecomment-551058254 worker线程: #0 0x00007f60a1032bf9 in syscall () from /lib64/libc.so.6 #1 0x00007f60a3d1c382 in construct<butil::ResourcePoolFreeChunk<bthread::Id, 0ul>*, butil::ResourcePoolFreeChunk<bthread::Id, 0ul>* const&> (__p=0xfffffffffffffe00, this=0x7f5747a0d050) at /usr/include/c++/4.8.2/ext/new_allocator.h:120 #2 _S_construct<butil::ResourcePoolFreeChunk<bthread::Id, 0ul>*, butil::ResourcePoolFreeChunk<bthread::Id, 0ul>* const&> (__p=0xfffffffffffffe00, __a=...) at /usr/include/c++/4.8.2/bits/alloc_traits.h:254 #3 construct<butil::ResourcePoolFreeChunk<bthread::Id, 0ul>*, butil::ResourcePoolFreeChunk<bthread::Id, 0ul>* const&> (__p=0xfffffffffffffe00, __a=...) at /usr/include/c++/4.8.2/bits/alloc_traits.h:393 #4 push_back (__x=@0x7f57491fe6a0: 0x0, this=0x7f5747a0d050) at /usr/include/c++/4.8.2/bits/stl_vector.h:905 #5 push_free_chunk (c=..., this=0x7f5747a0d050) at /home/jenkins/workspace/brpc/src/butil/resource_pool_inl.h:534 #6 return_resource (id=..., this=0x7f5747a0d000) at /home/jenkins/workspace/brpc/src/butil/resource_pool_inl.h:231 #7 return_resource (id=..., this=<optimized out>) at /home/jenkins/workspace/brpc/src/butil/resource_pool_inl.h:306 #8 return_resource<bthread::Id> (id=...) at /home/jenkins/workspace/brpc/src/butil/resource_pool.h:115 #9 bthread_id_unlock_and_destroy (id=...) at /home/jenkins/workspace/brpc/src/bthread/id.cpp:634 #10 0x00007f60a3d1e9bb in set_data (data=<optimized out>, key=..., this=<optimized out>) at /home/jenkins/workspace/brpc/src/bthread/key.cpp:194 #11 bthread_keytable_pool_reserve (pool=0x7f5fb5777580, nfree=<optimized out>, key=..., ctor=<optimized out>, ctor_args=<optimized out>) at /home/jenkins/workspace/brpc/src/bthread/key.cpp:362 #12 0x00007f60a3d0a2e6 in ~lock_guard (this=<synthetic pointer>, __in_chrg=<optimized out>) at /home/jenkins/workspace/brpc/src/butil/scoped_lock.h:172 #13 get_or_new_local_pool (this=<optimized out>) at /home/jenkins/workspace/brpc/src/butil/object_pool_inl.h:392 #14 return_object (ptr=<optimized out>, this=<optimized out>) at /home/jenkins/workspace/brpc/src/butil/object_pool_inl.h:250 #15 return_object<bthread::StackFactory<bthread::LargeStackClass>::Wrapper> (ptr=<optimized out>) at /home/jenkins/workspace/brpc/src/butil/object_pool.h:93 #16 return_stack (sc=<optimized out>) at /home/jenkins/workspace/brpc/src/bthread/stack_inl.h:72 #17 bthread::return_stack (s=<optimized out>) at /home/jenkins/workspace/brpc/src/bthread/stack_inl.h:122 #18 0x00007f60a1309dc5 in start_thread () from /lib64/libpthread.so.0 #19 0x00007f60a103873d in clone () from /lib64/libc.so.6 main 线程: #0 0x00007f60a130d6d5 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 #1 0x00007f60a3db31f8 in brpc::Socket::Write (this=<optimized out>, msg=..., options_in=<optimized out>) at /home/jenkins/workspace/brpc/src/brpc/socket.cpp:1535 #2 0x00007f60a3dc9121 in http_request (this=0x7ffdd9d26f40) at /home/jenkins/workspace/brpc/src/brpc/controller.h:211 #3 brpc::VarsService::default_method (this=<optimized out>, cntl_base=0x7ffdd9d26f40, done=0x1) at /home/jenkins/workspace/brpc/src/brpc/builtin/vars_service.cpp:341 #4 0x0000000000437434 in util::Util::RunUntilSendQuit(brpc::Server&, std::function<void ()>, std::function<void ()>) (server=..., before=..., after=...) at /home/work/buildspace/aa2f735022/src/util.cpp:64 #5 0x000000000042ed66 in main (argc=1, argv=0x7ffdd9d27690) at /home/work/buildspace/aa2f735022/src/server.cpp:191 上面贴了pstack产出的两个线程的调用栈, @jamesge 大神能帮忙看看吗?
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org