Segmentation fault on CreateAnswer

31 views
Skip to first unread message

Alessio Paccoia

unread,
Mar 21, 2018, 7:24:07 AM3/21/18
to discuss-webrtc
Hi all,
I'm writing an application using release M65.
The first endpoint create an offer with a single datachannel and the second one segfaults when creating answer.

This is the gdb trace:
#0  0x00007ffff6b78428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007ffff6b7a02a in __GI_abort () at abort.c:89
#2  0x00007ffff6bba7ea in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7ffff6cd3ed8 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007ffff6bc7698 in malloc_printerr (ar_ptr=0x0, ptr=<optimized out>, str=0x7ffff6cd3f00 "munmap_chunk(): invalid pointer", action=<optimized out>) at malloc.c:5006
#4  munmap_chunk (p=<optimized out>) at malloc.c:2842
#5  __GI___libc_free (mem=<optimized out>) at malloc.c:2963
#6  0x0000000000aae8f8 in std::_Hashtable<int, std::pair<int const, int>, std::allocator<std::pair<int const, int> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_insert_unique_node(unsigned long, unsigned long, std::__detail::_Hash_node<std::pair<int const, int>, false>*) ()
#7  0x00007fffe75d0c33 in (anonymous namespace)::(anonymous namespace)::_Map_base<int, std::pair<int const, int>, std::allocator<std::pair<int const, int> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[] (this=0x7fffe6c4eb18, __k=@0x22573e8: 108)
    at ../../build/linux/debian_stretch_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/6/../../../../include/c++/6/bits/hashtable_policy.h:598
#8  0x00007fffe75bf918 in (anonymous namespace)::(anonymous namespace)::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int> >>::operator[] (this=0x7fffe6c4eb18, __k=@0x22573e8: 108)
    at ../../build/linux/debian_stretch_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/6/../../../../include/c++/6/bits/unordered_map.h:904
#9  0x00007fffe778d48a in (anonymous namespace)::NegotiateCodecs<cricket::DataCodec> (local_codecs=..., offered_codecs=..., negotiated_codecs=0x7fffe6c4f028)
    at ../../pc/mediasession.cc:783
---Type <return> to continue, or q <return> to quit---
#10 0x00007fffe7783c77 in (anonymous namespace)::CreateMediaContentAnswer<cricket::DataCodec> (offer=0x2250c20, media_description_options=..., session_options=...,
    local_codecs=..., sdes_policy=@0x7fffe6c4f2d4: (anonymous namespace)::SEC_DISABLED, current_cryptos=0x0, local_rtp_extenstions=...,
    enable_encrypted_rtp_header_extensions=false, current_streams=0x7fffe6c4f9f8, bundle_enabled=true, answer=0x7fffd40077b0) at ../../pc/mediasession.cc:1087
#11 0x00007fffe777f7d2 in (anonymous namespace)::MediaSessionDescriptionFactory::AddDataContentForAnswer (this=0x7fffd4005880, media_description_options=...,
    session_options=..., offer_content=0x22050e0, offer_description=0x2250b40, current_content=0x0, current_description=0x0, bundle_transport=0x0, data_codecs=...,
    current_streams=0x7fffe6c4f9f8, answer=0x7fffd40075e0) at ../../pc/mediasession.cc:2211
#12 0x00007fffe777d28e in (anonymous namespace)::MediaSessionDescriptionFactory::CreateAnswer (this=0x7fffd4005880, offer=0x2250b40, session_options=...,
    current_description=0x0) at ../../pc/mediasession.cc:1461
#13 0x00007fffe78fff3d in (anonymous namespace)::WebRtcSessionDescriptionFactory::InternalCreateAnswer (this=0x7fffd4005720, request=...)
    at ../../pc/webrtcsessiondescriptionfactory.cc:386
#14 0x00007fffe78ffc2a in (anonymous namespace)::WebRtcSessionDescriptionFactory::CreateAnswer (this=0x7fffd4005720, observer=0x221a910, session_options=...)
    at ../../pc/webrtcsessiondescriptionfactory.cc:276
#15 0x00007fffe7807822 in (anonymous namespace)::PeerConnection::CreateAnswer (this=0x7fffd4003eb0, observer=0x221a910, options=...) at ../../pc/peerconnection.cc:1609
#16 0x00007fffe756d9f2 in (anonymous namespace)::ReturnType<void>::Invoke<webrtc::PeerConnectionInterface, void (webrtc::PeerConnectionInterface::*)(webrtc::CreateSessionDescriptionObserver*, webrtc::PeerConnectionInterface::RTCOfferAnswerOptions const&), webrtc::CreateSessionDescriptionObserver*, webrtc::PeerConnectionInterface::RTCOfferAnswerOptions> (this=0x7fffffff8b50, c=0x7fffd4003eb0,
    m=&virtual (anonymous namespace)::PeerConnectionInterface::CreateAnswer((anonymous namespace)::CreateSessionDescriptionObserver*, (anonymous namespace)::PeerConnectionInterface::RTCOfferAnswerOptions const&), a1=0x221a910, a2=...) at ../../api/proxy.h:110

I start thinking about something related to compile flags. Did anyone face a similar problem or have some suggestions?

Thanks in advance
Alessio 

Reply all
Reply to author
Forward
0 new messages