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

Abhay Gupta (JIRA) noreply at issues.asterisk.org
Wed Nov 22 11:35:07 CST 2017


    [ https://issues.asterisk.org/jira/browse/ASTERISK-27299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=240233#comment-240233 ] 

Abhay Gupta commented on ASTERISK-27299:
----------------------------------------

We also have exactly the same issue in the GDB 

Thread 222 (Thread 0x7f31d7f27700 (LWP 18843)):
#0  0x00007f33961ab6ad in read () at ../sysdeps/unix/syscall-template.S:84
No locals.
#1  0x0000561ffc5b56f8 in ast_alertpipe_read (alert_pipe=0x7f328403bc70) at alertpipe.c:108
        tmp = 139852053109008
        __PRETTY_FUNCTION__ = "ast_alertpipe_read"
#2  0x0000561ffc65a2ee in ast_channel_internal_alert_read (chan=0x7f328403b310) at channel_internal_api.c:1251
No locals.
#3  0x0000561ffc6378a5 in __ast_queue_frame (chan=0x7f328403b310, fin=0x7f327801a9f0, head=0, after=0x0) at channel.c:1158
        __list_head = 0x7f328403bb28
        __list_next = 0x7f32800508a0
        __list_prev = 0x0
        __list_current = 0x0
        count = 1
        f = 0x7f3278021200
        cur = 0x7f328c015520
        new_frames = 1
        new_voice_frames = 1
        queued_frames = 102
        queued_voice_frames = 96
        frames = {first = 0x7f3278021200, last = 0x7f3278021200}
        __PRETTY_FUNCTION__ = "__ast_queue_frame"
#4  0x0000561ffc637c86 in ast_queue_frame (chan=0x7f328403b310, fin=0x7f327801a9f0) at channel.c:1196
No locals.
#5  0x0000561ffc67cddf in unreal_queue_frame (p=0x7f328403df50, isoutbound=0, f=0x7f327801a9f0, us=0x7f3284032900, us_locked=1) at core_unreal.c:244
        other = 0x7f328403b310
        __PRETTY_FUNCTION__ = "unreal_queue_frame"
#6  0x0000561ffc67d1ca in ast_unreal_write (ast=0x7f3284032900, f=0x7f327801a9f0) at core_unreal.c:339
        p = 0x7f328403df50
        res = -1
        __PRETTY_FUNCTION__ = "ast_unreal_write"
#7  0x0000561ffc64491d in ast_write (chan=0x7f3284032900, fr=0x7f327801a9f0) at channel.c:5425
        res = -1
        f = 0x7f327801a9f0
        count = 0
        hooked = 0
        __PRETTY_FUNCTION__ = "ast_write"
#8  0x0000561ffc6094c5 in bridge_channel_handle_write (bridge_channel=0x7f3280054980) at bridge_channel.c:2346
        fr = 0x7f327801a9f0
        sync_payload = 0x7f3280054980
        __PRETTY_FUNCTION__ = "bridge_channel_handle_write"
#9  0x0000561ffc609b1a in bridge_channel_wait (bridge_channel=0x7f3280054980) at bridge_channel.c:2593
        ms = -1
        outfd = 516
        chan = 0x0
        __PRETTY_FUNCTION__ = "bridge_channel_wait"
#10 0x0000561ffc60a1c7 in bridge_channel_internal_join (bridge_channel=0x7f3280054980) at bridge_channel.c:2728
        res = 0
        channel_features = 0x0
        swap = 0x0
        __PRETTY_FUNCTION__ = "bridge_channel_internal_join"
#11 0x0000561ffc5ee516 in ast_bridge_join (bridge=0x7f3280050bb0, chan=0x7f3284032900, swap=0x0, features=0x7f31d7f25d10, tech_args=0x0, 
    flags=(AST_BRIDGE_JOIN_PASS_REFERENCE | AST_BRIDGE_JOIN_INHIBIT_JOIN_COLP)) at bridge.c:1713
        bridge_channel = 0x7f3280054980
        res = 0
        __PRETTY_FUNCTION__ = "ast_bridge_join"
#12 0x0000561ffc69e0ff in ast_bridge_call_with_flags (chan=0x7f3284032900, peer=0x7f328004fd70, config=0x7f31d7f262a0, flags=0) at features.c:672
        res = 0
        bridge = 0x7f3280050bb0
        chan_features = {dtmf_hooks = 0x7f328002be10, other_hooks = 0x7f3280055720, interval_hooks = 0x7f3280055770, feature_flags = {flags = 0}, 
          interval_sequence = 0, usable = 0, mute = 0, dtmf_passthrough = 1}
        peer_features = 0x7f3280027a60
        __PRETTY_FUNCTION__ = "ast_bridge_call_with_flags"
#13 0x0000561ffc69e1ef in ast_bridge_call (chan=0x7f3284032900, peer=0x7f328004fd70, config=0x7f31d7f262a0) at features.c:711
No locals.
#14 0x00007f32c008b177 in dial_exec_full (chan=0x7f3284032900, data=0x7f3284037d80 "PJSIP/2013", peerflags=0x7f31d7f26d10, continue_exec=0x0) at app_dial.c:3205
        number = 0x7f31d7f25d80 "2013"
        name = 0x7f31d7f25dc0 "PJSIP/2013-00002a53"
        dial_end_raised = 1
        cause = -1
        res = 0
        rest = 0x0
        cur = 0x0
        out_chans = {first = 0x0, last = 0x0}
        outgoing = 0x7f328004f0f0
        tmp = 0x0
        peer = 0x7f328004fd70
        to = -1
        num = {chan = 0x7f3284032900, busy = 0, congestion = 0, nochan = 0}
        cause = 0
        config = {features_caller = {flags = 0}, features_callee = {flags = 0}, start_time = {tv_sec = 0, tv_usec = 0}, nexteventts = {tv_sec = 0, tv_usec = 0}, 
          feature_start_time = {tv_sec = 0, tv_usec = 0}, feature_timer = 0, timelimit = 0, play_warning = 0, warning_freq = 0, warning_sound = 0x0, end_sound = 0x0, 
          start_sound = 0x0, flags = 0, end_bridge_callback = 0x7f32c0085808 <end_bridge_callback>, end_bridge_callback_data = 0x7f3284032900, 
          end_bridge_callback_data_fixup = 0x7f32c0085940 <end_bridge_callback_data_fixup>}
        calldurationlimit = {tv_sec = 0, tv_usec = 0}
        dtmfcalled = 0x0
        dtmfcalling = 0x0
        dtmf_progress = 0x0
        pa = {sentringing = 0, privdb_val = 0, privcid = '\000' <repeats 255 times>, privintro = '\000' <repeats 1023 times>, 
          status = "ANSWER\000R\000GS", '\000' <repeats 244 times>}
        sentringing = 0
        moh = 0
        outbound_group = 0x0
        result = 0
        parse = 0x7f31d7f25e20 "PJSIP"
        opermode = 0
        delprivintro = 0
        args = {argc = 1, argv = 0x7f31d7f26508, peers = 0x7f31d7f25e20 "PJSIP", timeout = 0x0, options = 0x0, url = 0x0}
        opts = {flags = 0}
        opt_args = {0x7f3284032900 "\200\060\246\374\037V", 0x7f3284035858 "\230\341\001\204\062\177", 
          0x6e0000005b <error: Cannot access memory at address 0x6e0000005b>, 0x7f3284035840 "\001", 0x7 <error: Cannot access memory at address 0x7>, 
          0x7f3280000020 "", 0x0, 0xfe0 <error: Cannot access memory at address 0xfe0>, 0x32350 <error: Cannot access memory at address 0x32350>, 0x7f3280052cb0 "", 
          0x7f31d7f27700 "", 
          0x7f33953b568f <_int_malloc+351> "L\211\340L\211\347L\211\341H\301\350\006H\301\357\tL\211\343H\211D$@\203\300\060H\211|$P\211D$L\203\307[D\211\340L\211\346\301\350\004\211|$`H\215\274$\200", 0x62 <error: Cannot access memory at address 0x62>, 0xfd0 <error: Cannot access memory at address 0xfd0>, 0x7f31d7f26610 "", 
          0x7f31d7f2660f "", 0x1 <error: Cannot access memory at address 0x1>, 0x3100000007 <error: Cannot access memory at address 0x3100000007>, 0x0, 
          0xffff80ce280d99f1 <error: Cannot access memory at address 0xffff80ce280d99f1>}
        fulldial = 0
        num_dialed = 1
        ignore_cc = 1
        device_name = "PJSIP/2013\000\060\060\060\060\062a53\000\063\177\000\000g\313]\374\037V\000\000\001\000\000\000\001\000\000\000\330\023\200\374\037V\000\000\370\030\200\374E\003\000\000\370\030\200\374\037V\000\000\313\021\200\374\037V\000\000\000\320\346\200\\/\265'"
        forced_clid_name = "Pl\362\327\061\177\000\000\000)\003\204\062\177\000\000\220\026\002\204\377\377\377\377 \000\000\200\062\177\000\000\360l\362\327\061\177\000\000\020\000\000\000\000\000\000\000P#\003\000\000\000\000\000\260,\005\200\062\177\000\000\000w\362\327\061\177\000\000f\206;\225\063\177\000"
        stored_clid_name = "\000}\003\204\062\177\000\000\026\004m\374\037V\000\000\000\000\000\000\000\000\000\000\060W\246\374\037V\000\000+\203~\374\037V\000\000\000\206~\374\037V\000\000\360l\362\327|\005\000\000Kz~\374\037V\000\000\f{~\374\037V\000\000\260\203~\374\000\000\000"
        force_forwards_only = 0
        forced_clid = {name = {str = 0x0, char_set = 1, presentation = 0, valid = 0 '\000'}, number = {str = 0x0, plan = 0, presentation = 1, valid = 0 '\000'}, 
          subaddress = {str = 0x0, type = 0, odd_even_indicator = 0 '\000', valid = 0 '\000'}, tag = 0x0}
        stored_clid = {name = {str = 0x0, char_set = 1, presentation = 0, valid = 0 '\000'}, number = {str = 0x7f31d7f25e00 "agentmanual", plan = 0, presentation = 0, 
            valid = 1 '\001'}, subaddress = {str = 0x0, type = 0, odd_even_indicator = 0 '\000', valid = 0 '\000'}, tag = 0x0}
        caller = {id = {name = {str = 0x0, char_set = 1, presentation = 0, valid = 0 '\000'}, number = {str = 0x7f31d7f25e00 "agentmanual", plan = 0, 
              presentation = 0, valid = 1 '\001'}, subaddress = {str = 0x0, type = 0, odd_even_indicator = 0 '\000', valid = 0 '\000'}, tag = 0x0}, ani = {name = {
              str = 0x0, char_set = 1, presentation = 0, valid = 0 '\000'}, number = {str = 0x0, plan = 0, presentation = 0, valid = 0 '\000'}, subaddress = {
              str = 0x0, type = 0, odd_even_indicator = 0 '\000', valid = 0 '\000'}, tag = 0x0}, priv = {name = {str = 0x0, char_set = 1, presentation = 0, 
              valid = 0 '\000'}, number = {str = 0x0, plan = 0, presentation = 0, valid = 0 '\000'}, subaddress = {str = 0x0, type = 0, odd_even_indicator = 0 '\000', 
              valid = 0 '\000'}, tag = 0x0}, ani2 = 0}
        max_forwards = 20
        __PRETTY_FUNCTION__ = "dial_exec_full"
#15 0x00007f32c008b546 in dial_exec (chan=0x7f3284032900, data=0x7f3284037d80 "PJSIP/2013") at app_dial.c:3261
        peerflags = {flags = 0}
#16 0x0000561ffc723706 in pbx_exec (c=0x7f3284032900, app=0x561ffff8ff00, data=0x7f3284037d80 "PJSIP/2013") at pbx_app.c:491
        res = 0
        u = 0x7f328002eef0
        saved_c_appl = 0x561ffc7de115 "AppDial2"
        saved_c_data = 0x561ffc7de11e "(Outgoing Line)"
        __PRETTY_FUNCTION__ = "pbx_exec"
#17 0x0000561ffc71dae5 in pbx_outgoing_exec (data=0x7f328403c040) at pbx.c:7513
        app = 0x561ffff8ff00
        outgoing = 0x7f328403c040
        res = AST_DIAL_RESULT_ANSWERED
        __PRETTY_FUNCTION__ = "pbx_outgoing_exec"
#18 0x0000561ffc7ab34f in dummy_start (data=0x7f328404e200) at utils.c:1238
        __cancel_buf = {__cancel_jmp_buf = {{__cancel_jmp_buf = {0, -2745862231917746460, 0, 139852183644207, 139852053117376, 139852053116672, -2745862231892580636, 
                -8378687860076861724}, __mask_was_saved = 0}}, __pad = {0x7f31d7f26ef0, 0x0, 0x7f33954a4302 <__libc_thread_freeres+34>, 0x7f31d7f27700}}
        __cancel_routine = 0x561ffc5cfb4e <ast_unregister_thread>
        __cancel_arg = 0x7f31d7f27700
        __not_first_call = 0
        ret = 0x7f31d7f27bb8
        a = {start_routine = 0x561ffc71d8e0 <pbx_outgoing_exec>, data = 0x7f328403c040, 
          name = 0x7f32840354a0 "pbx_outgoing_exec    started at [ 7732] pbx.c pbx_outgoing_attempt()"}
#19 0x00007f33961a26ca in start_thread (arg=0x7f31d7f27700) at pthread_create.c:333
        __res = <optimized out>
        pd = 0x7f31d7f27700
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {139852053116672, 2848266446172169956, 0, 139852183644207, 139852053117376, 139852053116672, -2745862231924037916, 
                -2747126461707344156}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
        pagesize_m1 = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#20 0x00007f3395439caf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105
No locals.


> 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, 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