程序coredump的原因? #611
CheNsiR-MASTER
started this conversation in
General
Replies: 1 comment
-
看样子是你的 thread function 抛了一个异常,但是没有 catch。 79 try
80 {
81 func_();
82 muduo::CurrentThread::t_threadName = "finished";
83 }
84 catch (const Exception& ex)
85 {
86 muduo::CurrentThread::t_threadName = "crashed";
87 fprintf(stderr, "exception caught in Thread %s\n", name_.c_str());
88 fprintf(stderr, "reason: %s\n", ex.what());
89 fprintf(stderr, "stack trace: %s\n", ex.stackTrace());
90 abort();
91 } |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Thread 2 "ChatServer0" received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff5d52700 (LWP 2809)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff6caa921 in __GI_abort () at abort.c:79
#2 0x00005555556199cf in muduo::detail::ThreadData::runInThread (this=0x555555856680)
at /root/package/muduo-master/muduo/base/Thread.cc:90
#3 muduo::detail::startThread (obj=0x555555856680)
at /root/package/muduo-master/muduo/base/Thread.cc:111
#4 0x00007ffff76036db in start_thread (arg=0x7ffff5d52700) at pthread_create.c:463
#5 0x00007ffff6d8b71f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Beta Was this translation helpful? Give feedback.
All reactions