Subject: Re: bug#25172: 26.0.50; Concurrency feature, sit-for doesn't work (crashing and unexpected behaviour)

From: Elias Mårtenson <[email-masked]>
Date: Wed, 14 Dec 2016 11:00:15 +0800

This is the first crash. It happened rougly 2 seconds after the the prompt
came back after I had typed the test case (so I'd expect the 10 threads to
still be active):

           PID: 30883 (emacs)
          UID: 50067 (emartenson)
          GID: 50067 (emartenson)
       Signal: 6 (ABRT)
    Timestamp: Wed 2016-12-14 10:55:13 SGT (4min 48s ago)
 Command Line: dist/bin/emacs -Q
   Executable: /home/emartenson/src/emacs/dist/bin/emacs-26.0.50
Control Group: /system.slice/system-getty.slice/[email-masked]
         Unit: [email-masked]
        Slice: system-getty.slice
      Boot ID: 45a62f2ad9804a0b81fed25ad8faffab
   Machine ID: 50467f3a69eb4dbea19c8a2972949839
     Hostname: em-desktop
      Storage:
/var/lib/systemd/coredump/core.emacs.50067.45a62f2ad9804a0b81fed25ad
8faffab.30883.1481684113000000000000.lz4
      Message: Process 30883 (emacs) of user 50067 dumped core.

               Stack trace of thread 30883:
               #0  0x00007f9a80490f5f raise (libpthread.so.0)
               #1  0x0000000000553ac0 terminate_due_to_signal
(emacs-26.0.50)
               #2  0x0000000000578227 handle_fatal_signal (emacs-26.0.50)
               #3  0x0000000000578157 deliver_process_signal
(emacs-26.0.50)
               #4  0x0000000000578241 deliver_fatal_signal (emacs-26.0.50)
               #5  0x00007f9a80491080 __restore_rt (libpthread.so.0)
               #6  0x00007f9a7fd9118c pselect (libc.so.6)
               #7  0x000000000069c47c xg_select (emacs-26.0.50)
               #8  0x00000000006734be really_call_select (emacs-26.0.50)
               #9  0x00000000005d481c flush_stack_call_func (emacs-26.0.50)
               #10 0x000000000067353c thread_select (emacs-26.0.50)
               #11 0x000000000064d947 wait_reading_process_output
(emacs-26.0.50)
               #12 0x000000000042516e sit_for (emacs-26.0.50)
               #13 0x000000000055baae read_char (emacs-26.0.50)
               #14 0x000000000056857a read_key_sequence (emacs-26.0.50)
               #15 0x000000000055879f command_loop_1 (emacs-26.0.50)
               #16 0x00000000005f628a internal_condition_case
(emacs-26.0.50)
               #17 0x0000000000558098 command_loop_2 (emacs-26.0.50)
               #18 0x00000000005f5b57 internal_catch (emacs-26.0.50)
               #19 0x000000000055803a command_loop (emacs-26.0.50)
               #20 0x0000000000557756 recursive_edit_1 (emacs-26.0.50)
               #21 0x00000000005578d2 Frecursive_edit (emacs-26.0.50)
               #22 0x00000000005556cd main (emacs-26.0.50)
               #23 0x00007f9a7fcd0291 __libc_start_main (libc.so.6)
               #24 0x000000000041846a _start (emacs-26.0.50)

               Stack trace of thread 30892:
               #0  0x00007f9a7fd9118c pselect (libc.so.6)
               #1  0x000000000069c47c xg_select (emacs-26.0.50)
               #2  0x00000000006734be really_call_select (emacs-26.0.50)
               #3  0x00000000005d481c flush_stack_call_func (emacs-26.0.50)
               #4  0x000000000067353c thread_select (emacs-26.0.50)
               #5  0x000000000064d947 wait_reading_process_output
(emacs-26.0.50)
               #6  0x000000000055de76 kbd_buffer_get_event (emacs-26.0.50)
               #7  0x000000000055a6fa read_event_from_main_queue
(emacs-26.0.50)
               #8  0x000000000055a93b read_decoded_event_from_main_queue
(emacs-26.
0.50)
               #9  0x000000000055bda6 read_char (emacs-26.0.50)
               #10 0x0000000000623a3f read_filtered_event (emacs-26.0.50)
               #11 0x0000000000623d22 Fread_event (emacs-26.0.50)
               #12 0x00000000005f9a79 funcall_subr (emacs-26.0.50)
               #13 0x00000000005f967e Ffuncall (emacs-26.0.50)
               #14 0x000000000063ed88 exec_byte_code (emacs-26.0.50)
               #15 0x00000000005fa07e funcall_lambda (emacs-26.0.50)
               #16 0x00000000005f9de4 apply_lambda (emacs-26.0.50)
               #17 0x00000000005f84d5 eval_sub (emacs-26.0.50)
               #18 0x00000000005f4642 Fprogn (emacs-26.0.50)
               #19 0x00000000005fa395 funcall_lambda (emacs-26.0.50)
               #20 0x00000000005f9780 Ffuncall (emacs-26.0.50)
               #21 0x0000000000673776 invoke_thread_function
(emacs-26.0.50)
               #22 0x00000000005f628a internal_condition_case
(emacs-26.0.50)
               #23 0x000000000067388a run_thread (emacs-26.0.50)
               #24 0x00007f9a80487454 start_thread (libpthread.so.0)
               #25 0x00007f9a7fd987df __clone (libc.so.6)

               Stack trace of thread 30886:
               #0  0x00007f9a7fd8f48d poll (libc.so.6)
               #1  0x00007f9a85482786 n/a (libglib-2.0.so.0)
               #2  0x00007f9a8548289c g_main_context_iteration
(libglib-2.0.so.0)
               #3  0x00007f9a769f64bd n/a (libdconfsettings.so)
               #4  0x00007f9a854aa0d5 n/a (libglib-2.0.so.0)
               #5  0x00007f9a80487454 start_thread (libpthread.so.0)
               #6  0x00007f9a7fd987df __clone (libc.so.6)

               Stack trace of thread 30888:
               #0  0x00007f9a7fd9118c pselect (libc.so.6)
               #1  0x000000000069c47c xg_select (emacs-26.0.50)
               #2  0x00000000006734be really_call_select (emacs-26.0.50)
               #3  0x00000000005d481c flush_stack_call_func (emacs-26.0.50)
               #4  0x000000000067353c thread_select (emacs-26.0.50)
               #5  0x000000000064d947 wait_reading_process_output
(emacs-26.0.50)
               #6  0x000000000055de76 kbd_buffer_get_event (emacs-26.0.50)
               #7  0x000000000055a6fa read_event_from_main_queue
(emacs-26.0.50)
               #8  0x000000000055a93b read_decoded_event_from_main_queue
(emacs-26.
0.50)
               #9  0x000000000055bda6 read_char (emacs-26.0.50)
               #10 0x0000000000623a3f read_filtered_event (emacs-26.0.50)
               #11 0x0000000000623d22 Fread_event (emacs-26.0.50)
               #12 0x00000000005f9a79 funcall_subr (emacs-26.0.50)
               #13 0x00000000005f967e Ffuncall (emacs-26.0.50)
               #14 0x000000000063ed88 exec_byte_code (emacs-26.0.50)
               #15 0x00000000005fa07e funcall_lambda (emacs-26.0.50)
               #16 0x00000000005f9de4 apply_lambda (emacs-26.0.50)
               #17 0x00000000005f84d5 eval_sub (emacs-26.0.50)
               #18 0x00000000005f4642 Fprogn (emacs-26.0.50)
               #19 0x00000000005fa395 funcall_lambda (emacs-26.0.50)
               #20 0x00000000005f9780 Ffuncall (emacs-26.0.50)
               #21 0x0000000000673776 invoke_thread_function
(emacs-26.0.50)
               #22 0x00000000005f628a internal_condition_case
(emacs-26.0.50)
               #23 0x000000000067388a run_thread (emacs-26.0.50)
               #24 0x00007f9a80487454 start_thread (libpthread.so.0)
               #25 0x00007f9a7fd987df __clone (libc.so.6)

               Stack trace of thread 30887:
               #0  0x00007f9a7fd9118c pselect (libc.so.6)
               #1  0x000000000069c47c xg_select (emacs-26.0.50)
               #2  0x00000000006734be really_call_select (emacs-26.0.50)
               #3  0x00000000005d481c flush_stack_call_func (emacs-26.0.50)
               #4  0x000000000067353c thread_select (emacs-26.0.50)
               #5  0x000000000064d947 wait_reading_process_output
(emacs-26.0.50)
               #6  0x000000000055de76 kbd_buffer_get_event (emacs-26.0.50)
               #7  0x000000000055a6fa read_event_from_main_queue
(emacs-26.0.50)
               #8  0x000000000055a93b read_decoded_event_from_main_queue
(emacs-26.
0.50)
               #9  0x000000000055bda6 read_char (emacs-26.0.50)
               #10 0x0000000000623a3f read_filtered_event (emacs-26.0.50)
               #11 0x0000000000623d22 Fread_event (emacs-26.0.50)
               #12 0x00000000005f9a79 funcall_subr (emacs-26.0.50)
               #13 0x00000000005f967e Ffuncall (emacs-26.0.50)
               #14 0x000000000063ed88 exec_byte_code (emacs-26.0.50)
               #15 0x00000000005fa07e funcall_lambda (emacs-26.0.50)
               #16 0x00000000005f9de4 apply_lambda (emacs-26.0.50)
               #17 0x00000000005f84d5 eval_sub (emacs-26.0.50)
               #18 0x00000000005f4642 Fprogn (emacs-26.0.50)
               #19 0x00000000005fa395 funcall_lambda (emacs-26.0.50)
               #20 0x00000000005f9780 Ffuncall (emacs-26.0.50)
               #21 0x0000000000673776 invoke_thread_function
(emacs-26.0.50)
               #22 0x00000000005f628a internal_condition_case
(emacs-26.0.50)
               #23 0x000000000067388a run_thread (emacs-26.0.50)
               #24 0x00007f9a80487454 start_thread (libpthread.so.0)
               #25 0x00007f9a7fd987df __clone (libc.so.6)

               Stack trace of thread 30885:
               #0  0x00007f9a7fd8f48d poll (libc.so.6)
               #1  0x00007f9a85482786 n/a (libglib-2.0.so.0)
               #2  0x00007f9a85482b12 g_main_loop_run (libglib-2.0.so.0)
               #3  0x00007f9a85a68316 n/a (libgio-2.0.so.0)
               #4  0x00007f9a854aa0d5 n/a (libglib-2.0.so.0)
               #5  0x00007f9a80487454 start_thread (libpthread.so.0)
               #6  0x00007f9a7fd987df __clone (libc.so.6)

               Stack trace of thread 30889:
               #0  0x00007f9a7fce3426 __sigsuspend (libc.so.6)
               #1  0x00000000005781eb deliver_thread_signal (emacs-26.0.50)
               #2  0x000000000057825e deliver_fatal_thread_signal
(emacs-26.0.50)
               #3  0x00007f9a80491080 __restore_rt (libpthread.so.0)
               #4  0x00007f9a7fce304f raise (libc.so.6)
               #5  0x00007f9a7fce447a abort (libc.so.6)
               #6  0x00007f9a7fcdbea7 __assert_fail_base (libc.so.6)
               #7  0x00007f9a7fcdbf52 __assert_fail (libc.so.6)
               #8  0x00007f9a84d15c4a n/a (libX11.so.6)
               #9  0x00007f9a84d15cfb n/a (libX11.so.6)
               #10 0x00007f9a84d15fed _XEventsQueued (libX11.so.6)
               #11 0x00007f9a84d07cb7 XPending (libX11.so.6)
               #12 0x00007f9a86b75cde n/a (libgdk-3.so.0)
               #13 0x00007f9a85481c89 g_main_context_prepare
(libglib-2.0.so.0)
               #14 0x00007f9a854826ab n/a (libglib-2.0.so.0)
               #15 0x00007f9a85482847 g_main_context_pending
(libglib-2.0.so.0)
               #16 0x000000000069c5e1 xg_select (emacs-26.0.50)
               #17 0x00000000006734be really_call_select (emacs-26.0.50)
               #18 0x00000000005d481c flush_stack_call_func (emacs-26.0.50)
               #19 0x000000000067353c thread_select (emacs-26.0.50)
               #20 0x000000000064d947 wait_reading_process_output
(emacs-26.0.50)
               #21 0x000000000055de76 kbd_buffer_get_event (emacs-26.0.50)
               #22 0x000000000055a6fa read_event_from_main_queue
(emacs-26.0.50)
               #23 0x000000000055a93b read_decoded_event_from_main_queue
(emacs-26.
0.50)
               #24 0x000000000055bda6 read_char (emacs-26.0.50)
               #25 0x0000000000623a3f read_filtered_event (emacs-26.0.50)
               #26 0x0000000000623d22 Fread_event (emacs-26.0.50)
               #27 0x00000000005f9a79 funcall_subr (emacs-26.0.50)
               #28 0x00000000005f967e Ffuncall (emacs-26.0.50)
               #29 0x000000000063ed88 exec_byte_code (emacs-26.0.50)
               #30 0x00000000005fa07e funcall_lambda (emacs-26.0.50)
               #31 0x00000000005f9de4 apply_lambda (emacs-26.0.50)
               #32 0x00000000005f84d5 eval_sub (emacs-26.0.50)
               #33 0x00000000005f4642 Fprogn (emacs-26.0.50)
               #34 0x00000000005fa395 funcall_lambda (emacs-26.0.50)
               #35 0x00000000005f9780 Ffuncall (emacs-26.0.50)
               #36 0x0000000000673776 invoke_thread_function
(emacs-26.0.50)
               #37 0x00000000005f628a internal_condition_case
(emacs-26.0.50)
               #38 0x000000000067388a run_thread (emacs-26.0.50)
               #39 0x00007f9a80487454 start_thread (libpthread.so.0)
               #40 0x00007f9a7fd987df __clone (libc.so.6)

               Stack trace of thread 30884:
               #0  0x00007f9a7fd8f48d poll (libc.so.6)
               #1  0x00007f9a85482786 n/a (libglib-2.0.so.0)
               #2  0x00007f9a8548289c g_main_context_iteration
(libglib-2.0.so.0)
               #3  0x00007f9a854828e1 n/a (libglib-2.0.so.0)
               #4  0x00007f9a854aa0d5 n/a (libglib-2.0.so.0)
               #5  0x00007f9a80487454 start_thread (libpthread.so.0)
               #6  0x00007f9a7fd987df __clone (libc.so.6)

               Stack trace of thread 30890:
               #0  0x00007f9a7fd9118c pselect (libc.so.6)
               #1  0x000000000069c47c xg_select (emacs-26.0.50)
               #2  0x00000000006734be really_call_select (emacs-26.0.50)
               #3  0x00000000005d481c flush_stack_call_func (emacs-26.0.50)
               #4  0x000000000067353c thread_select (emacs-26.0.50)
               #5  0x000000000064d947 wait_reading_process_output
(emacs-26.0.50)
               #6  0x000000000055de76 kbd_buffer_get_event (emacs-26.0.50)
               #7  0x000000000055a6fa read_event_from_main_queue
(emacs-26.0.50)
               #8  0x000000000055a93b read_decoded_event_from_main_queue
(emacs-26.
0.50)
               #9  0x000000000055bda6 read_char (emacs-26.0.50)
               #10 0x0000000000623a3f read_filtered_event (emacs-26.0.50)
               #11 0x0000000000623d22 Fread_event (emacs-26.0.50)
               #12 0x00000000005f9a79 funcall_subr (emacs-26.0.50)
               #13 0x00000000005f967e Ffuncall (emacs-26.0.50)
               #14 0x000000000063ed88 exec_byte_code (emacs-26.0.50)
               #15 0x00000000005fa07e funcall_lambda (emacs-26.0.50)
               #16 0x00000000005f9de4 apply_lambda (emacs-26.0.50)
               #17 0x00000000005f84d5 eval_sub (emacs-26.0.50)
               #18 0x00000000005f4642 Fprogn (emacs-26.0.50)
               #19 0x00000000005fa395 funcall_lambda (emacs-26.0.50)
               #20 0x00000000005f9780 Ffuncall (emacs-26.0.50)
               #21 0x0000000000673776 invoke_thread_function
(emacs-26.0.50)
               #22 0x00000000005f628a internal_condition_case
(emacs-26.0.50)
               #23 0x000000000067388a run_thread (emacs-26.0.50)
               #24 0x00007f9a80487454 start_thread (libpthread.so.0)
               #25 0x00007f9a7fd987df __clone (libc.so.6)

               Stack trace of thread 30895:
               #0  0x00007f9a7fd9118c pselect (libc.so.6)
               #1  0x000000000069c47c xg_select (emacs-26.0.50)
               #2  0x00000000006734be really_call_select (emacs-26.0.50)
               #3  0x00000000005d481c flush_stack_call_func (emacs-26.0.50)
               #4  0x000000000067353c thread_select (emacs-26.0.50)
               #5  0x000000000064d947 wait_reading_process_output
(emacs-26.0.50)
               #6  0x000000000055de76 kbd_buffer_get_event (emacs-26.0.50)
               #7  0x000000000055a6fa read_event_from_main_queue
(emacs-26.0.50)
               #8  0x000000000055a93b read_decoded_event_from_main_queue
(emacs-26.
0.50)
               #9  0x000000000055bda6 read_char (emacs-26.0.50)
               #10 0x0000000000623a3f read_filtered_event (emacs-26.0.50)
               #11 0x0000000000623d22 Fread_event (emacs-26.0.50)
               #12 0x00000000005f9a79 funcall_subr (emacs-26.0.50)
               #13 0x00000000005f967e Ffuncall (emacs-26.0.50)
               #14 0x000000000063ed88 exec_byte_code (emacs-26.0.50)
               #15 0x00000000005fa07e funcall_lambda (emacs-26.0.50)
               #16 0x00000000005f9de4 apply_lambda (emacs-26.0.50)
               #17 0x00000000005f84d5 eval_sub (emacs-26.0.50)
               #18 0x00000000005f4642 Fprogn (emacs-26.0.50)
               #19 0x00000000005fa395 funcall_lambda (emacs-26.0.50)
               #20 0x00000000005f9780 Ffuncall (emacs-26.0.50)
               #21 0x0000000000673776 invoke_thread_function
(emacs-26.0.50)
               #22 0x00000000005f628a internal_condition_case
(emacs-26.0.50)
               #23 0x000000000067388a run_thread (emacs-26.0.50)
               #24 0x00007f9a80487454 start_thread (libpthread.so.0)
               #25 0x00007f9a7fd987df __clone (libc.so.6)

               Stack trace of thread 30891:
               #0  0x00007f9a7fd9118c pselect (libc.so.6)
               #1  0x000000000069c47c xg_select (emacs-26.0.50)
               #2  0x00000000006734be really_call_select (emacs-26.0.50)
               #3  0x00000000005d481c flush_stack_call_func (emacs-26.0.50)
               #4  0x000000000067353c thread_select (emacs-26.0.50)
               #5  0x000000000064d947 wait_reading_process_output
(emacs-26.0.50)
               #6  0x000000000055de76 kbd_buffer_get_event (emacs-26.0.50)
               #7  0x000000000055a6fa read_event_from_main_queue
(emacs-26.0.50)
               #8  0x000000000055a93b read_decoded_event_from_main_queue
(emacs-26.
0.50)
               #9  0x000000000055bda6 read_char (emacs-26.0.50)
               #10 0x0000000000623a3f read_filtered_event (emacs-26.0.50)
               #11 0x0000000000623d22 Fread_event (emacs-26.0.50)
               #12 0x00000000005f9a79 funcall_subr (emacs-26.0.50)
               #13 0x00000000005f967e Ffuncall (emacs-26.0.50)
               #14 0x000000000063ed88 exec_byte_code (emacs-26.0.50)
               #15 0x00000000005fa07e funcall_lambda (emacs-26.0.50)
               #16 0x00000000005f9de4 apply_lambda (emacs-26.0.50)
               #17 0x00000000005f84d5 eval_sub (emacs-26.0.50)
               #18 0x00000000005f4642 Fprogn (emacs-26.0.50)
               #19 0x00000000005fa395 funcall_lambda (emacs-26.0.50)
               #20 0x00000000005f9780 Ffuncall (emacs-26.0.50)
               #21 0x0000000000673776 invoke_thread_function
(emacs-26.0.50)
               #22 0x00000000005f628a internal_condition_case
(emacs-26.0.50)
               #23 0x000000000067388a run_thread (emacs-26.0.50)
               #24 0x00007f9a80487454 start_thread (libpthread.so.0)
               #25 0x00007f9a7fd987df __clone (libc.so.6)

               Stack trace of thread 30893:
               #0  0x00007f9a7fd9118c pselect (libc.so.6)
               #1  0x000000000069c47c xg_select (emacs-26.0.50)
               #2  0x00000000006734be really_call_select (emacs-26.0.50)
               #3  0x00000000005d481c flush_stack_call_func (emacs-26.0.50)
               #4  0x000000000067353c thread_select (emacs-26.0.50)
               #5  0x000000000064d947 wait_reading_process_output
(emacs-26.0.50)
               #6  0x000000000055de76 kbd_buffer_get_event (emacs-26.0.50)
               #7  0x000000000055a6fa read_event_from_main_queue
(emacs-26.0.50)
               #8  0x000000000055a93b read_decoded_event_from_main_queue
(emacs-26.
0.50)
               #9  0x000000000055bda6 read_char (emacs-26.0.50)
               #10 0x0000000000623a3f read_filtered_event (emacs-26.0.50)
               #11 0x0000000000623d22 Fread_event (emacs-26.0.50)
               #12 0x00000000005f9a79 funcall_subr (emacs-26.0.50)
               #13 0x00000000005f967e Ffuncall (emacs-26.0.50)
               #14 0x000000000063ed88 exec_byte_code (emacs-26.0.50)
               #15 0x00000000005fa07e funcall_lambda (emacs-26.0.50)
               #16 0x00000000005f9de4 apply_lambda (emacs-26.0.50)
               #17 0x00000000005f84d5 eval_sub (emacs-26.0.50)
               #18 0x00000000005f4642 Fprogn (emacs-26.0.50)
               #19 0x00000000005fa395 funcall_lambda (emacs-26.0.50)
               #20 0x00000000005f9780 Ffuncall (emacs-26.0.50)
               #21 0x0000000000673776 invoke_thread_function
(emacs-26.0.50)
               #22 0x00000000005f628a internal_condition_case
(emacs-26.0.50)
               #23 0x000000000067388a run_thread (emacs-26.0.50)
               #24 0x00007f9a80487454 start_thread (libpthread.so.0)
               #25 0x00007f9a7fd987df __clone (libc.so.6)

               Stack trace of thread 30894:
               #0  0x00007f9a7fd9118c pselect (libc.so.6)
               #1  0x000000000069c47c xg_select (emacs-26.0.50)
               #2  0x00000000006734be really_call_select (emacs-26.0.50)
               #3  0x00000000005d481c flush_stack_call_func (emacs-26.0.50)
               #4  0x000000000067353c thread_select (emacs-26.0.50)
               #5  0x000000000064d947 wait_reading_process_output
(emacs-26.0.50)
               #6  0x000000000055de76 kbd_buffer_get_event (emacs-26.0.50)
               #7  0x000000000055a6fa read_event_from_main_queue
(emacs-26.0.50)
               #8  0x000000000055a93b read_decoded_event_from_main_queue
(emacs-26.
0.50)
               #9  0x000000000055bda6 read_char (emacs-26.0.50)
               #10 0x0000000000623a3f read_filtered_event (emacs-26.0.50)
               #11 0x0000000000623d22 Fread_event (emacs-26.0.50)
               #12 0x00000000005f9a79 funcall_subr (emacs-26.0.50)
               #13 0x00000000005f967e Ffuncall (emacs-26.0.50)
               #14 0x000000000063ed88 exec_byte_code (emacs-26.0.50)
               #15 0x00000000005fa07e funcall_lambda (emacs-26.0.50)
               #16 0x00000000005f9de4 apply_lambda (emacs-26.0.50)
               #17 0x00000000005f84d5 eval_sub (emacs-26.0.50)
               #18 0x00000000005f4642 Fprogn (emacs-26.0.50)
               #19 0x00000000005fa395 funcall_lambda (emacs-26.0.50)
               #20 0x00000000005f9780 Ffuncall (emacs-26.0.50)
               #21 0x0000000000673776 invoke_thread_function
(emacs-26.0.50)
               #22 0x00000000005f628a internal_condition_case
(emacs-26.0.50)
               #23 0x000000000067388a run_thread (emacs-26.0.50)
               #24 0x00007f9a80487454 start_thread (libpthread.so.0)
               #25 0x00007f9a7fd987df __clone (libc.so.6)

               Stack trace of thread 30896:
               #0  0x00007f9a7fd9118c pselect (libc.so.6)
               #1  0x000000000069c47c xg_select (emacs-26.0.50)
               #2  0x00000000006734be really_call_select (emacs-26.0.50)
               #3  0x00000000005d481c flush_stack_call_func (emacs-26.0.50)
               #4  0x000000000067353c thread_select (emacs-26.0.50)
               #5  0x000000000064d947 wait_reading_process_output
(emacs-26.0.50)
               #6  0x000000000055de76 kbd_buffer_get_event (emacs-26.0.50)
               #7  0x000000000055a6fa read_event_from_main_queue
(emacs-26.0.50)
               #8  0x000000000055a93b read_decoded_event_from_main_queue
(emacs-26.
0.50)
               #9  0x000000000055bda6 read_char (emacs-26.0.50)
               #10 0x0000000000623a3f read_filtered_event (emacs-26.0.50)
               #11 0x0000000000623d22 Fread_event (emacs-26.0.50)
               #12 0x00000000005f9a79 funcall_subr (emacs-26.0.50)
               #13 0x00000000005f967e Ffuncall (emacs-26.0.50)
               #14 0x000000000063ed88 exec_byte_code (emacs-26.0.50)
               #15 0x00000000005fa07e funcall_lambda (emacs-26.0.50)
               #16 0x00000000005f9de4 apply_lambda (emacs-26.0.50)
               #17 0x00000000005f84d5 eval_sub (emacs-26.0.50)
               #18 0x00000000005f4642 Fprogn (emacs-26.0.50)
               #19 0x00000000005fa395 funcall_lambda (emacs-26.0.50)
               #20 0x00000000005f9780 Ffuncall (emacs-26.0.50)
               #21 0x0000000000673776 invoke_thread_function
(emacs-26.0.50)
               #22 0x00000000005f628a internal_condition_case
(emacs-26.0.50)
               #23 0x000000000067388a run_thread (emacs-26.0.50)
               #24 0x00007f9a80487454 start_thread (libpthread.so.0)
               #25 0x00007f9a7fd987df __clone (libc.so.6)

GNU gdb (GDB) 7.12
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from
/home/emartenson/src/emacs/dist/bin/emacs-26.0.50...done.

warning: core file may not match specified executable file.
[New LWP 30883]
[New LWP 30892]
[New LWP 30886]
[New LWP 30888]
[New LWP 30887]
[New LWP 30885]
[New LWP 30889]
[New LWP 30884]
[New LWP 30890]
[New LWP 30895]
[New LWP 30891]
[New LWP 30893]
[New LWP 30894]
[New LWP 30896]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `dist/bin/emacs -Q'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00007f9a80490f5f in raise () from /usr/lib/libpthread.so.0
[Current thread is 1 (Thread 0x7f9a8837ea00 (LWP 30883))]
(gdb) bt full
#0  0x00007f9a80490f5f in raise () at /usr/lib/libpthread.so.0
#1  0x0000000000553ac0 in terminate_due_to_signal (sig=6,
backtrace_limit=40)
   at emacs.c:396
#2  0x0000000000578227 in handle_fatal_signal (sig=6) at sysdep.c:1685
#3  0x0000000000578157 in deliver_process_signal (sig=6, handler=0x57820d
<handle_fa
tal_signal>) at sysdep.c:1625
       old_errno = 11
       on_main_thread = true
#4  0x0000000000578241 in deliver_fatal_signal (sig=6) at sysdep.c:1691
#5  0x00007f9a80491080 in <signal handler called> () at
/usr/lib/libpthread.so.0
#6  0x00007f9a7fd9118c in pselect () at /usr/lib/libc.so.6
#7  0x000000000069c47c in xg_select (fds_lim=7, rfds=0x7ffe1fb55100,
wfds=0x7ffe1fb5
5080, efds=0x0, timeout=0x7ffe1fb55060, sigmask=0x0) at xgselect.c:116
       all_rfds = {fds_bits = {80, 0 <repeats 15 times>}}
       all_wfds = {fds_bits = {0 <repeats 16 times>}}
       tmo = {tv_sec = 0, tv_nsec = 140729430396064}
       tmop = 0x7ffe1fb55060
       context = 0x3313dd0
       have_wfds = true
       gfds_buf =
           {{fd = 531975088, events = 32766, revents = 0}, {fd = 6546140,
events =
0, revents = 0}, {fd = 531975376, events = 32766, revents = 0}, {fd = 1,
events = 0,
revents = 0}, {fd = 1030, events = 0, revents = 0}, {fd = 42, events = 0,
revents =
0}, {fd = 11034373, events = 0, revents = 0}, {fd = 11034340, events = 0,
revents =
0}, {fd = 8, events = 0, revents = 0}, {fd = 88, events = 0, revents = 0},
{fd = 12
147075, events = 0, revents = 0}, {fd = 11034340, events = 0, revents = 0},
{fd = 12
146904, events = 0, revents = 0}, {fd = 0, events = 0, revents = 0}, {fd =
0, events
= 0, revents = 0}, {fd = -2047037679, events = 32666, revents = 0}, {fd =
531974096
, events = 32766, revents = 0}, {fd = 63, events = 0, revents = 0}, {fd =
48, events
= 0, revents = 0}, {fd = 17611109, events = 0, revents = 0}, {fd = 48,
events = 0,
revents = 0}, {fd = 61564160, events = 0, revents = 0}, {fd = 60369824,
events = 0,
revents = 0}, {fd = 61564160, events = 0, revents = 0}, {fd = 56574800,
events = 0,
revents = 0}, {fd = 1, events = 0, revents = 0}, {fd = 0, events = 0,
revents = 0},
{fd = -2055739902, events = 32666, revents = 0}, {fd = 0, events = 0,
revents = 0},
{fd = -2055783024, events = 32666, revents = 0}, {fd = 552, events = 0,
revents = 0}
, {fd = 0, events = 0, revents = 0}, {fd = 0, events = 0, revents = 0}, {fd
= 0, eve
nts = 0, revents = 0}, {fd = 56574848, events = 0, revents = 0}, {fd = 0,
events = 0
, revents = 0}, {fd = 0, events = 0, revents = 0}, {fd = 57, events = 0,
revents = 0
}, {fd = 61564176, events = 0, revents = 0}, {fd = 0, events = 0, revents =
0}, {fd
= 0, events = 0, revents = 0}, {fd = 20388967, events = 0, revents = 0},
{fd = 61564
160, events = 0, revents = 0}, {fd = 61564176, events = 0, revents = 0},
{fd = 1, ev
ents = 0, revents = 0}, {fd = 61564176, events = 0, revents = 0}, {fd =
61564160, ev
ents = 0, revents = 0}, {fd = -2058985555, events = 32666, revents = 0},
{fd = 61564
168, events = 0, revents = 0}, {fd = 1, events = 0, revents = 0}, {fd = 2,
events =
0, revents = 0}, {fd = 0, events = 0, revents = 0}, {fd = 26, events = 0,
revents =
0}, {fd = 61794688, events = 0, revents = 0}, {fd = 61564160, events = 0,
revents =
0}, {fd = 61564160, events = 0, revents = 0}, {fd = 56574800, events = 0,
revents =
0}, {fd = -2034898992, events = 32666, revents = 0}, {fd = 61564160, events
= 0, rev
ents = 0}, {fd = 39, events = 0, revents = 0}, {fd = 53273536, events = 0,
revents =
0}, {fd = -2058745860, events = 32666, revents = 0}, {fd = 0, events = 0,
revents =
0}, {fd = 55076992, events = 0, revents = 0}, {fd = 61759792, events = 0,
revents =
0}, {fd = 61759792, events = 0, revents = 0}, {fd = 62310800, events = 0,
revents =
0}, {fd = 53558736, events = 0, revents = 0}, {fd = 531974960, events =
32766, reve
nts = 0}, {fd = -2058705456, events = 32666, revents = 0}, {fd = 55016448,
events =
0, revents = 0}, {fd = -1, events = 65535, revents = 65535}, {fd =
53392032, events
= 0, revents = 0}, {fd = -2058873208, events = 32666, revents = 0}, {fd =
53558736,
events = 0, revents = 0}, {fd = 531974960, events = 32766, revents = 0},
{fd = 19914
819, events = 0, revents = 0}, {fd = -2058869181, events = 32666, revents =
0}, {fd
= 53396328, events = 0, revents = 0}, {fd = 0, events = 0, revents = 0},
{fd = 51446
4, events = 0, revents = 0}, {fd = -1410105088, events = 6339, revents =
25345}, {fd
= 531974960, events = 32766, revents = 0}, {fd = 53558736, events = 0,
revents = 0}
, {fd = 531974960, events = 32766, revents = 0}, {fd = 19914819, events =
0, revents
= 0}, {fd = 0, events = 0, revents = 0}, {fd = 0, events = 0, revents = 0},
{fd = 0
, events = 0, revents = 0}, {fd = -2058868655, events = 32666, revents =
0}, {fd = 1
6296, events = 0, revents = 0}, {fd = 0, events = 0, revents = 0}, {fd =
531974912,
events = 32766, revents = 0}, {fd = 5653108, events = 0, revents = 0}, {fd
= 5319749
60, events = 32766, revents = 0}, {fd = 5373117, events = 0, revents = 0},
{fd = 531
974976, events = 32766, revents = 0}, {fd = 19127872, events = 0, revents =
0}, {fd
= 54183936, events = 0, revents = 0}, {fd = 19840048, events = 0, revents =
0}, {fd
---Type <return> to continue, or q <return> to quit---
= 531975104, events = 32766, revents = 0}, {fd = 5651938, events = 0,
revents = 0},
{fd = 0, events = 0, revents = 0}, {fd = 0, events = 0, revents = 0}, {fd =
0, event
s = 0, revents = 0}, {fd = 0, events = 0, revents = 0}, {fd = 0, events =
0, revents
= 0}, {fd = 0, events = 0, revents = 0}, {fd = 0, events = 0, revents = 0},
{fd = 1
3722624, events = 0, revents = 0}, {fd = 19840048, events = 0, revents =
0}, {fd = 1
9914179, events = 0, revents = 0}, {fd = 531975088, events = 32766, revents
= 0}, {f
d = 5568794, events = 0, revents = 0}, {fd = 19914195, events = 0, revents
= 0}, {fd
= 19914179, events = 0, revents = 0}, {fd = 531975152, events = 32766,
revents = 0}
, {fd = 6099742, events = 0, revents = 0}, {fd = 13233360, events = 0,
revents = 0},
{fd = 0, events = 0, revents = 0}, {fd = 0, events = 0, revents = 0}, {fd =
5319751
52, events = 32766, revents = 0}, {fd = 5568549, events = 0, revents = 0},
{fd = 1,
events = 0, revents = 0}, {fd = 531975216, events = 32766, revents = 0},
{fd = 61009
60, events = 0, revents = 0}, {fd = 13233360, events = 0, revents = 0}, {fd
= 199141
95, events = 0, revents = 0}}
       gfds = 0x7ffe1fb54810
       gfds_size = 128
       n_gfds = -1
       retval = 0
       our_fds = 0
       max_fds = 6
       context_acquired = false
       i = 0
       nfds = 0
       tmo_in_millisec = 0
       must_free = 0
       need_to_dispatch = 3
#8  0x00000000006734be in really_call_select (arg=0x7ffe1fb54e50) at
thread.c:498
       sa = 0x7ffe1fb54e50
       self = 0xcc1760 <primary_thread>
#9  0x00000000005d481c in flush_stack_call_func (func=0x673462
<really_call_select>,
arg=0x7ffe1fb54e50) at alloc.c:5137
       end = 0x7ffe1fb54dd0
       self = 0xcc1760 <primary_thread>
#10 0x000000000067353c in thread_select (func=0x69bf60 <xg_select>,
max_fds=7, rfds=
0x7ffe1fb55100, wfds=0x7ffe1fb55080, efds=0x0, timeout=0x7ffe1fb55060,
sigmask=0x0)
   at thread.c:517
       sa =
         {func = 0x69bf60 <xg_select>, max_fds = 7, rfds = 0x7ffe1fb55100,
wfds = 0
x7ffe1fb55080, efds = 0x0, timeout = 0x7ffe1fb55060, sigmask = 0x0, result
= -1}
#11 0x000000000064d947 in wait_reading_process_output (time_limit=30,
nsecs=0, read_
kbd=-1, do_display=true, wait_for_cell=0, wait_proc=0x0, just_wait_proc=0)
   at process.c:5345
       process_skipped = false
       channel = 7
       nfds = 1
       Available = {fds_bits = {80, 0 <repeats 15 times>}}
       Writeok = {fds_bits = {0 <repeats 16 times>}}
       check_write = true
       check_delay = 0
       no_avail = false
       xerrno = 11
       proc = 140729430397472
       timeout = {tv_sec = 0, tv_nsec = 234419947}
       end_time = {tv_sec = 1481684138, tv_nsec = 789096902}
       timer_delay = {tv_sec = 0, tv_nsec = 234419947}
       got_output_end_time = {tv_sec = 1481684138, tv_nsec = 789096902}
       wait = TIMEOUT
       got_some_output = -1
       retry_for_async = false
       count = 3
       now = {tv_sec = 0, tv_nsec = -1}
#12 0x000000000042516e in sit_for (timeout=122, reading=true,
display_option=1)
   at dispnew.c:5763
       sec = 30
       nsec = 0
       do_display = true
#13 0x000000000055baae in read_char (commandflag=1, map=18446627,
prev_event=0, used
_mouse_menu=0x7ffe1fb5567f, end_time=0x0) at keyboard.c:2722
       tem0 = 5568549
---Type <return> to continue, or q <return> to quit---
       timeout = 30
       delay_level = 4
       buffer_size = 2
       c = 0
       jmpcount = 3
       local_getcjmp =
               {{__jmpbuf = {0, 8329095607653709535, 4293696,
140729430400224, 0, 0
, 8329095607752275679, -8328603137968228641}, __mask_was_saved = 0,
__saved_mask = {
__val = {13648768, 13233360, 6139553, 0, 140729430398144, 5568549,
18271280, 1323336
0, 5703494, 0, 140729430398192, 5568549, 19964883, 140729430398288,
6272103, 0}}}}
       save_jump =
               {{__jmpbuf = {0, 0, 0, 0, 0, 0, 0, 0}, __mask_was_saved = 0,
__saved
_mask = {__val = {0 <repeats 16 times>}}}}
       tem = 18446627
       save = 0
       previous_echo_area_message = 0
       also_record = 0
       reread = false
       recorded = false
       polling_stopped_here = false
       orig_kboard = 0x3408040
#14 0x000000000056857a in read_key_sequence (keybuf=0x7ffe1fb55830,
bufsize=30, prom
pt=0, dont_downcase_last=false, can_return_switch_frame=true,
fix_current_buffer=tru
e, prevent_redisplay=false) at keyboard.c:9136
       interrupted_kboard = 0x3408040
       interrupted_frame = 0x12ebc30 <bss_sbrk_buffer+6464336>
       key = 1
       used_mouse_menu = false
       echo_local_start = 0
       last_real_key_start = 0
       keys_local_start = 0
       new_binding = 272
       count = 3
       t = 0
       echo_start = 0
       keys_start = 0
       current_binding = 18446627
       first_event = 0
       first_unbound = 31
       mock_input = 0
       fkey = {parent = 17969043, map = 17969043, start = 0, end = 0}
       keytran = {parent = 13711939, map = 13711939, start = 0, end = 0}
       indec = {parent = 17969059, map = 17969059, start = 0, end = 0}
       shift_translated = false
       delayed_switch_frame = 0
       original_uppercase = 0
       original_uppercase_position = -1
       dummyflag = false
       starting_buffer = 0xd16400 <bss_sbrk_buffer+346912>
       fake_prefixed_keys = 0
#15 0x000000000055879f in command_loop_1 () at keyboard.c:1373
       cmd = 9772112
       keybuf =
         {42, 29280, 6447239296, 0, 13231152, 29280, 288, 13262640,
13231152, 0, 14
0729430399184, 6271490, 4294967298, 140729430399216, 13233360, 0, 0,
140729430399184
, 5568549, 0, 140729430399280, 6272103, 14021363, 3, 13233360, 29280, 0,
14072943039
9264, 5568549, 0}
       i = 1
       prev_modiff = 19
       prev_buffer = 0xd16400 <bss_sbrk_buffer+346912>
       already_adjusted = false
#16 0x00000000005f628a in internal_condition_case (bfun=0x55838e
<command_loop_1>, h
andlers=19680, hfun=0x557b7b <cmd_error>) at eval.c:1336
       val = 5568549
       c = 0x32ce290
#17 0x0000000000558098 in command_loop_2 (ignore=0) at keyboard.c:1115
       val = 0
#18 0x00000000005f5b57 in internal_catch (tag=47088, func=0x55806f
<command_loop_2>,
arg=0) at eval.c:1101
---Type <return> to continue, or q <return> to quit---
       val = 5568549
       c = 0x32ce160
#19 0x000000000055803a in command_loop () at keyboard.c:1094
#20 0x0000000000557756 in recursive_edit_1 () at keyboard.c:700
       count = 1
       val = 140729430399664
#21 0x00000000005578d2 in Frecursive_edit () at keyboard.c:771
       count = 0
       buffer = 0
#22 0x00000000005556cd in main (argc=2, argv=0x7ffe1fb55ce8) at
emacs.c:1691
       stack_bottom_variable = 0 '\000'
       do_initial_setlocale = true
       dumping = false
       skip_args = 0
       no_loadup = false
       junk = 0x0
       dname_arg = 0x0
       ch_to_dir = 0x0
       original_pwd = 0x0
       disable_aslr = false
       rlim = {rlim_cur = 8720384, rlim_max = 18446744073709551615}
       sockfd = -1

On 14 December 2016 at 10:58, Elias Mårtenson <[email-masked]> wrote:

> On 14 December 2016 at 00:26, Eli Zaretskii <[email-masked]> wrote:
>
>> > From: Elias Mårtenson <[email-masked]>
>> > Date: Tue, 13 Dec 2016 12:16:41 +0800
>> > Cc: Clément Pit--Claudel <[email-masked]>,
>> >       [email-masked]
>> >
>> > This is the output from the SIGABRT case. Again, there is a lot of
>> information before the actual "bt full" output:
>>
>> This shows exactly the situation which I imagined could happen: 3
>> threads, including the main thread, all running the code in xg_select
>> which calls unblock_input, and aborting due to the block level being
>> negative.
>>
>> Can you try removing the calls to block_input/unblock_input from
>> xgselect.c, and see if these crashes then stop?
>>
>
> I have tried this now, and it's much more stable now. It doesn't
> immediately crash, and sometimes it doesn't crash at all.
>
> When it crashes, it does so after several seconds, and I have captured two
> of these crashes.
>
> I will post these backtraces in the following two emails.
>
> Regards,
> Elias
>