Subject: bug#24811: 26.0.50; backtrace

From: Mark Oteiza <[email-masked]>
Date: Tue, 1 Nov 2016 15:22:26 -0400

On 01/11/16 at 07:54pm, Lars Ingebrigtsen wrote:
> Lars Ingebrigtsen <[email-masked]> writes:
> 
> > I'm unable to reproduce this problem.  Can you test the following patch
> > and see whether it fixes the bug?
> 
> I mean:
> 
> diff --git a/src/process.c b/src/process.c
> index 8cf045c..d7a122f 100644
> --- a/src/process.c
> +++ b/src/process.c
> @@ -3082,6 +3082,12 @@ finish_after_tls_connection (Lisp_Object proc)
>    Lisp_Object contact = p->childp;
>    Lisp_Object result = Qt;
>  
> +  if (p->outfd < 0) {
> +    pset_status (p, Qfailed);
> +    deactivate_process (proc);
> +    return;
> +  }
> +
>    if (!NILP (Ffboundp (Qnsm_verify_connection)))
>      result = call3 (Qnsm_verify_connection,
>  		    proc,
> 
> 
> -- 

Nope :(

#0  0x00007fd16cf1204f in raise () at /usr/lib/libc.so.6
#1  0x00007fd16cf1347a in abort () at /usr/lib/libc.so.6
#2  0x00007fd16cf4fc50 in __libc_message () at /usr/lib/libc.so.6
#3  0x00007fd16cfd7f17 in __fortify_fail () at /usr/lib/libc.so.6
#4  0x00007fd16cfd6050 in __readonly_area () at /usr/lib/libc.so.6
#5  0x00007fd16cfd7e8a in  () at /usr/lib/libc.so.6
#6  0x0000000000596431 in fd_ISSET (set=0xbfb9c0 <connect_wait_mask>, fd=-1) at sysselect.h:72
        __d = -1
        contact = <optimized out>
        result = <optimized out>
#7  0x0000000000596431 in finish_after_tls_connection (proc=proc@entry=67118981) at process.c:3108
        contact = <optimized out>
        result = <optimized out>
#8  0x000000000059e6ae in wait_reading_process_output (time_limit=<optimized out>, nsecs=<optimized out>, read_kbd=read_kbd@entry=-1, do_display=do_display@entry=true, wait_for_cell=wait_for_cell@entry=0, wait_proc=wait_proc@entry=0x0, just_wait_proc=0) at process.c:4912
        process_list_head = 64340291
        process_skipped = false
        channel = <optimized out>
        nfds = <optimized out>
        Available = {fds_bits = {256, 0 <repeats 15 times>}}
        Writeok = {fds_bits = {0 <repeats 16 times>}}
        check_write = <optimized out>
        check_delay = <optimized out>
        no_avail = <optimized out>
        xerrno = 11
        proc = <optimized out>
        timeout = {tv_sec = 0, tv_nsec = 100000000}
        end_time = <optimized out>
        timer_delay = <optimized out>
        got_output_end_time = {tv_sec = 0, tv_nsec = -1}
        wait = TIMEOUT
        got_some_output = -1
        retry_for_async = false
        now = {tv_sec = 0, tv_nsec = -1}
#9  0x00000000004f31d4 in kbd_buffer_get_event (end_time=0x7ffdaceeb4a0, used_mouse_menu=0x0, kbp=<synthetic pointer>) at keyboard.c:3818
        obj = <optimized out>
        c = 0
        save_jump = {{__jmpbuf = {0, 0, 0, 0, 0, 0, 0, 0}, __mask_was_saved = 0, __saved_mask = {__val = {0 <repeats 16 times>}}}}
        kb = <optimized out>
        terminal = <optimized out>
        events = {0, 0, 0, -5809654947410033408, 3, 14, 140727504777856, 14, 66919448, 15, 15, 140727504777016, 1099517375168, 140727504776944, 16, -5809654947410033408}
        n = <optimized out>
        c = <optimized out>
        jmpcount = 12
        local_getcjmp = 
                {{__jmpbuf = {12428384, -8151255294061554333, 2, 0, 0, 0, 8150307658420737379, -8151254874423011997}, __mask_was_saved = 0, __saved_mask = {__val = {140537456196320, 16, 140727504778280, 384, 24480, 65534, 64190832, 0, 67123829, 384, 24480, 65534, 5166445, 416, 5611381, 384}}}}
        save_jump = 
                {{__jmpbuf = {2, 140727504778280, 384, 24480, 65534, 5616201, 0, 1}, __mask_was_saved = -1393642704, __saved_mask = {__val = {5641617, 3, 65462096, 65461712, 2, 0, 5515067, 0, 2, 0, 2, 140727504778128, 5641617, 66794753, 65462064, 65461712}}}}
        tem = <optimized out>
        save = <optimized out>
        previous_echo_area_message = 0
        also_record = 0
        reread = false
        recorded = false
        polling_stopped_here = true
        orig_kboard = 0x3d37970
#10 0x00000000004f31d4 in read_event_from_main_queue (used_mouse_menu=<optimized out>, local_getcjmp=<optimized out>, end_time=<optimized out>) at keyboard.c:2159
        c = 0
        save_jump = {{__jmpbuf = {0, 0, 0, 0, 0, 0, 0, 0}, __mask_was_saved = 0, __saved_mask = {__val = {0 <repeats 16 times>}}}}
        kb = <optimized out>
        terminal = <optimized out>
        events = {0, 0, 0, -5809654947410033408, 3, 14, 140727504777856, 14, 66919448, 15, 15, 140727504777016, 1099517375168, 140727504776944, 16, -5809654947410033408}
        n = <optimized out>
        c = <optimized out>
        jmpcount = 12
        local_getcjmp = 
                {{__jmpbuf = {12428384, -8151255294061554333, 2, 0, 0, 0, 8150307658420737379, -8151254874423011997}, __mask_was_saved = 0, __saved_mask = {__val = {140537456196320, 16, 140727504778280, 384, 24480, 65534, 64190832, 0, 67123829, 384, 24480, 65534, 5166445, 416, 5611381, 384}}}}
        save_jump = 
                {{__jmpbuf = {2, 140727504778280, 384, 24480, 65534, 5616201, 0, 1}, __mask_was_saved = -1393642704, __saved_mask = {__val = {5641617, 3, 65462096, 65461712, 2, 0, 5515067, 0, 2, 0, 2, 140727504778128, 5641617, 66794753, 65462064, 65461712}}}}
        tem = <optimized out>
        save = <optimized out>
        previous_echo_area_message = 0
        also_record = 0
        reread = false
        recorded = false
        polling_stopped_here = true
        orig_kboard = 0x3d37970
#11 0x00000000004f31d4 in read_decoded_event_from_main_queue (used_mouse_menu=<optimized out>, prev_event=<optimized out>, local_getcjmp=<optimized out>, end_time=<optimized out>) at keyboard.c:2222
        terminal = <optimized out>
        events = {0, 0, 0, -5809654947410033408, 3, 14, 140727504777856, 14, 66919448, 15, 15, 140727504777016, 1099517375168, 140727504776944, 16, -5809654947410033408}
        n = <optimized out>
        c = <optimized out>
        jmpcount = 12
        local_getcjmp = 
                {{__jmpbuf = {12428384, -8151255294061554333, 2, 0, 0, 0, 8150307658420737379, -8151254874423011997}, __mask_was_saved = 0, __saved_mask = {__val = {140537456196320, 16, 140727504778280, 384, 24480, 65534, 64190832, 0, 67123829, 384, 24480, 65534, 5166445, 416, 5611381, 384}}}}
        save_jump = 
                {{__jmpbuf = {2, 140727504778280, 384, 24480, 65534, 5616201, 0, 1}, __mask_was_saved = -1393642704, __saved_mask = {__val = {5641617, 3, 65462096, 65461712, 2, 0, 5515067, 0, 2, 0, 2, 140727504778128, 5641617, 66794753, 65462064, 65461712}}}}
        tem = <optimized out>
        save = <optimized out>
        previous_echo_area_message = 0
        also_record = 0
        reread = false
        recorded = false
        polling_stopped_here = true
        orig_kboard = 0x3d37970
#12 0x00000000004f31d4 in read_char (commandflag=commandflag@entry=0, map=map@entry=0, prev_event=prev_event@entry=0, used_mouse_menu=used_mouse_menu@entry=0x0, end_time=0x7ffdaceeb4a0) at keyboard.c:2810
        c = <optimized out>
        jmpcount = 12
        local_getcjmp = 
                {{__jmpbuf = {12428384, -8151255294061554333, 2, 0, 0, 0, 8150307658420737379, -8151254874423011997}, __mask_was_saved = 0, __saved_mask = {__val = {140537456196320, 16, 140727504778280, 384, 24480, 65534, 64190832, 0, 67123829, 384, 24480, 65534, 5166445, 416, 5611381, 384}}}}
        save_jump = 
                {{__jmpbuf = {2, 140727504778280, 384, 24480, 65534, 5616201, 0, 1}, __mask_was_saved = -1393642704, __saved_mask = {__val = {5641617, 3, 65462096, 65461712, 2, 0, 5515067, 0, 2, 0, 2, 140727504778128, 5641617, 66794753, 65462064, 65461712}}}}
        tem = <optimized out>
        save = <optimized out>
        previous_echo_area_message = 0
        also_record = 0
        reread = false
        recorded = false
        polling_stopped_here = true
        orig_kboard = 0x3d37970
#13 0x0000000000579651 in read_filtered_event (no_switch_frame=false, ascii_required=false, error_nonascii=false, input_method=<optimized out>, seconds=<optimized out>)
    at lread.c:614
        val = <optimized out>
        delayed_switch_frame = 0
        end_time = {tv_sec = 1478027703, tv_nsec = 127744771}
#14 0x000000000055b33b in Ffuncall (nargs=4, args=args@entry=0x7ffdaceeb5c0) at eval.c:2721
        internal_argbuf = {0, 12941008, 0, 1, 2, 4407197, 0, 5543262}
        fun = 11969901
        original_fun = <optimized out>
        numargs = 3
        val = <optimized out>
        internal_args = 0x7ffdaceeb5c8
#15 0x0000000000592a25 in exec_byte_code (bytestr=<optimized out>, vector=8913389, maxdepth=<optimized out>, args_template=<optimized out>, nargs=nargs@entry=1, args=<optimized out>, args@entry=0x7ffdaceeb5e0) at bytecode.c:639
        op = <optimized out>
        type = <optimized out>
        targets = 
        const_length = <optimized out>
        bytestr_length = <optimized out>
        vectorp = 0x8801f0 <pure+129104>
        quitcounter = 1 '\001'
        stack_items = <optimized out>
        sa_avail = <optimized out>
        sa_count = <optimized out>
        sa_must_free = <optimized out>
        stack_base = <optimized out>
        stack_lim = <optimized out>
        top = 0x7ffdaceeb5c0
        void_stack_lim = <optimized out>
        bytestr_data = <optimized out>
        pc = <optimized out>
        count = <optimized out>
        result = <optimized out>
#16 0x000000000055ae66 in funcall_lambda (fun=140727504778688, nargs=nargs@entry=1, arg_vector=0x7ffdaceeb5e0, arg_vector@entry=0x7ffdaceeb818) at eval.c:2878
        size = <optimized out>
        val = <optimized out>
        syms_left = <optimized out>
        lexenv = <optimized out>
        i = <optimized out>
        optional = <optimized out>
        rest = <optimized out>
#17 0x000000000055b14b in Ffuncall (nargs=2, args=args@entry=0x7ffdaceeb810) at eval.c:2775
        fun = <optimized out>
        original_fun = 4346592
        numargs = 1
        val = <optimized out>
        internal_args = <optimized out>
#18 0x0000000000592a25 in exec_byte_code (bytestr=<optimized out>, vector=9745021, maxdepth=<optimized out>, args_template=<optimized out>, nargs=nargs@entry=3, args=<optimized out>, args@entry=0x7ffdaceeb860) at bytecode.c:639
        op = <optimized out>
        type = <optimized out>
        targets = 
        const_length = <optimized out>
        bytestr_length = <optimized out>
        vectorp = 0x94b280 <pure+960736>
        quitcounter = 1 '\001'
        stack_items = <optimized out>
        sa_avail = <optimized out>
        sa_count = <optimized out>
        sa_must_free = <optimized out>
        stack_base = <optimized out>
        stack_lim = <optimized out>
        top = 0x7ffdaceeb810
        void_stack_lim = <optimized out>
        bytestr_data = <optimized out>
        pc = <optimized out>
        count = <optimized out>
        result = <optimized out>
#19 0x000000000055ae66 in funcall_lambda (fun=140727504779280, nargs=nargs@entry=3, arg_vector=0x7ffdaceeb860, arg_vector@entry=0x7ffdaceebbd0) at eval.c:2878
        size = <optimized out>
        val = <optimized out>
        syms_left = <optimized out>
        lexenv = <optimized out>
        i = <optimized out>
        optional = <optimized out>
        rest = <optimized out>
#20 0x000000000055b14b in Ffuncall (nargs=nargs@entry=4, args=args@entry=0x7ffdaceebbc8) at eval.c:2775
        fun = <optimized out>
        original_fun = 749968
        numargs = 3
        val = <optimized out>
        internal_args = <optimized out>
#21 0x0000000000556e2a in Ffuncall_interactively (nargs=4, args=0x7ffdaceebbc8) at callint.c:252
#22 0x000000000055b249 in Ffuncall (nargs=nargs@entry=5, args=0x7ffdaceebbc0) at eval.c:2694
        fun = 11960045
        original_fun = 24480
        numargs = 4
        val = <optimized out>
        internal_args = <optimized out>
#23 0x000000000055ca20 in Fapply (nargs=nargs@entry=3, args=args@entry=0x7ffdaceebd30) at eval.c:2342
        i = <optimized out>
        numargs = <optimized out>
        funcall_nargs = 5
        funcall_args = <optimized out>
        spread_arg = 0
        fun = <optimized out>
        retval = <optimized out>
        sa_avail = <optimized out>
        sa_must_free = <optimized out>
#24 0x000000000055719c in Fcall_interactively (function=749968, record_flag=0, keys=<optimized out>) at callint.c:389
        input = <optimized out>
        funval = <optimized out>
        events = <optimized out>
        args = <optimized out>
        visargs = <optimized out>
        specs = 64365603
        filter_specs = <optimized out>
        teml = <optimized out>
        up_event = <optimized out>
        enable = <optimized out>
        sa_avail = 16384
        sa_must_free = false
        next_event = <optimized out>
        prefix_arg = 0
        string = 0x0
        tem = <optimized out>
        varies = <optimized out>
        i = <optimized out>
        nargs = <optimized out>
        mark = <optimized out>
        arg_from_tty = false
        key_count = 2
        record_then_fail = false
        save_this_command = 749968
        save_last_command = 0
        save_this_original_command = 749968
        save_real_this_command = 749968
#25 0x000000000055b33b in Ffuncall (nargs=4, args=args@entry=0x7ffdaceebe68) at eval.c:2721
        internal_argbuf = {749968, 0, 0, 0, 1, 4407197, 140727504780776, 5543262}
        fun = 11959997
        original_fun = <optimized out>
        numargs = 3
        val = <optimized out>
        internal_args = 0x7ffdaceebe70
#26 0x0000000000592a25 in exec_byte_code (bytestr=<optimized out>, vector=9745829, maxdepth=<optimized out>, args_template=<optimized out>, nargs=nargs@entry=1, args=<optimized out>, args@entry=0x7ffdaceebea0) at bytecode.c:639
        op = <optimized out>
        type = <optimized out>
        targets = 
        const_length = <optimized out>
        bytestr_length = <optimized out>
        vectorp = 0x94b5a8 <pure+961544>
        quitcounter = 1 '\001'
        stack_items = <optimized out>
        sa_avail = <optimized out>
        sa_count = <optimized out>
        sa_must_free = <optimized out>
        stack_base = <optimized out>
        stack_lim = <optimized out>
        top = 0x7ffdaceebe68
        void_stack_lim = <optimized out>
        bytestr_data = <optimized out>
        pc = <optimized out>
        count = <optimized out>
        result = <optimized out>
#27 0x000000000055ae66 in funcall_lambda (fun=140727504780904, nargs=nargs@entry=1, arg_vector=0x7ffdaceebea0, arg_vector@entry=0x7ffdaceec0f8) at eval.c:2878
        size = <optimized out>
        val = <optimized out>
        syms_left = <optimized out>
        lexenv = <optimized out>
        i = <optimized out>
        optional = <optimized out>
        rest = <optimized out>
#28 0x000000000055b14b in Ffuncall (nargs=nargs@entry=2, args=args@entry=0x7ffdaceec0f0) at eval.c:2775
        fun = <optimized out>
        original_fun = 15120
        numargs = 1
        val = <optimized out>
        internal_args = <optimized out>
#29 0x000000000055b45a in call1 (fn=fn@entry=15120, arg1=<optimized out>) at eval.c:2573
#30 0x00000000004f6c19 in command_loop_1 () at keyboard.c:1490
        cmd = <optimized out>
        keybuf = 
          {110, 482, 5080972739175776326, -5809654947410033408, 0, 5218704, 10053880, 5663953, 4, 29040, 0, 12469504, 0, 0, 0, 4407197, 4, 5543262, 0, 12469504, 0, -5809654947410033408, 29040, 0, 13209299, 4002, -1, 5545017, 29040, 96}
        i = <optimized out>
        prev_modiff = 8
        prev_buffer = 0xc51400 <bss_sbrk_buffer+349408>
#31 0x00000000005599b2 in internal_condition_case (bfun=bfun@entry=0x4f6810 <command_loop_1>, handlers=handlers@entry=19440, hfun=hfun@entry=0x4ed7d0 <cmd_error>)
    at eval.c:1314
        val = <optimized out>
        c = <optimized out>
#32 0x00000000004e80ac in command_loop_2 (ignore=ignore@entry=0) at keyboard.c:1118
        val = 0
#33 0x0000000000559953 in internal_catch (tag=tag@entry=46800, func=func@entry=0x4e8090 <command_loop_2>, arg=arg@entry=0) at eval.c:1080
        val = <optimized out>
        c = <optimized out>
#34 0x00000000004e8069 in command_loop () at keyboard.c:1097
#35 0x00000000004ed3d7 in recursive_edit_1 () at keyboard.c:703
        val = <optimized out>
#36 0x00000000004ed718 in Frecursive_edit () at keyboard.c:774
        buffer = <optimized out>
#37 0x00000000004154fb in main (argc=<optimized out>, argv=0x7ffdaceec4e8) at emacs.c:1659
        dummy = 0
        stack_bottom_variable = 0 '\000'
        do_initial_setlocale = <optimized out>
        dumping = <optimized out>
        skip_args = 1
        no_loadup = false
        junk = 0x0
        dname_arg = 0x0
        ch_to_dir = 0x0
        original_pwd = <optimized out>
        disable_aslr = <optimized out>
        rlim = {rlim_cur = 8720384, rlim_max = 18446744073709551615}
        sockfd = -1