[asterisk-bugs] [JIRA] (ASTERISK-27299) Asterisk Hangs with Bad file descriptor on read()

Aaron An (JIRA) noreply at issues.asterisk.org
Thu Dec 7 20:49:07 CST 2017


     [ https://issues.asterisk.org/jira/browse/ASTERISK-27299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aaron An updated ASTERISK-27299:
--------------------------------

    Comment: was deleted

(was: related gdb logs:

Thread 483 (Thread 0x7f4329eb4700 (LWP 3902)):
#0  0x00007f43ee80f1bd in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x00007f43ee80ad1d in _L_lock_840 () from /lib64/libpthread.so.0
#2  0x00007f43ee80ac3a in pthread_mutex_lock () from /lib64/libpthread.so.0
#3  0x00000000005f7101 in __ast_pthread_mutex_lock (filename=0x7830cb "channel.c", lineno=1375, func=0x7888b0 <__PRETTY_FUNCTION__.18764> "ast_channel_by_uniqueid_cb", mutex_name=0x784328 "chan", t=0x33618d0) at lock.c:315
#4  0x000000000047b1bb in __ao2_lock (user_data=0x3361920, lock_how=AO2_LOCK_REQ_MUTEX, file=0x7830cb "channel.c", func=0x7888b0 <__PRETTY_FUNCTION__.18764> "ast_channel_by_uniqueid_cb", line=1375, var=0x784328 "chan") at astobj2.c:164
#5  0x000000000050a527 in ast_channel_by_uniqueid_cb (obj=0x3361920, arg=0x7f4354124c88, data=0x7f4329eb3ba0, flags=0) at channel.c:1375
#6  0x000000000047dd0c in internal_ao2_traverse (self=0x2c936a0, flags=OBJ_SEARCH_NONE, cb_fn=0x50a432 <ast_channel_by_uniqueid_cb>, arg=0x7f4354124c88, data=0x7f4329eb3ba0, type=AO2_CALLBACK_WITH_DATA, tag=0x0, file=0x0, line=0, func=0x0) at astobj2_container.c:352
#7  0x000000000047e3ec in __ao2_callback_data (c=0x2c936a0, flags=OBJ_SEARCH_NONE, cb_fn=0x50a432 <ast_channel_by_uniqueid_cb>, arg=0x7f4354124c88, data=0x7f4329eb3ba0) at astobj2_container.c:468
#8  0x0000000000509f7c in ast_channel_callback (cb_fn=0x50a432 <ast_channel_by_uniqueid_cb>, arg=0x7f4354124c88, data=0x7f4329eb3ba0, ao2_flags=0) at channel.c:1315
#9  0x000000000050ab09 in ast_channel_get_by_name_prefix (name=0x7f4354124c88 "webrtc-2-1511253841.169681", name_len=0) at channel.c:1485
#10 0x000000000050ab4c in ast_channel_get_by_name (name=0x7f4354124c88 "webrtc-2-1511253841.169681") at channel.c:1490
#11 0x00007f433c802646 in rtp_check_timeout (data=<optimized out>) at res_pjsip_sdp_rtp.c:158
#12 0x00000000006cead7 in ast_sched_runq (con=0x318e810) at sched.c:783
#13 0x00000000006cbe59 in sched_run (data=0x318e810) at sched.c:170
#14 0x00000000007428d6 in dummy_start (data=0x318d990) at utils.c:1238
#15 0x00007f43ee808dc5 in start_thread () from /lib64/libpthread.so.0
#16 0x00007f43edaf46ed in clone () from /lib64/libc.so.6

Thread 458 (Thread 0x7f42b7bee700 (LWP 1305)):
#0  0x00007f43ee80f1bd in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x00007f43ee80ad1d in _L_lock_840 () from /lib64/libpthread.so.0
#2  0x00007f43ee80ac3a in pthread_mutex_lock () from /lib64/libpthread.so.0
#3  0x00000000005f7101 in __ast_pthread_mutex_lock (filename=0x7830cb "channel.c", lineno=10613, func=0x789950 <__PRETTY_FUNCTION__.21870> "ast_channel_bridge_peer", mutex_name=0x784328 "chan", t=0x33618d0) at lock.c:315
#4  0x000000000047b1bb in __ao2_lock (user_data=0x3361920, lock_how=AO2_LOCK_REQ_MUTEX, file=0x7830cb "channel.c", func=0x789950 <__PRETTY_FUNCTION__.21870> "ast_channel_bridge_peer", line=10613, var=0x784328 "chan") at astobj2.c:164
#5  0x00000000005374da in ast_channel_bridge_peer (chan=0x3361920) at channel.c:10613
#6  0x000000000050ffa7 in ast_set_hangupsource (chan=0x3361920, source=0x3324972 "PJSIP/700022580101074-0002965b", force=0) at channel.c:2623
#7  0x00007f43512ee779 in chan_pjsip_session_end (session=0x7f4354351090) at chan_pjsip.c:2373
#8  0x00007f43ac3fe68e in session_end (vsession=0x7f4354351090) at res_pjsip_session.c:2536
#9  0x000000000071b0cd in ast_taskprocessor_execute (tps=0x7f4354b08e30) at taskprocessor.c:965
#10 0x000000000072f92d in execute_tasks (data=0x7f4354b08e30) at threadpool.c:1322
#11 0x000000000071b0cd in ast_taskprocessor_execute (tps=0x2de1d30) at taskprocessor.c:965
#12 0x000000000072c591 in threadpool_execute (pool=0x2de0670) at threadpool.c:351
#13 0x000000000072ed33 in worker_active (worker=0x7f438007f2c0) at threadpool.c:1105
#14 0x000000000072e996 in worker_start (arg=0x7f438007f2c0) at threadpool.c:1024
#15 0x00000000007428d6 in dummy_start (data=0x7f438000f360) at utils.c:1238
#16 0x00007f43ee808dc5 in start_thread () from /lib64/libpthread.so.0
#17 0x00007f43edaf46ed in clone () from /lib64/libc.so.6

Thread 304 (Thread 0x7f42b23c6700 (LWP 28054)):
#0  0x00007f43ee80f1bd in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x00007f43ee80ad1d in _L_lock_840 () from /lib64/libpthread.so.0
#2  0x00007f43ee80ac3a in pthread_mutex_lock () from /lib64/libpthread.so.0
#3  0x00000000005f7101 in __ast_pthread_mutex_lock (filename=0x77908b "bridge_channel.c", lineno=269, func=0x779ef0 <__PRETTY_FUNCTION__.16835> "channel_set_cause", mutex_name=0x779108 "chan", t=0x33618d0) at lock.c:315
#4  0x000000000047b1bb in __ao2_lock (user_data=0x3361920, lock_how=AO2_LOCK_REQ_MUTEX, file=0x77908b "bridge_channel.c", func=0x779ef0 <__PRETTY_FUNCTION__.16835> "channel_set_cause", line=269, var=0x779108 "chan") at astobj2.c:164
#5  0x00000000004b70ef in channel_set_cause (chan=0x3361920, cause=44) at bridge_channel.c:269
#6  0x00000000004b730a in ast_bridge_channel_leave_bridge_nolock (bridge_channel=0x32c1180, new_state=BRIDGE_CHANNEL_STATE_END_NO_DISSOLVE, cause=44) at bridge_channel.c:291
#7  0x00000000004b7456 in ast_bridge_channel_leave_bridge (bridge_channel=0x32c1180, new_state=BRIDGE_CHANNEL_STATE_END_NO_DISSOLVE, cause=44) at bridge_channel.c:306
#8  0x000000000048f6a6 in bridge_dissolve (bridge=0x32dcf60, cause=44) at bridge.c:325
#9  0x00000000004beb9e in bridge_channel_dissolve_check (bridge_channel=0x32d5f60) at bridge_channel.c:2025
#10 0x00000000004bf20e in bridge_channel_internal_pull (bridge_channel=0x32d5f60) at bridge_channel.c:2083
#11 0x00000000004c2144 in bridge_channel_internal_join (bridge_channel=0x32d5f60) at bridge_channel.c:2723
#12 0x0000000000496362 in ast_bridge_join (bridge=0x32dcf60, chan=0x7f43bc983780, swap=0x0, features=0x7f42b23c1e00, tech_args=0x0, flags=(AST_BRIDGE_JOIN_PASS_REFERENCE | AST_BRIDGE_JOIN_INHIBIT_JOIN_COLP)) at bridge.c:1712
#13 0x00000000005a9e46 in ast_bridge_call_with_flags (chan=0x7f43bc983780, peer=0x3361920, config=0x7f42b23c2f10, flags=0) at features.c:672
#14 0x00000000005a9fde in ast_bridge_call (chan=0x7f43bc983780, peer=0x3361920, config=0x7f42b23c2f10) at features.c:711
#15 0x00007f43398d546f in dial_exec_full (chan=0x7f43bc983780, data=0x7f42b23c3520 "PJSIP/700022580101074, 60, b(webrtc_call_start_dest^700022580101074^1)B(webrtc_call_start_main^700022580101074^1)U(webrtc_bridge_dest)M(webrtc_bridge_main)tT", peerflags=0x7f42b23c3330, continue_exec=0x0) at app_dial.c:3205
#16 0x00007f43398d5adc in dial_exec (chan=0x7f43bc983780, data=0x7f42b23c3520 "PJSIP/700022580101074, 60, b(webrtc_call_start_dest^700022580101074^1)B(webrtc_call_start_main^700022580101074^1)U(webrtc_bridge_dest)M(webrtc_bridge_main)tT") at app_dial.c:3261
#17 0x00000000006751f3 in pbx_exec (c=0x7f43bc983780, app=0x3229a40, data=0x7f42b23c3520 "PJSIP/700022580101074, 60, b(webrtc_call_start_dest^700022580101074^1)B(webrtc_call_start_main^700022580101074^1)U(webrtc_bridge_dest)M(webrtc_bridge_main)tT") at pbx_app.c:484
#18 0x00000000006549ae in pbx_extension_helper (c=0x7f43bc983780, con=0x0, context=0x7f43bc984138 "default", exten=0x7f43bc984188 "700022580101074", priority=4, label=0x0, callerid=0x7f43bc5ebed0 "02759771039", action=E_SPAWN, found=0x7f42b23c5be4, combined_find_spawn=1) at pbx.c:2884
#19 0x000000000065a741 in ast_spawn_extension (c=0x7f43bc983780, context=0x7f43bc984138 "default", exten=0x7f43bc984188 "700022580101074", priority=4, callerid=0x7f43bc5ebed0 "02759771039", found=0x7f42b23c5be4, combined_find_spawn=1) at pbx.c:4117
#20 0x000000000065bf34 in __ast_pbx_run (c=0x7f43bc983780, args=0x0) at pbx.c:4292
#21 0x000000000065ec41 in pbx_thread (data=0x7f43bc983780) at pbx.c:4612
#22 0x00000000007428d6 in dummy_start (data=0x7f43bc809dd0) at utils.c:1238
#23 0x00007f43ee808dc5 in start_thread () from /lib64/libpthread.so.0
#24 0x00007f43edaf46ed in clone () from /lib64/libc.so.6

Thread 303 (Thread 0x7f42b10e2700 (LWP 28078)):
#0  0x00007f43ee80f49d in read () from /lib64/libpthread.so.0
#1  0x000000000043f6dc in ast_alertpipe_read (alert_pipe=0x3362280) at alertpipe.c:108
#2  0x0000000000540b01 in ast_channel_internal_alert_read (chan=0x3361920) at channel_internal_api.c:1260
#3  0x00000000005162de in __ast_read (chan=0x3361920, dropaudio=0) at channel.c:3895
#4  0x0000000000519bb2 in ast_read (chan=0x3361920) at channel.c:4384
#5  0x00000000004c0b24 in bridge_handle_trip (bridge_channel=0x32c1180) at bridge_channel.c:2397
#6  0x00000000004c1414 in bridge_channel_wait (bridge_channel=0x32c1180) at bridge_channel.c:2567
#7  0x00000000004c20a8 in bridge_channel_internal_join (bridge_channel=0x32c1180) at bridge_channel.c:2713
#8  0x0000000000496784 in bridge_channel_ind_thread (data=0x32c1180) at bridge.c:1779
#9  0x00000000007428d6 in dummy_start (data=0x32c12a0) at utils.c:1238
#10 0x00007f43ee808dc5 in start_thread () from /lib64/libpthread.so.0
#11 0x00007f43edaf46ed in clone () from /lib64/libc.so.6)

> Asterisk Hangs with Bad file descriptor on read()
> -------------------------------------------------
>
>                 Key: ASTERISK-27299
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27299
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Bridges/bridge_native_rtp
>    Affects Versions: 13.17.1
>         Environment: Ubuntu 16.04 with asterisk 13.17.1 
>            Reporter: Abhay Gupta
>            Assignee: Unassigned
>         Attachments: 11.log, 12.log, 3858.threads.log, latestGDB, modules.conf.sample, output2.txt, sip-3-0002949d.log, taskprocessSterl.txt
>
>
> Asterisk stops responding and only have errors of alertpipe 
> {noformat}
> Sep 26 15:36:05] WARNING[3133] bridge_channel.c: Weird.  No frame from bridge for Local/agentmanual at asterisk-00013cae;1 to process?
> [Sep 26 15:36:05] WARNING[3133] alertpipe.c: read() failed: Bad file descriptor
> [Sep 26 15:36:05] WARNING[3133] bridge_channel.c: Weird.  No frame from bridge for Local/agentmanual at asterisk-00013cae;1 to process?
> [Sep 26 15:36:05] WARNING[3133] alertpipe.c: read() failed: Bad file descriptor
> [Sep 26 15:36:05] WARNING[3133] bridge_channel.c: Weird.  No frame from bridge for Local/agentmanual at asterisk-00013cae;1 to process?
> [Sep 26 15:36:05] WARNING[3133] alertpipe.c: read() failed: Bad file descriptor
> [Sep 26 15:36:05] WARNING[3133] bridge_channel.c: Weird.  No frame from bridge for Local/agentmanual at asterisk-00013cae;1 to process?
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list