#367 closed баг (invalid)
Падение при входящем вызове
Reported by: | alx | Owned by: | dimag |
---|---|---|---|
Priority: | major | Milestone: | 2 очередь |
Component: | ПО MC04-Dispatcher. Пульт диспетчера/техника | Keywords: | |
Cc: | san |
Description
r377 падает при получении входящего вызова. Сначала на входящий INVITE пульт почему-то отправляет ответ "488 Not Acceptable Here", а затем падает по SIGSEGV:
12:38:33.540 pjsua_core.c .RX 1318 bytes Request msg INVITE/cseq=95978492 (rdata0x80cca1028) from UDP 192.168.0.63:5060: INVITE sip:2@192.168.0.75:16762 SIP/2.0 Via: SIP/2.0/UDP 192.168.0.63;rport;branch=z9hG4bKZgmga0KKaQ7gc Max-Forwards: 70 From: "" <sip:0000000000@192.168.0.63>;tag=eDF8tmKmare3H To: <sip:2@192.168.0.75:16762> Call-ID: c2dbf28a-e9f0-1234-41a3-902b3433882b CSeq: 95978492 INVITE Contact: <sip:mod_sofia@192.168.0.63:5060> User-Agent: FreeSWITCH-mod_sofia/1.6.10+git~20160824T215404Z~726448d962~64bit Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE Supported: timer, path, replaces Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer Content-Type: application/sdp Content-Disposition: session Content-Length: 387 X-FS-Support: update_display,send_info Remote-Party-ID: <sip:0000000000@192.168.0.63>;party=calling;screen=yes;privacy=off v=0 o=FreeSWITCH 1472607735 1472607736 IN IP4 192.168.0.63 s=FreeSWITCH c=IN IP4 192.168.0.63 t=0 0 m=audio 21378 RTP/AVP 0 8 18 9 3 101 13 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:18 G729/8000 a=rtpmap:9 G722/8000 a=rtpmap:3 GSM/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=rtpmap:13 CN/8000 a=rtcp-mux a=rtcp:21378 IN IP4 192.168.0.63 a=ptime:20 --end msg-- 12:38:33.540 pjsua_call.c .Incoming Request msg INVITE/cseq=95978492 (rdata0x80cca1028) 12:38:33.541 pjsua_media.c ..Call 0: initializing media.. 12:38:33.541 pjsua_media.c ...RTP socket reachable at 192.168.0.75:4000 12:38:33.541 pjsua_media.c ...RTCP socket reachable at 192.168.0.75:4001 12:38:33.541 pjsua_media.c ...Media index 0 selected for audio call 0 12:38:33.541 pjsua_core.c .....TX 285 bytes Response msg 100/INVITE/cseq=95978492 (tdta0x80c830000) to UDP 192.168.0.63:5060: SIP/2.0 100 Trying Via: SIP/2.0/UDP 192.168.0.63;rport=5060;received=192.168.0.63;branch=z9hG4bKZgmga0KKaQ7gc Call-ID: c2dbf28a-e9f0-1234-41a3-902b3433882b From: <sip:0000000000@192.168.0.63>;tag=eDF8tmKmare3H To: <sip:2@192.168.0.75> CSeq: 95978492 INVITE Content-Length: 0 --end msg-- 12:38:33.541 CPJSIPSUA ..Incoming call from <sip:0000000000@192.168.0.63>!! 12:38:33.541 pjsua_call.c ..Answering call 0: code=200 12:38:33.541 pjsua_media.c .....Call 0: updating media.. 12:38:33.541 pjsua_aud.c ......Audio channel update.. 12:38:33.541 strm0x80f9c5c2 .......VAD temporarily disabled 12:38:33.541 strm0x80f9c5c2 .......Encoder stream started 12:38:33.541 strm0x80f9c5c2 .......Decoder stream started 12:38:33.542 pjsua_media.c ......pjsua_aud_channel_update() failed for call_id 0 media 0: Invalid operation (PJ_EINVALIDOP) 12:38:33.542 pjsua_media.c ......Error updating media call00:0: Invalid operation (PJ_EINVALIDOP) 12:38:33.542 pjsua_call.c .....Unable to create media session: No active media stream after negotiation (PJMEDIA_SDPNEG_ENOMEDIA) [status=220048] 12:38:33.542 pjsua_core.c ........TX 485 bytes Response msg 488/INVITE/cseq=95978492 (tdta0x80c830000) to UDP 192.168.0.63:5060: SIP/2.0 488 Not Acceptable Here Via: SIP/2.0/UDP 192.168.0.63;rport=5060;received=192.168.0.63;branch=z9hG4bKZgmga0KKaQ7gc Call-ID: c2dbf28a-e9f0-1234-41a3-902b3433882b From: <sip:0000000000@192.168.0.63>;tag=eDF8tmKmare3H To: <sip:2@192.168.0.75>;tag=b3589965-08e3-4227-8812-e7d8d7dcd310 CSeq: 95978492 INVITE Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Supported: replaces, 100rel, timer, norefersub Content-Length: 0 --end msg-- 12:38:33.542 CPJSIPSUA ...........Call 0 state=DISCONNCTD 12:38:33.542 pjsua_media.c ...........Call 0: deinitializing media.. [New LWP 101813 of process 20026] [New LWP 101811 of process 20026] [New LWP 100391 of process 20026] Thread 3 received signal SIGSEGV, Segmentation fault. [Switching to LWP 101805 of process 20026] 0x0000000800e9da53 in pj_ioqueue_lock_key () from /usr/local/lib/libpj.so.2 (gdb) bt #0 0x0000000800e9da53 in pj_ioqueue_lock_key () from /usr/local/lib/libpj.so.2 #1 0x000000080139c07c in transport_detach () from /usr/local/lib/libpjmedia.so.2 #2 0x00000008013991af in transport_detach () from /usr/local/lib/libpjmedia.so.2 #3 0x0000000801392f4d in pjmedia_stream_destroy () from /usr/local/lib/libpjmedia.so.2 #4 0x00000008010e89d6 in pjsua_aud_stop_stream () from /usr/local/lib/libpjsua.so.2 #5 0x00000008010ddb8a in stop_media_stream () from /usr/local/lib/libpjsua.so.2 #6 0x00000008010de90d in pjsua_media_channel_deinit () from /usr/local/lib/libpjsua.so.2 #7 0x00000008010d3b8e in pjsua_call_on_state_changed () from /usr/local/lib/libpjsua.so.2 #8 0x0000000804df096d in inv_set_state () from /usr/local/lib/libpjsip-ua.so.2 #9 0x0000000804dedf46 in mod_inv_on_tsx_state () from /usr/local/lib/libpjsip-ua.so.2 #10 0x00000008015e767b in pjsip_dlg_on_tsx_state () from /usr/local/lib/libpjsip.so.2 #11 0x00000008015e3f5a in tsx_set_state () from /usr/local/lib/libpjsip.so.2 #12 0x00000008015e4e83 in tsx_on_state_proceeding_uas () from /usr/local/lib/libpjsip.so.2 #13 0x00000008015e56cf in pjsip_tsx_send_msg () from /usr/local/lib/libpjsip.so.2 #14 0x00000008015e7802 in pjsip_dlg_send_response () from /usr/local/lib/libpjsip.so.2 #15 0x0000000804def332 in pjsip_inv_send_msg () from /usr/local/lib/libpjsip-ua.so.2 #16 0x00000008010d00d5 in call_disconnect () from /usr/local/lib/libpjsua.so.2 #17 0x00000008010d052e in pjsua_call_on_media_update () from /usr/local/lib/libpjsua.so.2 #18 0x0000000804dee3a4 in inv_negotiate_sdp () from /usr/local/lib/libpjsip-ua.so.2 #19 0x0000000804defc0f in process_answer () from /usr/local/lib/libpjsip-ua.so.2 #20 0x0000000804defd5c in pjsip_inv_answer () from /usr/local/lib/libpjsip-ua.so.2 #21 0x00000008010d4263 in pjsua_call_answer2 () from /usr/local/lib/libpjsua.so.2 #22 0x00000000004b2292 in CPJSIPSUA::on_incoming_call (acc_id=0, call_id=0, rdata=0x80cca1028) at PJSIPSUA.cpp:355 #23 0x00000008010d6132 in pjsua_call_on_incoming () from /usr/local/lib/libpjsua.so.2 #24 0x00000008010daa28 in mod_pjsua_on_rx_request () from /usr/local/lib/libpjsua.so.2 #25 0x00000008015d17ce in pjsip_endpt_process_rx_data () from /usr/local/lib/libpjsip.so.2 #26 0x00000008015d2540 in endpt_on_rx_msg () from /usr/local/lib/libpjsip.so.2 #27 0x00000008015d81c6 in pjsip_tpmgr_receive_packet () from /usr/local/lib/libpjsip.so.2 #28 0x00000008015da199 in udp_on_read_complete () from /usr/local/lib/libpjsip.so.2 #29 0x0000000800e9eb6b in ioqueue_dispatch_read_event () from /usr/local/lib/libpj.so.2 #30 0x0000000800e9f2b0 in pj_ioqueue_poll () from /usr/local/lib/libpj.so.2 #31 0x00000008015d194c in pjsip_endpt_handle_events2 () from /usr/local/lib/libpjsip.so.2 #32 0x00000008010d7ccf in pjsua_handle_events () from /usr/local/lib/libpjsua.so.2 #33 0x00000008010d7d4a in worker_thread () from /usr/local/lib/libpjsua.so.2 #34 0x0000000800ea0886 in thread_main () from /usr/local/lib/libpj.so.2 #35 0x0000000803976dc4 in ?? () from /lib/libthr.so.3 #36 0x0000000000000000 in ?? () Backtrace stopped: Cannot access memory at address 0x7fffff7fc000
Проверялось под FreeBSD. Падение происходит каждый раз.
Change History (4)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Оказалось, что PJSIP был собран без поддержки ресэмплинга. Пересобрал с поддержкой ресэмплинга - падения прекратились.
Саша, может имеет смысл описать где-нибудь на wiki-страничке все требования к зависимостям программы? Чтобы там было написано, например, что PJSIP непременно должен быть собран с поддержкой ресэмплинга...
И было бы совсем хорошо, если бы пульт диспетчера при старте сам проверял (если есть такая возможность), имеется ли поддержка ресэмплинга у PJSIP и т.п., и если что-то не так, выдавал бы, как минимум, предупреждение в лог...
Вот сейчас проверил - наличие поддержки ресэмплинга вполне можно проверить с помощью макроса PJMEDIA_RESAMPLE_IMP... Саша, что скажешь?
comment:3 by , 8 years ago
Про "добавить в вики что-то полезное", я конечно не возражаю. И насчёт "самопроверки", тоже не возражаю, напиши тикет с предложением.
Пересобрал PJSIP с отладочной информацией. Вот вывод отладчика:
Здесь, по крайней мере, видно, что программа падает из-за обращения по NULL-указателю key в pj_ioqueue_lock_key() из-за того что в transport_detach() udp->rtp_key почему-то NULL...