Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行echo demo 直接 coredump 了 #425

Closed
xikong opened this issue Jul 30, 2018 · 0 comments
Closed

运行echo demo 直接 coredump 了 #425

xikong opened this issue Jul 30, 2018 · 0 comments

Comments

@xikong
Copy link

xikong commented Jul 30, 2018

操作系统: CentOS release 6.8 (Final)
内核版本:Linux personal-vpc-training-dev001-whdx.qiyi.virtual 2.6.32-642.el6.x86_64 #1 SMP Tue May 10 17:27:01 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
编译器: g++ (GCC) 4.8.2
编译选项:-DBRPC_WITH_GLOG=1 -DGFLAGS_NS=google -DBTHREAD_USE_FAST_PTHREAD_MUTEX -D__const__= -D_GNU_SOURCE -DUSE_SYMBOLIZE -DNO_TCMALLOC -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DBRPC_REVISIO N="" -D__STRICT_ANSI__ -gdwarf-2 -O0 -pipe -Wall -W -fPIC -fstrict-aliasing -Wno-invalid-offsetof -Wno-unused-parameter -fno-omit-frame-pointer -std=c++11 -msse4 -msse4.2 -DNDEBUG -I/data/open_source/brpc/src -I/data/open_source/brpc/build -I/data/open_source/brpc /build/src
堆栈:
#0 0x0000000000455e65 in std::__atomic_base::fetch_sub (this=0x300000000, __i=1, __m=std::memory_order_release) at /usr/local/gcc4.8.2/include/c++/4.8.2/bits/atomic_base.h:624
624 { return __atomic_fetch_sub(&_M_i, __i, __m); }
Missing separate debuginfos, use: debuginfo-install cyrus-sasl-lib-2.1.23-15.el6_6.2.x86_64 gflags-2.0-1.el6.x86_64 glibc-2.12-1.192.el6.x86_64 glog-0.3.2-1.el6.x86_64 glog-devel-0.3.2-1.el6.x86_64 keyutils-libs-1.4-5.el6.x86_64 krb5-libs-1.10.3-57.el6.x86_64 libcom_err-1.41.12-22.el6.x86_64 librdkafka1-0.9.3-1.el6.x86_64 libselinux-2.0.94-7.el6.x86_64 nss-softokn-freebl-3.14.3-23.3.el6_8.x86_64 openssl-1.0.1e-48.el6_8.4.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) bt
#0 0x0000000000455e65 in std::__atomic_base::fetch_sub (this=0x300000000, __i=1, __m=std::memory_order_release) at /usr/local/gcc4.8.2/include/c++/4.8.2/bits/atomic_base.h:624
#1 0x0000000000454bcc in butil::IOBuf::Block::dec_ref (this=0x300000000) at /data/open_source/brpc/src/butil/iobuf.cpp:253
#2 0x000000000044feb3 in butil::IOBuf::clear (this=0x7ffdb5f40c28) at /data/open_source/brpc/src/butil/iobuf.cpp:718
#3 0x0000000000456b38 in brpc::Controller::DeleteStuff (this=0x7ffdb5f40a80) at /data/open_source/brpc/src/brpc/controller.cpp:177
#4 0x0000000000456762 in brpc::Controller::~Controller (this=0x7ffdb5f40a80, __in_chrg=) at /data/open_source/brpc/src/brpc/controller.cpp:130
#5 0x0000000000444a16 in main (argc=1, argv=0x7ffdb5f40e78) at client.cpp:71

我是用 cmake 编译的稍微改了下编译选项(不改也会 core)

  • 将 -g 改成了 -gdwarf-2
  • 将 -O2 改成了 -O0

服务端和客户端都会 core, 都是 core 在那个位置
望各位大佬看下

@xikong xikong closed this as completed Jul 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant