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

[BUG] 遇到 ZK 崩溃,GDB堆栈如下,有能力的大哥看下找找原因,看能不能解决 #3519

Closed
dujingning opened this issue May 8, 2024 · 3 comments
Labels
bug 不按模板提交 不规范issue直接关闭

Comments

@dujingning
Copy link

[New LWP 9401]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `./MediaServer'.
Program terminated with signal 6, Aborted.
#0  0x00007f6538fc8387 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install glibc-2.17-196.el7.x86_64 glibc-2.17-326.el7_9.x86_64 libgcc-4.8.5-44.el7.x86_64 zlib-1.2.7-17.el7.x86_64 zlib-1.2.7-21.el7_9.x86_64
(gdb) bt
#0  0x00007f6538fc8387 in raise () from /lib64/libc.so.6
#1  0x00007f6538fc9bb8 in abort () from /lib64/libc.so.6
#2  0x00007f65398d7e4d in __gnu_cxx::__verbose_terminate_handler () at ../../.././libstdc++-v3/libsupc++/vterminate.cc:95
#3  0x00007f65398d5ec6 in __cxxabiv1::__terminate (handler=<optimized out>) at ../../.././libstdc++-v3/libsupc++/eh_terminate.cc:47
#4  0x00007f65398d4fb9 in __cxa_call_terminate (ue_header=0x7f651c054cf0) at ../../.././libstdc++-v3/libsupc++/eh_call.cc:54
#5  0x00007f65398d571b in __cxxabiv1::__gxx_personality_v0 (version=<optimized out>, actions=6, exception_class=<optimized out>, ue_header=0x7f651c054cf0, context=0x7f65327f80d0)
    at ../../.././libstdc++-v3/libsupc++/eh_personality.cc:670
#6  0x00007f653936f8e3 in ?? () from /lib64/libgcc_s.so.1
#7  0x00007f653936fe17 in _Unwind_Resume () from /lib64/libgcc_s.so.1
#8  0x0000000001108737 in toolkit::_RingReaderDispatcher<std::shared_ptr<toolkit::List<std::shared_ptr<mediakit::RtpPacket> > > >::attach(std::shared_ptr<toolkit::EventPoller> const&, bool)::{lambda(toolkit                              ::_RingReader<std::shared_ptr<toolkit::List<std::shared_ptr<mediakit::RtpPacket> > > >*)#1}::operator()(toolkit::_RingReader<std::shared_ptr<toolkit::List<std::shared_ptr<mediakit::RtpPacket> > > >*) const
    (__closure=0x7f651c0015d8, ptr=0x7f651c038900) at /ZLMediaKit/3rdpart/ZLToolKit/src/Util/RingBuffer.h:259
#9  0x000000000110f7cb in std::_Sp_counted_deleter<toolkit::_RingReader<std::shared_ptr<toolkit::List<std::shared_ptr<mediakit::RtpPacket> > > >*, toolkit::_RingReaderDispatcher<std::shared_ptr<toolkit::Lis                              t<std::shared_ptr<mediakit::RtpPacket> > > >::attach(std::shared_ptr<toolkit::EventPoller> const&, bool)::{lambda(toolkit::_RingReader<std::shared_ptr<toolkit::List<std::shared_ptr<mediakit::RtpPacket> > >                               >*)#1}, std::allocator<int>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (this=0x7f651c0015c0) at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:347
#10 0x0000000000e7d6d8 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x7f651c0015c0) at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:144
#11 0x0000000000e7bc85 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x7f651c0241f0, __in_chrg=<optimized out>) at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:546
#12 0x000000000104c7be in std::__shared_ptr<toolkit::_RingReader<std::shared_ptr<toolkit::List<std::shared_ptr<mediakit::RtpPacket> > > >, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x7f651c0241e8,
    __in_chrg=<optimized out>) at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:781
#13 0x000000000104c7d8 in std::shared_ptr<toolkit::_RingReader<std::shared_ptr<toolkit::List<std::shared_ptr<mediakit::RtpPacket> > > > >::~shared_ptr (this=0x7f651c0241e8, __in_chrg=<optimized out>)
    at /usr/include/c++/4.8.2/bits/shared_ptr.h:93
#14 0x000000000110f6b0 in mediakit::WebRtcPlayer::~WebRtcPlayer (this=0x7f651c023f00, __in_chrg=<optimized out>) at /ZLMediaKit/webrtc/WebRtcPlayer.h:21
#15 0x000000000110f718 in mediakit::WebRtcPlayer::~WebRtcPlayer (this=0x7f651c023f00, __in_chrg=<optimized out>) at /ZLMediaKit/webrtc/WebRtcPlayer.h:21
#16 0x00000000011041e7 in mediakit::WebRtcPlayer::__lambda35::operator() (__closure=0x7f651c0230d8, ptr=0x7f651c023f00) at /ZLMediaKit/webrtc/WebRtcPlayer.cpp:22
#17 0x0000000001106b87 in std::_Sp_counted_deleter<mediakit::WebRtcPlayer*, mediakit::WebRtcPlayer::create(const Ptr&, const Ptr&, const mediakit::MediaInfo&)::__lambda35, std::allocator<int>, (__gnu_cxx::_                              Lock_policy)2u>::_M_dispose(void) (this=0x7f651c0230c0) at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:347
#18 0x0000000000e7d6d8 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x7f651c0230c0) at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:144
#19 0x0000000000e7bc85 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x7f651c037da8, __in_chrg=<optimized out>) at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:546
#20 0x000000000102d732 in std::__shared_ptr<mediakit::WebRtcTransportImp, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x7f651c037da0, __in_chrg=<optimized out>)
    at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:781
#21 0x000000000102d74c in std::shared_ptr<mediakit::WebRtcTransportImp>::~shared_ptr (this=0x7f651c037da0, __in_chrg=<optimized out>) at /usr/include/c++/4.8.2/bits/shared_ptr.h:93
#22 0x000000000102bad0 in mediakit::WebRtcSession::__lambda37::~<lambda>(void) (this=0x7f651c037da0, __in_chrg=<optimized out>)
    at /ZLMediaKit/webrtc/WebRtcSession.cpp:114
#23 0x000000000102cc1a in std::_Function_base::_Base_manager<mediakit::WebRtcSession::onError(const toolkit::SockException&)::__lambda37>::_M_destroy(std::_Any_data &, std::false_type) (__victim=...)
    at /usr/include/c++/4.8.2/functional:1926
#24 0x000000000102c7fb in std::_Function_base::_Base_manager<mediakit::WebRtcSession::onError(const toolkit::SockException&)::__lambda37>::_M_manager(std::_Any_data &, const std::_Any_data &, std::_Manager_                              operation) (__dest=..., __source=..., __op=std::__destroy_functor) at /usr/include/c++/4.8.2/functional:1950
#25 0x0000000000e7a71d in std::_Function_base::~_Function_base (this=0x7f651c03b378, __in_chrg=<optimized out>) at /usr/include/c++/4.8.2/functional:2030
#26 0x0000000000e7b288 in std::function<void ()>::~function() (this=0x7f651c03b378, __in_chrg=<optimized out>) at /usr/include/c++/4.8.2/functional:2174
#27 0x0000000000fb4c8a in __gnu_cxx::new_allocator<std::function<void ()> >::destroy<std::function<void ()> >(std::function<void ()>*) (this=0x7f651c03b370, __p=0x7f651c03b378)
    at /usr/include/c++/4.8.2/ext/new_allocator.h:124
#28 0x0000000000fb49d6 in std::allocator_traits<std::allocator<std::function<void ()> > >::_S_destroy<std::function<void ()> >(std::allocator<std::function<void ()> >&, std::function<void ()>*) (__a=...,
    __p=0x7f651c03b378) at /usr/include/c++/4.8.2/bits/alloc_traits.h:281
#29 0x0000000000fb4847 in std::allocator_traits<std::allocator<std::function<void ()> > >::destroy<std::function<void ()> >(std::allocator<std::function<void ()> >&, std::function<void ()>*) (__a=...,
    __p=0x7f651c03b378) at /usr/include/c++/4.8.2/bits/alloc_traits.h:405
#30 0x0000000000fb41db in std::_Sp_counted_ptr_inplace<std::function<void ()>, std::allocator<std::function<void ()> >, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (this=0x7f651c03b360)
    at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:407
#31 0x0000000000e7d6d8 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x7f651c03b360) at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:144
#32 0x0000000000e7bc85 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x7f651c060d78, __in_chrg=<optimized out>) at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:546
#33 0x0000000000faa356 in std::__shared_ptr<std::function<void ()>, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() (this=0x7f651c060d70, __in_chrg=<optimized out>)
    at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:781
#34 0x0000000000faa370 in std::shared_ptr<std::function<void ()> >::~shared_ptr() (this=0x7f651c060d70, __in_chrg=<optimized out>) at /usr/include/c++/4.8.2/bits/shared_ptr.h:93
#35 0x0000000000fb3fa8 in toolkit::TaskCancelableImp<void ()>::~TaskCancelableImp() (this=0x7f651c060d58, __in_chrg=<optimized out>)
    at /ZLMediaKit/3rdpart/ZLToolKit/src/Thread/TaskExecutor.h:88
#36 0x0000000000fb4d55 in __gnu_cxx::new_allocator<toolkit::TaskCancelableImp<void ()> >::destroy<toolkit::TaskCancelableImp<void ()> >(toolkit::TaskCancelableImp<void ()>*) (this=0x7f651c060d50,
    __p=0x7f651c060d58) at /usr/include/c++/4.8.2/ext/new_allocator.h:124
---Type <return> to continue, or q <return> to quit---q
Quit
(gdb) q
[root@li ZLMediaKit]# ll core-event\ poller\ 2-4582-1715148165
-rw------- 1 root root 309043200 May  8 14:02 core-event poller 2-4582-1715148165
[root@li ZLMediaKit]#
@dujingning dujingning added the bug label May 8, 2024
@xiongguangjie
Copy link
Member

你这个代码是最新的吗?更新最新的代码试试

@xia-chu
Copy link
Member

xia-chu commented May 8, 2024

看起来是在析构中抛了个异常

@xia-chu xia-chu added the 不按模板提交 不规范issue直接关闭 label May 13, 2024
@xia-chu
Copy link
Member

xia-chu commented May 13, 2024

先更新zlm吧

@xia-chu xia-chu closed this as completed May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 不按模板提交 不规范issue直接关闭
Projects
None yet
Development

No branches or pull requests

3 participants