From unknown Wed Sep 10 09:28:51 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#37892 <37892@debbugs.gnu.org> To: bug#37892 <37892@debbugs.gnu.org> Subject: Status: 27.0.50; Crash when signaling a thread Reply-To: bug#37892 <37892@debbugs.gnu.org> Date: Wed, 10 Sep 2025 16:28:51 +0000 retitle 37892 27.0.50; Crash when signaling a thread reassign 37892 emacs submitter 37892 Micha=C5=82 Krzywkowski severity 37892 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 23 13:07:09 2019 Received: (at submit) by debbugs.gnu.org; 23 Oct 2019 17:07:09 +0000 Received: from localhost ([127.0.0.1]:34928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNK6F-00058j-Ks for submit@debbugs.gnu.org; Wed, 23 Oct 2019 13:07:08 -0400 Received: from lists.gnu.org ([209.51.188.17]:54296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNK6D-00058b-Ks for submit@debbugs.gnu.org; Wed, 23 Oct 2019 13:07:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55045) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNK67-0005bh-Q8 for bug-gnu-emacs@gnu.org; Wed, 23 Oct 2019 13:07:05 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNK64-0001Tk-1q for bug-gnu-emacs@gnu.org; Wed, 23 Oct 2019 13:06:59 -0400 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]:35283) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iNK63-0001TI-E7 for bug-gnu-emacs@gnu.org; Wed, 23 Oct 2019 13:06:56 -0400 Received: by mail-lf1-x132.google.com with SMTP id y6so10423690lfj.2 for ; Wed, 23 Oct 2019 10:06:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version; bh=vuUZVWFMOISLq1LxTYSCMP1pDQK0m0K+1o/HLBulXzQ=; b=mQ+grF3bgJdYy3A58bkRyWxOiBsp0is0UIy6Eej5nn+G1T7CVbEFXdTKKVJ0oeeeHI hkMALQUtezDJNAXxBVixWhvdDBG6hrP6XKtSTOXESRWrjBhTuk0W8kTqs6gVZrHNbcgP +N4wQN6II87OoNwoQCYwkfVBODjl+tbNMoUJK98t0AtHQL4xrlpPLUkzMgsspIyAPqld vpdpgr+YYar4DeBbPVagBKgxwMWUokuvdvtJ23w4WyhWhWTuNaPsxQpFiCYz5AtJtZIC vRy9SKGsbMM+2ea1VD4s8p6oRw/ChLBsxR6V6Ur86EkPlk7oRdQcKB+2Q+4/nFmoSqbJ 73Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=vuUZVWFMOISLq1LxTYSCMP1pDQK0m0K+1o/HLBulXzQ=; b=kE8uTZvKl4gjXHA/4UgWYOj4KKoEdliC4zeRDsQJeFdUuE6TjmcYnLGWGKLsAOowj2 qMmVL9LihQGM0pr758ZpSlGaNa470ugQIRI4l1lF0e0i2CYkaVsIE6aWpaYt7o8yyOhI Ebj4Lpm8c6Ei0JhLYXp+NORwby1s2VGRj7nrOvjz2Ogxw2/l4mcWHIbetzEhylgnGGGM m6C1q4HFPQc+SPBY1LF5O50jKsP7m1szjmHNps3/JIMV1fjuQqEF8BjmROrtov4H5wV6 1MVWXeYR/qK5RYL62x00c8+u8yyDaeREvhimbJkkK1qDjY9ESvUyr2sUhu2Z0+clMyLK Vejw== X-Gm-Message-State: APjAAAUXtXrh1VMfhvUzJNlGdyhrtCNCLOVF7Z9AVmOiO+yriNXD+8C8 dPKZLK7s5r6ACBE7KXQXe4e5R6E/ X-Google-Smtp-Source: APXvYqxnhnil/n6xcxIpqSyZE5nnindHD9QsigWf7R6afHDgr3AOBRzgqcd/xpFrdWkrmIjZkPjqjQ== X-Received: by 2002:a19:ad0a:: with SMTP id t10mr23084017lfc.113.1571850413367; Wed, 23 Oct 2019 10:06:53 -0700 (PDT) Received: from debian (89-65-39-79.dynamic.chello.pl. [89.65.39.79]) by smtp.gmail.com with ESMTPSA id y3sm9319295lfh.97.2019.10.23.10.06.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2019 10:06:52 -0700 (PDT) User-agent: mu4e 1.0; emacs 26.3.50 From: =?utf-8?Q?Micha=C5=82?= Krzywkowski To: bug-gnu-emacs@gnu.org Subject: 27.0.50; Crash when signaling a thread Date: Wed, 23 Oct 2019 19:06:42 +0200 Message-ID: <87zhhro0gt.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::132 X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Repository revision: b7037662e1111d55218fb2345f9ebb9ed3ebef13 When I evaluate this sexp, Emacs aborts: (let ((thread (make-thread (lambda () (sit-for 1.0))))) (sit-for 0.5) (thread-signal thread 'error nil)) Backtrace: Thread 5 "emacs" hit Breakpoint 1, terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=40) at emacs.c:371 371 signal (sig, SIG_DFL); #0 0x000000000041f40b in terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=40) at emacs.c:371 #1 0x000000000041f866 in emacs_abort () at sysdep.c:2450 #2 0x000000000042154b in signal_or_quit (error_symbol=XIL(0x90), data=XIL(0), keyboard_quit=) at eval.c:1598 #3 0x0000000000421564 in Fsignal (error_symbol=, data=) at eval.c:1568 #4 0x0000000000423929 in post_acquire_global_lock (self=) at thread.c:115 #5 0x00000000005c5e62 in acquire_global_lock (self=0x1465e50) at thread.c:123 #6 0x00000000005c5e62 in really_call_select (arg=0x7fffee0253b0) at thread.c:596 #7 0x00000000005c68c7 in thread_select (func=, max_fds=max_fds@entry=13, rfds=rfds@entry=0x7fffee025460, wfds=, efds=efds@entry=0x0, timeout=timeout@entry=0x7fffee025a50, sigmask=0x0) at thread.c:616 #8 0x00000000005e3058 in xg_select (fds_lim=13, rfds=rfds@entry=0x7fffee025b80, wfds=wfds@entry=0x7fffee025c00, efds=efds@entry=0x0, timeout=timeout@entry=0x7fffee025a50, sigmask=sigmask@entry=0x0) at xgselect.c:73 #9 0x00000000005a6fae in wait_reading_process_output (time_limit=, nsecs=, read_kbd=read_kbd@entry=-1, do_display=do_display@entry=true, wait_for_cell=wait_for_cell@entry=XIL(0), wait_proc=wait_proc@entry=0x0, just_wait_proc=0) at process.c:5519 #10 0x0000000000503119 in kbd_buffer_get_event (end_time=0x7fffee026360, used_mouse_menu=0x0, kbp=) at lisp.h:1032 #11 0x0000000000503119 in read_event_from_main_queue (used_mouse_menu=0x0, local_getcjmp=0x7fffee026090, end_time=0x7fffee026360) at keyboard.c:2152 #12 0x0000000000503119 in read_decoded_event_from_main_queue (used_mouse_menu=, prev_event=, local_getcjmp=, end_time=) at keyboard.c:2216 #13 0x0000000000503119 in read_char (commandflag=commandflag@entry=0, map=map@entry=XIL(0), prev_event=prev_event@entry=XIL(0), used_mouse_menu=used_mouse_menu@entry=0x0, end_time=0x7fffee026360) at keyboard.c:2826 #14 0x000000000058a51e in read_filtered_event (no_switch_frame=false, ascii_required=false, error_nonascii=false, input_method=, seconds=XIL(0xa8a86f)) at lisp.h:1032 #15 0x000000000056a7e3 in Ffuncall (nargs=4, args=args@entry=0x7fffee026430) at lisp.h:2109 #16 0x000000000059d2b1 in exec_byte_code (bytestr=, vector=, maxdepth=, args_template=, nargs=, args=) at bytecode.c:633 #17 0x000000000056c250 in apply_lambda (fun=XIL(0x7ffff031e795), args=, count=count@entry=1) at eval.c:2926 #18 0x000000000056c52b in eval_sub (form=) at eval.c:2348 #19 0x000000000056cbed in Fprogn (body=XIL(0)) at eval.c:462 #20 0x000000000056cbed in funcall_lambda (fun=XIL(0x12a7d23), nargs=0, arg_vector=0x1465e78) at eval.c:3060 #21 0x000000000056a73f in Ffuncall (nargs=nargs@entry=1, args=args@entry=0x1465e70) at eval.c:2808 #22 0x00000000005c61d8 in invoke_thread_function () at thread.c:702 #23 0x0000000000569b12 in internal_condition_case (bfun=bfun@entry=0x5c61a0 , handlers=handlers@entry=XIL(0x30), hfun=hfun@entry=0x5c5bd0 ) at eval.c:1355 #24 0x00000000005c60c2 in run_thread (state=0x1465e50) at lisp.h:1032 #25 0x00007ffff48e1fa3 in start_thread (arg=) at pthread_create.c:486 #26 0x00007ffff47254cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Full backtrace in attachment. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=gdb.txt Content-Transfer-Encoding: quoted-printable Content-Description: GDB logs Warning: /home/michal/src/emacs/../lwlib: No such file or directory. SIGINT is used by the debugger. Are you sure you want to change it? (y or n) [answered Y; input not from te= rminal] DISPLAY =3D :0.0 TERM =3D xterm-256color Breakpoint 1 at 0x41f40b: file emacs.c, line 371. Breakpoint 2 at 0x4cf6c0: file xterm.c, line 10142. Starting program: /home/michal/src/emacs/src/emacs -Q [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7fffefec8700 (LWP 14827)] [New Thread 0x7fffef565700 (LWP 14828)] [New Thread 0x7fffeec69700 (LWP 14829)] [New Thread 0x7fffee027700 (LWP 14830)] [Switching to Thread 0x7fffee027700 (LWP 14830)] Thread 5 "emacs" hit Breakpoint 1, terminate_due_to_signal (sig=3Dsig@entry= =3D6, backtrace_limit=3Dbacktrace_limit@entry=3D40) at emacs.c:371 371 signal (sig, SIG_DFL); #0 0x000000000041f40b in terminate_due_to_signal (sig=3Dsig@entry=3D6, bac= ktrace_limit=3Dbacktrace_limit@entry=3D40) at emacs.c:371 #1 0x000000000041f866 in emacs_abort () at sysdep.c:2450 #2 0x000000000042154b in signal_or_quit (error_symbol=3DXIL(0x90), data=3D= XIL(0), keyboard_quit=3D) at eval.c:1598 #3 0x0000000000421564 in Fsignal (error_symbol=3D, data=3D<= optimized out>) at eval.c:1568 #4 0x0000000000423929 in post_acquire_global_lock (self=3D)= at thread.c:115 #5 0x00000000005c5e62 in acquire_global_lock (self=3D0x1465e50) at thread.= c:123 #6 0x00000000005c5e62 in really_call_select (arg=3D0x7fffee0253b0) at thre= ad.c:596 #7 0x00000000005c68c7 in thread_select (func=3D, max_fds=3Dmax_fds@entry=3D13, rfds=3Drfds@entr= y=3D0x7fffee025460, wfds=3D, efds=3Defds@entry=3D0x0, timeou= t=3Dtimeout@entry=3D0x7fffee025a50, sigmask=3D0x0) at thread.c:616 #8 0x00000000005e3058 in xg_select (fds_lim=3D13, rfds=3Drfds@entry=3D0x7f= ffee025b80, wfds=3Dwfds@entry=3D0x7fffee025c00, efds=3Defds@entry=3D0x0, ti= meout=3Dtimeout@entry=3D0x7fffee025a50, sigmask=3Dsigmask@entry=3D0x0) at xgselect.c:73 #9 0x00000000005a6fae in wait_reading_process_output (time_limit=3D, nsecs=3D, read_kbd=3Dread= _kbd@entry=3D-1, do_display=3Ddo_display@entry=3Dtrue, wait_for_cell=3Dwait= _for_cell@entry=3DXIL(0), wait_proc=3Dwait_proc@entry=3D0x0, just_wait_proc= =3D0) at process.c:5519 #10 0x0000000000503119 in kbd_buffer_get_event (end_time=3D0x7fffee026360, = used_mouse_menu=3D0x0, kbp=3D) at lisp.h:1032 #11 0x0000000000503119 in read_event_from_main_queue (used_mouse_menu=3D0x0= , local_getcjmp=3D0x7fffee026090, end_time=3D0x7fffee026360) at keyboard.c:= 2152 #12 0x0000000000503119 in read_decoded_event_from_main_queue (used_mouse_me= nu=3D, prev_event=3D, local_getcjmp=3D, end_time=3D) at keyboard.c:2216 #13 0x0000000000503119 in read_char (commandflag=3Dcommandflag@entry=3D0, m= ap=3Dmap@entry=3DXIL(0), prev_event=3Dprev_event@entry=3DXIL(0), used_mouse= _menu=3Dused_mouse_menu@entry=3D0x0, end_time=3D0x7fffee026360) at keyboard.c:2826 #14 0x000000000058a51e in read_filtered_event (no_switch_frame=3Dfalse, asc= ii_required=3Dfalse, error_nonascii=3Dfalse, input_method=3D= , seconds=3DXIL(0xa8a86f)) at lisp.h:1032 #15 0x000000000056a7e3 in Ffuncall (nargs=3D4, args=3Dargs@entry=3D0x7fffee= 026430) at lisp.h:2109 #16 0x000000000059d2b1 in exec_byte_code (bytestr=3D, vector= =3D, maxdepth=3D, args_template=3D, nargs=3D, args=3D) at bytecode.c:633 #17 0x000000000056c250 in apply_lambda (fun=3DXIL(0x7ffff031e795), args=3D<= optimized out>, count=3Dcount@entry=3D1) at eval.c:2926 #18 0x000000000056c52b in eval_sub (form=3D) at eval.c:2348 #19 0x000000000056cbed in Fprogn (body=3DXIL(0)) at eval.c:462 #20 0x000000000056cbed in funcall_lambda (fun=3DXIL(0x12a7d23), nargs=3D0, = arg_vector=3D0x1465e78) at eval.c:3060 #21 0x000000000056a73f in Ffuncall (nargs=3Dnargs@entry=3D1, args=3Dargs@en= try=3D0x1465e70) at eval.c:2808 #22 0x00000000005c61d8 in invoke_thread_function () at thread.c:702 #23 0x0000000000569b12 in internal_condition_case (bfun=3Dbfun@entry=3D0x5c= 61a0 , handlers=3Dhandlers@entry=3DXIL(0x30), hfun= =3Dhfun@entry=3D0x5c5bd0 ) at eval.c:1355 #24 0x00000000005c60c2 in run_thread (state=3D0x1465e50) at lisp.h:1032 #25 0x00007ffff48e1fa3 in start_thread (arg=3D) at pthread_c= reate.c:486 #26 0x00007ffff47254cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clo= ne.S:95 Lisp Backtrace: "read-event" (0xee026438) "sit-for" (0xee0265c0) 0x12a7d20 Lisp type 3 #0 0x000000000041f40b in terminate_due_to_signal (sig=3Dsig@entry=3D6, bac= ktrace_limit=3Dbacktrace_limit@entry=3D40) at emacs.c:371 #1 0x000000000041f866 in emacs_abort () at sysdep.c:2450 #2 0x000000000042154b in signal_or_quit (error_symbol=3DXIL(0x90), data=3D= XIL(0), keyboard_quit=3D) at eval.c:1598 conditions =3D string =3D real_error_symbol =3D XIL(0x90) clause =3D XIL(0) h =3D #3 0x0000000000421564 in Fsignal (error_symbol=3D, data=3D<= optimized out>) at eval.c:1568 #4 0x0000000000423929 in post_acquire_global_lock (self=3D)= at thread.c:115 sym =3D data =3D prev_thread =3D #5 0x00000000005c5e62 in acquire_global_lock (self=3D0x1465e50) at thread.= c:123 sa =3D 0x7fffee0253b0 self =3D 0x1465e50 oldset =3D { __val =3D {0 , 12, 140737186519936, 11534064} } #6 0x00000000005c5e62 in really_call_select (arg=3D0x7fffee0253b0) at thre= ad.c:596 sa =3D 0x7fffee0253b0 self =3D 0x1465e50 oldset =3D { __val =3D {0 , 12, 140737186519936, 11534064} } #7 0x00000000005c68c7 in thread_select (func=3D, max_fds=3Dmax_fds@entry=3D13, rfds=3Drfds@entr= y=3D0x7fffee025460, wfds=3D, efds=3Defds@entry=3D0x0, timeou= t=3Dtimeout@entry=3D0x7fffee025a50, sigmask=3D0x0) at thread.c:616 sa =3D { func =3D 0x4192b0 ,=20 max_fds =3D 13,=20 rfds =3D 0x7fffee025460,=20 wfds =3D 0x7fffee0254e0,=20 efds =3D 0x0,=20 timeout =3D 0x7fffee025a50,=20 sigmask =3D 0x0,=20 result =3D 0 } #8 0x00000000005e3058 in xg_select (fds_lim=3D13, rfds=3Drfds@entry=3D0x7f= ffee025b80, wfds=3Dwfds@entry=3D0x7fffee025c00, efds=3Defds@entry=3D0x0, ti= meout=3Dtimeout@entry=3D0x7fffee025a50, sigmask=3Dsigmask@entry=3D0x0) at xgselect.c:73 all_rfds =3D { fds_bits =3D {0 } } all_wfds =3D { fds_bits =3D {0 } } tmo =3D { tv_sec =3D 0,=20 tv_nsec =3D 0 } tmop =3D context =3D 0xaffef0 have_wfds =3D true gfds_buf =3D {{ fd =3D 0,=20 events =3D 0,=20 revents =3D 0 } , { fd =3D -192834946,=20 events =3D 32767,=20 revents =3D 0 }, { fd =3D 0,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 0,=20 events =3D 42256,=20 revents =3D 59604 }, { fd =3D -301836384,=20 events =3D 32767,=20 revents =3D 0 }, { fd =3D -671078080,=20 events =3D 32767,=20 revents =3D 0 }, { fd =3D -40,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 1,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D -301836416,=20 events =3D 32767,=20 revents =3D 0 }, { fd =3D 2,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D -301836224,=20 events =3D 32767,=20 revents =3D 0 }, { fd =3D -192760288,=20 events =3D 32767,=20 revents =3D 0 }, { fd =3D 0,=20 events =3D 0,=20 revents =3D 0 } , { fd =3D -301836224,=20 events =3D 32767,=20 revents =3D 0 }, { fd =3D -301836384,=20 events =3D 32767,=20 revents =3D 0 }, { fd =3D -671078080,=20 events =3D 32767,=20 revents =3D 0 }, { fd =3D 0,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 0,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 0,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 8,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 0,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 7,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D -172961280,=20 events =3D 24365,=20 revents =3D 9211 }, { fd =3D 2,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 1,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 2,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D -301836224,=20 events =3D 32767,=20 revents =3D 0 }, { fd =3D 10480576,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D -301836176,=20 events =3D 32767,=20 revents =3D 0 }, { fd =3D -301836240,=20 events =3D 32767,=20 revents =3D 0 }, { fd =3D -192862136,=20 events =3D 32767,=20 revents =3D 0 }, { fd =3D 1,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D -192861830,=20 events =3D 32767,=20 revents =3D 0 }, { fd =3D 296615936,=20 events =3D 9542,=20 revents =3D 62036 }, { fd =3D -689186644,=20 events =3D 19,=20 revents =3D 0 }, { fd =3D 0,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D -671088608,=20 events =3D 32767,=20 revents =3D 0 }, { fd =3D 2,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 18765568,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 2,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 2,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 1,=20 events =3D 2,=20 revents =3D 0 }, { fd =3D -671078080,=20 events =3D 32767,=20 revents =3D 0 }, { fd =3D 0,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D -172961280,=20 events =3D 24365,=20 revents =3D 9211 }, { fd =3D 21389736,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 10480576,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 2,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 1,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 10480576,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D -192834946,=20 events =3D 32767,=20 revents =3D 0 }, { fd =3D -301836112,=20 events =3D 32767,=20 revents =3D 0 }, { fd =3D 0,=20 events =3D 10240,=20 revents =3D 61035 }, { fd =3D -671078080,=20 events =3D 32767,=20 revents =3D 0 }, { fd =3D -671078080,=20 events =3D 32767,=20 revents =3D 0 }, { fd =3D -30,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 1,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 1,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 10480576,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D -671078080,=20 events =3D 32767,=20 revents =3D 0 }, { fd =3D -192908175,=20 events =3D 32767,=20 revents =3D 0 }, { fd =3D 95938,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D -727379968,=20 events =3D 232,=20 revents =3D 0 }, { fd =3D 14713253,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 5321588,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 661861600,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 14713253,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 1,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 5973967,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 0,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 1571850000,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D -301835968,=20 events =3D 32767,=20 revents =3D 0 }, { fd =3D 5979851,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 21389733,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 1385447426,=20 events =3D 931,=20 revents =3D 0 }, { fd =3D 0,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 5236159,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 0,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 19562355,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 0,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 3,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 1571849996,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 687585021,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 19562355,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 19562352,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 1571850000,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D 661861600,=20 events =3D 0,=20 revents =3D 0 }, { fd =3D -301835904,=20 events =3D 32767,=20 revents =3D 0 }, { fd =3D -193777674,=20 events =3D 32767,=20 revents =3D 0 }} gfds =3D 0x7fffee025560 gfds_size =3D 128 n_gfds =3D retval =3D 0 our_fds =3D 0 max_fds =3D 12 context_acquired =3D false i =3D nfds =3D tmo_in_millisec =3D 0 must_free =3D 0 need_to_dispatch =3D #9 0x00000000005a6fae in wait_reading_process_output (time_limit=3D, nsecs=3D, read_kbd=3Dread_kbd@entry=3D-1, do_displ= ay=3Ddo_display@entry=3Dtrue, wait_for_cell=3Dwait_for_cell@entry=3DXIL(0),= wait_proc=3Dwait_proc@entry=3D0x0, just_wait_proc=3D0) at process.c:5519 process_skipped =3D channel =3D nfds =3D Available =3D { fds_bits =3D {0 } } Writeok =3D { fds_bits =3D {0 } } check_write =3D check_delay =3D no_avail =3D false xerrno =3D -671084448 proc =3D timeout =3D { tv_sec =3D 0,=20 tv_nsec =3D 0 } end_time =3D timer_delay =3D got_output_end_time =3D { tv_sec =3D 0,=20 tv_nsec =3D -1 } wait =3D TIMEOUT got_some_output =3D -1 prev_wait_proc_nbytes_read =3D 0 retry_for_async =3D count =3D 5 now =3D #10 0x0000000000503119 in kbd_buffer_get_event (end_time=3D0x7fffee026360, = used_mouse_menu=3D0x0, kbp=3D) at lisp.h:1032 now =3D obj =3D c =3D XIL(0) count =3D 4 save_jump =3D {{ __jmpbuf =3D {0, 0, 0, 0, 0, 0, 0, 0},=20 __mask_was_saved =3D 0,=20 __saved_mask =3D { __val =3D {0 } } }} kb =3D nextevt =3D frame =3D terminal =3D events =3D {XIL(0xffffffd8), XIL(0x1), XIL(0x7fffee026130), make_fi= xnum(0), XIL(0x7fffee0261f0), XIL(0x7ffff482b620), XIL(0xffffffd8), XIL(0x1= ), XIL(0x7fffee026160), make_fixnum(0), XIL(0x7fffee026220), XIL(0x7ffff482= b620), XIL(0), XIL(0), XIL(0), XIL(0)} n =3D 0 c =3D jmpcount =3D 4 local_getcjmp =3D {{ __jmpbuf =3D {10513216, -5446370651149326792, 0, 0, -4611686018= 813263872, 11053167, 5446338396274533944, -5446370036827969992},=20 __mask_was_saved =3D 0,=20 __saved_mask =3D { __val =3D {0, 8, 0, 7, 2592770661482025472, 2, 1, 2, 14073718= 6521584, 10480576, 140737186521632, 140737186521568, 140737296384988, 1, 18= 446744073709551615, 11387872} } }} save_jump =3D {{ __jmpbuf =3D {11387896, 140737326555575, 2, 11392168, 2, 2, -1,= 7918849472},=20 __mask_was_saved =3D 11387988,=20 __saved_mask =3D { __val =3D {4096, 0, 0, 140737186521504, 1, 140737186521584, 8= 0, 0, 17179869184000000000, 140736817270208, 140736817270208, 4294967266, 1= , 1, 10480576, 140736817270208} } }} tem =3D save =3D previous_echo_area_message =3D XIL(0) also_record =3D XIL(0) reread =3D false recorded =3D false polling_stopped_here =3D true orig_kboard =3D 0xb2e7c0 #11 0x0000000000503119 in read_event_from_main_queue (used_mouse_menu=3D0x0= , local_getcjmp=3D0x7fffee026090, end_time=3D0x7fffee026360) at keyboard.c:= 2152 c =3D XIL(0) count =3D 4 save_jump =3D {{ __jmpbuf =3D {0, 0, 0, 0, 0, 0, 0, 0},=20 __mask_was_saved =3D 0,=20 __saved_mask =3D { __val =3D {0 } } }} kb =3D nextevt =3D frame =3D terminal =3D events =3D {XIL(0xffffffd8), XIL(0x1), XIL(0x7fffee026130), make_fi= xnum(0), XIL(0x7fffee0261f0), XIL(0x7ffff482b620), XIL(0xffffffd8), XIL(0x1= ), XIL(0x7fffee026160), make_fixnum(0), XIL(0x7fffee026220), XIL(0x7ffff482= b620), XIL(0), XIL(0), XIL(0), XIL(0)} n =3D 0 c =3D jmpcount =3D 4 local_getcjmp =3D {{ __jmpbuf =3D {10513216, -5446370651149326792, 0, 0, -4611686018= 813263872, 11053167, 5446338396274533944, -5446370036827969992},=20 __mask_was_saved =3D 0,=20 __saved_mask =3D { __val =3D {0, 8, 0, 7, 2592770661482025472, 2, 1, 2, 14073718= 6521584, 10480576, 140737186521632, 140737186521568, 140737296384988, 1, 18= 446744073709551615, 11387872} } }} save_jump =3D {{ __jmpbuf =3D {11387896, 140737326555575, 2, 11392168, 2, 2, -1,= 7918849472},=20 __mask_was_saved =3D 11387988,=20 __saved_mask =3D { __val =3D {4096, 0, 0, 140737186521504, 1, 140737186521584, 8= 0, 0, 17179869184000000000, 140736817270208, 140736817270208, 4294967266, 1= , 1, 10480576, 140736817270208} } }} tem =3D save =3D previous_echo_area_message =3D XIL(0) also_record =3D XIL(0) reread =3D false recorded =3D false polling_stopped_here =3D true orig_kboard =3D 0xb2e7c0 #12 0x0000000000503119 in read_decoded_event_from_main_queue (used_mouse_me= nu=3D, prev_event=3D, local_getcjmp=3D, end_time=3D) at keyboard.c:2216 nextevt =3D frame =3D terminal =3D events =3D {XIL(0xffffffd8), XIL(0x1), XIL(0x7fffee026130), make_fi= xnum(0), XIL(0x7fffee0261f0), XIL(0x7ffff482b620), XIL(0xffffffd8), XIL(0x1= ), XIL(0x7fffee026160), make_fixnum(0), XIL(0x7fffee026220), XIL(0x7ffff482= b620), XIL(0), XIL(0), XIL(0), XIL(0)} n =3D 0 c =3D jmpcount =3D 4 local_getcjmp =3D {{ __jmpbuf =3D {10513216, -5446370651149326792, 0, 0, -4611686018= 813263872, 11053167, 5446338396274533944, -5446370036827969992},=20 __mask_was_saved =3D 0,=20 __saved_mask =3D { __val =3D {0, 8, 0, 7, 2592770661482025472, 2, 1, 2, 14073718= 6521584, 10480576, 140737186521632, 140737186521568, 140737296384988, 1, 18= 446744073709551615, 11387872} } }} save_jump =3D {{ __jmpbuf =3D {11387896, 140737326555575, 2, 11392168, 2, 2, -1,= 7918849472},=20 __mask_was_saved =3D 11387988,=20 __saved_mask =3D { __val =3D {4096, 0, 0, 140737186521504, 1, 140737186521584, 8= 0, 0, 17179869184000000000, 140736817270208, 140736817270208, 4294967266, 1= , 1, 10480576, 140736817270208} } }} tem =3D save =3D previous_echo_area_message =3D XIL(0) also_record =3D XIL(0) reread =3D false recorded =3D false polling_stopped_here =3D true orig_kboard =3D 0xb2e7c0 #13 0x0000000000503119 in read_char (commandflag=3Dcommandflag@entry=3D0, m= ap=3Dmap@entry=3DXIL(0), prev_event=3Dprev_event@entry=3DXIL(0), used_mouse= _menu=3Dused_mouse_menu@entry=3D0x0, end_time=3D0x7fffee026360) at keyboard= .c:2826 c =3D jmpcount =3D 4 local_getcjmp =3D {{ __jmpbuf =3D {10513216, -5446370651149326792, 0, 0, -4611686018= 813263872, 11053167, 5446338396274533944, -5446370036827969992},=20 __mask_was_saved =3D 0,=20 __saved_mask =3D { __val =3D {0, 8, 0, 7, 2592770661482025472, 2, 1, 2, 14073718= 6521584, 10480576, 140737186521632, 140737186521568, 140737296384988, 1, 18= 446744073709551615, 11387872} } }} save_jump =3D {{ __jmpbuf =3D {11387896, 140737326555575, 2, 11392168, 2, 2, -1,= 7918849472},=20 __mask_was_saved =3D 11387988,=20 __saved_mask =3D { __val =3D {4096, 0, 0, 140737186521504, 1, 140737186521584, 8= 0, 0, 17179869184000000000, 140736817270208, 140736817270208, 4294967266, 1= , 1, 10480576, 140736817270208} } }} tem =3D save =3D previous_echo_area_message =3D XIL(0) also_record =3D XIL(0) reread =3D false recorded =3D false polling_stopped_here =3D true orig_kboard =3D 0xb2e7c0 #14 0x000000000058a51e in read_filtered_event (no_switch_frame=3Dfalse, asc= ii_required=3Dfalse, error_nonascii=3Dfalse, input_method=3D= , seconds=3DXIL(0xa8a86f)) at lisp.h:1032 val =3D delayed_switch_frame =3D XIL(0) end_time =3D { tv_sec =3D 1571849997,=20 tv_nsec =3D 687546153 } #15 0x000000000056a7e3 in Ffuncall (nargs=3D4, args=3Dargs@entry=3D0x7fffee= 026430) at lisp.h:2109 fun =3D original_fun =3D XIL(0x7fffef915888) funcar =3D numargs =3D 3 val =3D count =3D 3 #16 0x000000000059d2b1 in exec_byte_code (bytestr=3D, vector= =3D, maxdepth=3D, args_template=3D, nargs=3D, args=3D) at bytecode.c:633 op =3D type =3D targets =3D {0x59f473 , 0x59dab4 , 0x59da7c , 0x59da77 , 0= x59d373 , 0x59d373 , 0x59da41 , 0x59da01 , 0x59d616 , 0x59d611 , 0x59d60c , 0x= 59d663 , 0x59d36b , 0x59d36b , 0x59d3e8 , 0x59d1d8 , 0x59d404 , 0x59d3fa , 0x59= d3ff , 0x59d3f5 , 0x59d2ce , 0x59d2ce , 0x59d4ef , 0x59d4fc , 0x59d4ea , 0x59d5c= 6 , 0x59d5c1 , 0x59d5bc , 0x59d32f , 0x59d32f ,= 0x59d513 , 0x59d54c , 0x59d5aa <= exec_byte_code+1610>, 0x59d5a5 , 0x59d5a0 , 0x59d57f , 0x59d291 , 0= x59d291 , 0x59d5af , 0x59d3d1 , 0x59d58e , 0x59d589 , 0x59d584 , 0x59d563 , 0x5= 9d246 , 0x59d246 , 0x59d593 , 0x59d568 , 0x59ee03 , 0x59ee30 , 0x59ee90 , 0x59f4= 73 , 0x59f473 , 0x59f473 , 0x59f473 , 0x59f473 , 0x59ef83 , 0x59ef46 , 0x59f0c= d , 0x59f08d , 0x59ebb1 , 0x59d475 , 0x59d43c , 0x59eb86 , 0x59d4b7 , 0x59d409= , 0x59eb4d , 0x59ebef , 0x59eb14 , 0x59eade = , 0x59eaa4 , 0x59ea39 , 0x59ea00 = , 0x59e967 , 0x59e9d7 , 0x59e93e , 0x59e905 ,= 0x59e8cc , 0x59e893 , 0x59e856 <= exec_byte_code+6390>, 0x59e823 , 0x59e7ae , 0x59e9a4 , 0x59e759 , = 0x59e704 , 0x59e6c9 , 0x59e68b , 0x59e64d , 0x59e5d1 , 0x59e60f , 0x59e59e , 0= x59e548 , 0x59e515 , 0x59e4e2 , 0x59e304 , 0x59e2d1 , 0x59e25b , 0x59d3a5 , 0x= 59e232 , 0x59e204 , 0x59e17f , 0x59e13c , 0x59e0e8 , 0x59e111 , 0x59e0bd , 0x5= 9e08a , 0x59e05f , 0x59f473 , 0x59e034 , 0x59e009 , 0x59e3c8 , 0x59e39d , 0x59= e47e , 0x59e374 , 0x59d3a5 , 0x59f473 , 0x59e337 , 0x59e41c , 0x59e3f3 , 0x59e= 445 , 0x59dfd0 , 0x59df82 , 0x59dfab , 0x59df49 , 0x59df10 , 0x59ded7 , 0x59de= ac , 0x59de5a , 0x59f473 , 0x59d753 , 0x59d668 , 0x59d5cb , 0x59ed15 , 0x59ecd= a , 0x59ec9f , 0x59d7ae , 0x59d78f , 0x59d520 , 0x59d734 , 0x59ee98 , 0x59d708= , 0x59ef08 , 0x59edb7 , 0x59ed7a , 0x59efd4 = , 0x59f017 , 0x59ed56 , 0x59de1d = , 0x59ddf4 , 0x59de83 , 0x59ddcb , 0x59dda2 ,= 0x59dd69 , 0x59dd30 , 0x59dcf7 <= exec_byte_code+3479>, 0x59dcbe , 0x59dc2d , 0x59dc85 , 0x59dbf4 , = 0x59dbcb , 0x59db92 , 0x59db59 , 0x59db23 , 0x59daed , 0x59da81 , 0x59e29e , 0= x59e4a9 , 0x59d61b , 0x59dab9 , 0x59f473 , 0x59ec8e , 0x59ec53 , 0x59ec18 , 0x= 59d832 , 0x59d867 , 0x59ea62 , 0x59e7e1 , 0x59e1c2 , 0x59d9c0 , 0x59d973 , 0x5= 9f473 , 0x59f473 , 0x59d931 , 0x59d8ca , 0x59f473 , 0x59f473 , 0x59f473 , 0x59= f473 , 0x59f473 , 0x59f473 , 0x59f473 , 0x59f473 , 0x59d89c } const_length =3D bytestr_length =3D vectorp =3D quitcounter =3D 1 '\001' stack_items =3D sa_avail =3D sa_count =3D alloc =3D item_bytes =3D stack_base =3D top =3D 0x7fffee026430 stack_lim =3D bytestr_data =3D pc =3D count =3D 2 result =3D #17 0x000000000056c250 in apply_lambda (fun=3DXIL(0x7ffff031e795), args=3D<= optimized out>, count=3Dcount@entry=3D1) at eval.c:2926 arg_vector =3D 0x7fffee0265c0 tem =3D sa_avail =3D sa_count =3D 2 numargs =3D 1 args_left =3D #18 0x000000000056c52b in eval_sub (form=3D) at eval.c:2348 original_fun =3D XIL(0x7fffef9157c0) original_args =3D XIL(0x12a83b3) count =3D 1 fun =3D val =3D funcar =3D argvals =3D {XIL(0), XIL(0), XIL(0), XIL(0), XIL(0), XIL(0), XIL(0)= , XIL(0)} #19 0x000000000056cbed in Fprogn (body=3DXIL(0)) at eval.c:462 form =3D form =3D val =3D XIL(0) val =3D syms_left =3D XIL(0) next =3D lexenv =3D XIL(0) i =3D optional =3D rest =3D #20 0x000000000056cbed in funcall_lambda (fun=3DXIL(0x12a7d23), nargs=3D0, = arg_vector=3D0x1465e78) at eval.c:3060 val =3D syms_left =3D XIL(0) next =3D lexenv =3D XIL(0) i =3D optional =3D rest =3D #21 0x000000000056a73f in Ffuncall (nargs=3Dnargs@entry=3D1, args=3Dargs@en= try=3D0x1465e70) at eval.c:2808 fun =3D original_fun =3D XIL(0x12a7d23) funcar =3D numargs =3D 0 val =3D count =3D 0 #22 0x00000000005c61d8 in invoke_thread_function () at thread.c:702 count =3D 0 #23 0x0000000000569b12 in internal_condition_case (bfun=3Dbfun@entry=3D0x5c= 61a0 , handlers=3Dhandlers@entry=3DXIL(0x30), hfun= =3Dhfun@entry=3D0x5c5bd0 ) at eval.c:1355 val =3D c =3D 0x7fffd8000c50 #24 0x00000000005c60c2 in run_thread (state=3D0x1465e50) at lisp.h:1032 stack_pos =3D { __max_align_ll =3D 0,=20 __max_align_ld =3D 0 } self =3D 0x1465e50 iter =3D #25 0x00007ffff48e1fa3 in start_thread (arg=3D) at pthread_c= reate.c:486 ret =3D pd =3D now =3D unwind_buf =3D { cancel_jmp_buf =3D {{ jmp_buf =3D {140737186526976, -5446369348968798664, 140737488= 342574, 140737488342575, 140737186526976, 140737488342944, 5446338395655874= 104, 5446385711734433336},=20 mask_was_saved =3D 0 }},=20 priv =3D { pad =3D {0x0, 0x0, 0x0, 0x0},=20 data =3D { prev =3D 0x0,=20 cleanup =3D 0x0,=20 canceltype =3D 0 } } } not_first_call =3D #26 0x00007ffff47254cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clo= ne.S:95 Lisp Backtrace: "read-event" (0xee026438) "sit-for" (0xee0265c0) 0x12a7d20 Lisp type 3 [Inferior 1 (process 14823) killed] --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =2D-=20 Micha=C5=82 Krzywkowski PGP: A5A7 06C4 28EF 8F64 2868 13A1 7BDE C129 F0B8 09A1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEWxyvIOWnapfz9K2Z20CneWXMPiIFAl2wiKIACgkQ20CneWXM PiLqOAgAmhqGEreYNVHWkS4lozi0Q7phZNzTvG59s+3F78N9afx4ReIz9Ejrf3cI TyTFgHGiGu/bn66JOb9iN92DJhYtctpiX2ZW/YapRdS1GqTkjTiUFE14iDvrGk7+ plS8hEOVXHBW+1jhW2+wFrvfZcojMuykCPxburMQSzdtdI860kRKLxqKt7gzpT96 7T+uA9pMgAqvlyD1fym/6JCJd8XsGGtJRMGs6Wziq4FQeq0cclRZfX1LZ9nomlM8 Egd55fHAQqolHkksEgwl6M5LdTlQM9Wz+PURBJRwJ1shvgiWyj/kBCstbr/Hqoh6 z6D/WTo2JDrkgqX4OY6TT2GfEOvbsw== =bbrw -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 25 04:44:39 2019 Received: (at 37892) by debbugs.gnu.org; 25 Oct 2019 08:44:39 +0000 Received: from localhost ([127.0.0.1]:37260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNvD4-0008Qg-O0 for submit@debbugs.gnu.org; Fri, 25 Oct 2019 04:44:38 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42933) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNvD1-0008QQ-BI for 37892@debbugs.gnu.org; Fri, 25 Oct 2019 04:44:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34255) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iNvCw-0002xY-5V; Fri, 25 Oct 2019 04:44:30 -0400 Received: from [176.228.60.248] (port=1420 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iNvCv-00067v-Dq; Fri, 25 Oct 2019 04:44:29 -0400 Date: Fri, 25 Oct 2019 11:44:16 +0300 Message-Id: <83sgnhw6xr.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?Q?Micha=C5=82?= Krzywkowski In-reply-to: <87zhhro0gt.fsf@gmail.com> (message from =?utf-8?Q?Micha?= =?utf-8?Q?=C5=82?= Krzywkowski on Wed, 23 Oct 2019 19:06:42 +0200) Subject: Re: bug#37892: 27.0.50; Crash when signaling a thread References: <87zhhro0gt.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37892 Cc: 37892@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Michał Krzywkowski > Date: Wed, 23 Oct 2019 19:06:42 +0200 > > When I evaluate this sexp, Emacs aborts: > > (let ((thread (make-thread (lambda () (sit-for 1.0))))) > (sit-for 0.5) > (thread-signal thread 'error nil)) > > Backtrace: > > Thread 5 "emacs" hit Breakpoint 1, terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=40) at emacs.c:371 > 371 signal (sig, SIG_DFL); > #0 0x000000000041f40b in terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=40) at emacs.c:371 > #1 0x000000000041f866 in emacs_abort () at sysdep.c:2450 > #2 0x000000000042154b in signal_or_quit (error_symbol=XIL(0x90), data=XIL(0), keyboard_quit=) at eval.c:1598 > #3 0x0000000000421564 in Fsignal (error_symbol=, data=) at eval.c:1568 > #4 0x0000000000423929 in post_acquire_global_lock (self=) at thread.c:115 > #5 0x00000000005c5e62 in acquire_global_lock (self=0x1465e50) at thread.c:123 Emacs doesn't allow signals while it waits for input. We could ignore thread-signal in such cases, or we could make it an error (which will then signal an error in the thread which called thread-signal). What do people think? Are there any other ideas for handling this situation? Michał, can you tell why you needed to call thread-signal while the thread was in sit-for? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 26 08:30:38 2019 Received: (at 37892) by debbugs.gnu.org; 26 Oct 2019 12:30:38 +0000 Received: from localhost ([127.0.0.1]:39776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOLDJ-0004DR-P6 for submit@debbugs.gnu.org; Sat, 26 Oct 2019 08:30:38 -0400 Received: from mail-lj1-f176.google.com ([209.85.208.176]:46696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOLDF-0004DB-2p for 37892@debbugs.gnu.org; Sat, 26 Oct 2019 08:30:34 -0400 Received: by mail-lj1-f176.google.com with SMTP id w8so1727426lji.13 for <37892@debbugs.gnu.org>; Sat, 26 Oct 2019 05:30:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=J715dQAkzVYwNovshQvSc5FKmyQVjFVXA9FMt/pvGHw=; b=Ebpy9kP3oHwHgn5n1QTUYIYgDJbDElWFPmEjR5HDDH4VAKOVVifyGZbXSnG/Nk25F5 yUb53BsXtDAPeLUmLwqNve5nLA735q7HRUfGPyxfdXNYUBXtyJES5T7SdjpZbOQcaxB6 hOpQsKB1kkLhcim6Bbs4u3l/IMju6GSmWAX0XM5l83Xec0/BNpVDXqGQN3ofJ7glyIVo 1Vanw8pbB7SLgUcbXkh8LJ1bNVYNXcZbywAkh/UAGVLXFUu0NVjhB6U3bYNhDS7/Rgik lFqQxGuRQ+37qB41gv8kABm9H9JphDH+wYedsPCFiosirdUxbrGuDkiDL1HtiiO9ot8E sk3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=J715dQAkzVYwNovshQvSc5FKmyQVjFVXA9FMt/pvGHw=; b=WpTB4y/gpUdNruIZy8CuuGlW0u38fWUHtU0Wy7H8T7EeJG299a6Qxk6NgZnmdGwypa Ir4c5szzqHiSoyS9awXnOw22WFRC8iICBHS4sFd29rKmD5qB5T57INAiwQwh9pwsNaNI L3fb9mrQ7sUTNgKnTDfTvhPn0jMlZ0K1aE9yBSLRMOrLKcStJ/iPhNVOeJsP0GzkPdXv G5IKqt91kwKkF3uPx+b4hfYgRA91OyOouwspbiswpymJ2+v4nkkYiVipiqmNxaCenk5J inzqXYyKRLqeqBoPEz/dCrqgYvMN9Y7pRX4owhCcI+YubvfIQ/1ngSvSHXbdL0xMp7VZ YaqA== X-Gm-Message-State: APjAAAV8fBZdHDyc1fwR6m2duF/B8TGsiHpZIXk0GKNok859xp69eh8V NjVBllqxTBFtIyOGNNXq2oLjkEZH X-Google-Smtp-Source: APXvYqx5VRAlxV+ES5/kmbIZaEHcGm9iTs9FF+83Xuxk/UVUmNWZ9P8fV84i1VqMtvKTZ1uSu7KkTQ== X-Received: by 2002:a2e:7c13:: with SMTP id x19mr6032872ljc.0.1572093026834; Sat, 26 Oct 2019 05:30:26 -0700 (PDT) Received: from debian (89-65-39-79.dynamic.chello.pl. [89.65.39.79]) by smtp.gmail.com with ESMTPSA id g3sm2281677ljj.59.2019.10.26.05.30.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Oct 2019 05:30:25 -0700 (PDT) References: <87zhhro0gt.fsf@gmail.com> <83sgnhw6xr.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.3.50 From: =?utf-8?Q?Micha=C5=82?= Krzywkowski To: Eli Zaretskii Subject: Re: bug#37892: 27.0.50; Crash when signaling a thread In-reply-to: <83sgnhw6xr.fsf@gnu.org> Date: Sat, 26 Oct 2019 14:29:43 +0200 Message-ID: <87blu3lmfc.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37892 Cc: 37892@debbugs.gnu.org, =?utf-8?Q?Micha=C5=82?= Krzywkowski X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >>>>> "Eli" =3D=3D Eli Zaretskii writes: >> From: Micha=C5=82 Krzywkowski >> Date: Wed, 23 Oct 2019 19:06:42 +0200 >> >> When I evaluate this sexp, Emacs aborts: >> >> (let ((thread (make-thread (lambda () (sit-for 1.0))))) >> (sit-for 0.5) >> (thread-signal thread 'error nil)) >> >> Backtrace: >> >> Thread 5 "emacs" hit Breakpoint 1, terminate_due_to_signal (sig=3Dsi= g@entry=3D6, backtrace_limit=3Dbacktrace_limit@entry=3D40) at emacs.c:371 >> 371 signal (sig, SIG_DFL); >> #0 0x000000000041f40b in terminate_due_to_signal (sig=3Dsig@entry= =3D6, backtrace_limit=3Dbacktrace_limit@entry=3D40) at emacs.c:371 >> #1 0x000000000041f866 in emacs_abort () at sysdep.c:2450 >> #2 0x000000000042154b in signal_or_quit (error_symbol=3DXIL(0x90), = data=3DXIL(0), keyboard_quit=3D) at eval.c:1598 >> #3 0x0000000000421564 in Fsignal (error_symbol=3D, d= ata=3D) at eval.c:1568 >> #4 0x0000000000423929 in post_acquire_global_lock (self=3D) at thread.c:115 >> #5 0x00000000005c5e62 in acquire_global_lock (self=3D0x1465e50) at = thread.c:123 Eli> Emacs doesn't allow signals while it waits for input. Eli> We could ignore thread-signal in such cases, or we could make it an Eli> error (which will then signal an error in the thread which called Eli> thread-signal). What do people think? Are there any other ideas = for Eli> handling this situation? Maybe the signal should be raised in the thread right after it returns from sit-for? Ignoring signals sounds like a bad idea. Eli> Micha=C5=82, can you tell why you needed to call thread-signal whi= le the Eli> thread was in sit-for? I wanted to signal some background thread which was doing some work and then Emacs crashed, because it just so happened that it was in sit-for. The thread function was doing _more_ than just sit-for. I actually don't care (and can't know) what another thread is doing, I just want to send a signal to it. Eli> Thanks. Thank you. =2D- Micha=C5=82 Krzywkowski PGP: A5A7 06C4 28EF 8F64 2868 13A1 7BDE C129 F0B8 09A1 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEWxyvIOWnapfz9K2Z20CneWXMPiIFAl20PDcACgkQ20CneWXM PiKj4wf+PYbtOHfGTe+rgVr5KS8c4qinuf2VvwzmDHuO4/mAy+Sui1BRHC9N8G8I /w0tmwP20MpMw8DMO68Bui7xKEkwtkekcoMwmN+huhuNq3/OMouqsiq9cekUwBwJ N5/k2QxyWUrHzKwKd9kKIKryufPrAL2dzfGlpRdRzSQep0pu26YD4DqHmaaKlyNw MU+FyAu3i7gSI4yPrDDl8FdVFPQohjeTsMUkKskvJRTAFWlSgTzbjfqEEBClmRCV b0DnHt2cqZf0bBCMla3qOwifmHf5z7WqFj/PcyI2abUYAXoRCEShAevAb5hxEupg YdERJ/eUIPzaPplanaOUj+BbVH4baQ== =chpl -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 26 08:59:16 2019 Received: (at 37892) by debbugs.gnu.org; 26 Oct 2019 12:59:16 +0000 Received: from localhost ([127.0.0.1]:39786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOLf1-0004sm-R6 for submit@debbugs.gnu.org; Sat, 26 Oct 2019 08:59:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOLf0-0004sZ-Bm for 37892@debbugs.gnu.org; Sat, 26 Oct 2019 08:59:14 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40729) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iOLev-0002yX-5Y; Sat, 26 Oct 2019 08:59:09 -0400 Received: from [176.228.60.248] (port=2523 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iOLeu-0006lW-9p; Sat, 26 Oct 2019 08:59:08 -0400 Date: Sat, 26 Oct 2019 15:58:58 +0300 Message-Id: <8336ffvf1p.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?Q?Micha=C5=82?= Krzywkowski In-reply-to: <87blu3lmfc.fsf@gmail.com> (message from =?utf-8?Q?Micha?= =?utf-8?Q?=C5=82?= Krzywkowski on Sat, 26 Oct 2019 14:29:43 +0200) Subject: Re: bug#37892: 27.0.50; Crash when signaling a thread References: <87zhhro0gt.fsf@gmail.com> <83sgnhw6xr.fsf@gnu.org> <87blu3lmfc.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37892 Cc: 37892@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Michał Krzywkowski > Cc: Michał Krzywkowski , > 37892@debbugs.gnu.org > Date: Sat, 26 Oct 2019 14:29:43 +0200 > > Eli> Emacs doesn't allow signals while it waits for input. > > Eli> We could ignore thread-signal in such cases, or we could make it an > Eli> error (which will then signal an error in the thread which called > Eli> thread-signal). What do people think? Are there any other ideas for > Eli> handling this situation? > > Maybe the signal should be raised in the thread right after it returns > from sit-for? We don't have any mechanism for doing that. > Ignoring signals sounds like a bad idea. It is better than crashing. It is also not much worse than interrupting the thread at some arbitrary random point. > Eli> Michał, can you tell why you needed to call thread-signal while the > Eli> thread was in sit-for? > > I wanted to signal some background thread which was doing some work and > then Emacs crashed, because it just so happened that it was in sit-for. > The thread function was doing _more_ than just sit-for. > > I actually don't care (and can't know) what another thread is doing, I > just want to send a signal to it. But thread-signal is not for causing an error in a thread, it is for unblocking a thread that waits on a mutex or a condvar. So why would you use it when the thread is not blocked? From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 27 06:16:17 2019 Received: (at 37892) by debbugs.gnu.org; 27 Oct 2019 10:16:17 +0000 Received: from localhost ([127.0.0.1]:41711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOfar-0000bk-5k for submit@debbugs.gnu.org; Sun, 27 Oct 2019 06:16:17 -0400 Received: from mail-lf1-f48.google.com ([209.85.167.48]:36988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOfao-0000bW-3K for 37892@debbugs.gnu.org; Sun, 27 Oct 2019 06:16:14 -0400 Received: by mail-lf1-f48.google.com with SMTP id b20so5574425lfp.4 for <37892@debbugs.gnu.org>; Sun, 27 Oct 2019 03:16:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=ULPOSIO8Pfwr4bIyitYU2rQB14Wkm7NTnAUCPdQigCs=; b=XscU3A8Wsqyw/6m0KCGulj7lQTvuvXE881VHTaG7/dJTwaKzR09tkuLW+46KI+jhcS L5j5IUw8FoRnRM+Hr6oLpVYcMKVWWD7FKiR+WhCWcc3ZAXL89nf80y1yTyUYuF7Qkh8c U2LW5us+IDvzyAwgHWGkKt7CAM2kV4F1ZjFOuVU6qCV+j4zia5mKwX9dEqF5vrcMOZFh veH+l/ZMsJKHY0OQE7QQnnl03X2wZ3YYqWf7/Xa6DJJzMR9OhSBKnNP90QboCtG2OrT9 +FtRIGOGfDyPlFHL3sacfWqzF7V+vOti3MKUXl6oEbx2/sIGIKJT0d+JIsle8M7enEWq hxlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=ULPOSIO8Pfwr4bIyitYU2rQB14Wkm7NTnAUCPdQigCs=; b=OLFK50Va4XYFuWZPNrtjJPwSPE/0HwBPlcuo1f5F6vckHtp3Hq4tX8p/lg93SK7wNX GFunWgwqfAlN9NfEkEUAZzp3wD9hd5xsUeM/j2R1agl8VMYeSiQRSMhKvCNxwyeZoEqb LubvV0DWWAjZgz8Xtk6CQX/QSAwuUTqfXYRCpLUOcGOlbCTMgP0Oe+skS77OyoFrjmtm 0xOWZzv6FM3HaVR6WONFpJQDHg4t01IQJrJfp7UeP8k9dwlZvLPFBulYm/Pzn2l8Nvfp nvjIolGNhVsM87q0T9JaycRRJEcoL2pfcUGEpoi1LVRP7wkgBMiXNYY/ySkymfhatTg0 HjyQ== X-Gm-Message-State: APjAAAUfBFU/pTkA85sFdS8Lpt2lzUz4QD76K+AFLxj+M2gREl0WJIwX l1ocBQwEZePWFu4rQiWpNaU58PLt X-Google-Smtp-Source: APXvYqyGo8nt1TA1jYpax/3B4LnkxzXIXBHcaIABw0YVBCp5qfD54PKv7y0/NfwbtPzZdBnjoaRozg== X-Received: by 2002:ac2:5df4:: with SMTP id z20mr1413863lfq.2.1572171367894; Sun, 27 Oct 2019 03:16:07 -0700 (PDT) Received: from debian (89-65-39-79.dynamic.chello.pl. [89.65.39.79]) by smtp.gmail.com with ESMTPSA id 3sm3301032lfq.55.2019.10.27.03.16.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Oct 2019 03:16:07 -0700 (PDT) References: <87zhhro0gt.fsf@gmail.com> <83sgnhw6xr.fsf@gnu.org> <87blu3lmfc.fsf@gmail.com> <8336ffvf1p.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.3.50 From: =?utf-8?Q?Micha=C5=82?= Krzywkowski To: Eli Zaretskii Subject: Re: bug#37892: 27.0.50; Crash when signaling a thread In-reply-to: <8336ffvf1p.fsf@gnu.org> Date: Sun, 27 Oct 2019 11:16:03 +0100 Message-ID: <878sp6wl24.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37892 Cc: 37892@debbugs.gnu.org, =?utf-8?Q?Micha=C5=82?= Krzywkowski X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >>>>> "Eli" =3D=3D Eli Zaretskii writes: Eli> Micha=C5=82, can you tell why you needed to call thread-signal whi= le the Eli> thread was in sit-for? >> >> I wanted to signal some background thread which was doing some work = and >> then Emacs crashed, because it just so happened that it was in sit-f= or. >> The thread function was doing _more_ than just sit-for. >> >> I actually don't care (and can't know) what another thread is doing,= I >> just want to send a signal to it. Eli> But thread-signal is not for causing an error in a thread, it is f= or Eli> unblocking a thread that waits on a mutex or a condvar. So why wo= uld Eli> you use it when the thread is not blocked? Then I think documentation for that function should be changed to explicitly say that the signal will *only* be delivered if the target thread is in a "blocked call to =E2=80=98mutex-lock=E2=80=99, =E2=80=98cond= ition-wait=E2=80=99, or =E2=80=98thread-join=E2=80=99". Currently, the docstring of thread-signal just says that the function will interrupt threads which are blocked, but does not actually say that the signal will be delivered only in those cases. In fact, it says that it works like signal, so I don't think it's unreasonable to assume that it will just interrupt a thread whatever it's doing. =2D- Micha=C5=82 Krzywkowski PGP: A5A7 06C4 28EF 8F64 2868 13A1 7BDE C129 F0B8 09A1 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEWxyvIOWnapfz9K2Z20CneWXMPiIFAl21bmMACgkQ20CneWXM PiJtPgf/X2KOEx4U/bvSJQ/OAQCNPA4A2MtfHdPSpypOkMXAedASTLKFEydDeAP4 rSU8/XG7G5SP8G09T6f69/vAYO/s+MacB+daIo0X2/p8oGtR+ScRhQ9Pt+hBBd5D /u39H6nfvoewc//fa1fbtD9StDxvqbe9rztrLLioIyZtRjXc1xDaq/KCLdF0xbym lOsDgNaCEywvbkXRB5dZIigBkvLTiS4xHhno2X39FBcqIYcKCtciCOUckQwjNX/V 1dlFa7EkTjdTwHyMmcr4iznpngaiAGm2pUZfS0/fU1q/OZgu588eSCfGqA4VA911 D0ZJEjQLBSBf4xYcVvWMzGtGmlcdxg== =5Xoh -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 27 09:26:05 2019 Received: (at 37892) by debbugs.gnu.org; 27 Oct 2019 13:26:05 +0000 Received: from localhost ([127.0.0.1]:41793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOiYX-0007eL-1x for submit@debbugs.gnu.org; Sun, 27 Oct 2019 09:26:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOiYV-0007e2-Il for 37892@debbugs.gnu.org; Sun, 27 Oct 2019 09:26:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56540) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iOiYQ-0004qN-CM; Sun, 27 Oct 2019 09:25:58 -0400 Received: from [176.228.60.248] (port=4919 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iOiYP-0004Sv-QS; Sun, 27 Oct 2019 09:25:58 -0400 Date: Sun, 27 Oct 2019 15:25:50 +0200 Message-Id: <83r22ys4kh.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?Q?Micha=C5=82?= Krzywkowski In-reply-to: <878sp6wl24.fsf@gmail.com> (message from =?utf-8?Q?Micha?= =?utf-8?Q?=C5=82?= Krzywkowski on Sun, 27 Oct 2019 11:16:03 +0100) Subject: Re: bug#37892: 27.0.50; Crash when signaling a thread References: <87zhhro0gt.fsf@gmail.com> <83sgnhw6xr.fsf@gnu.org> <87blu3lmfc.fsf@gmail.com> <8336ffvf1p.fsf@gnu.org> <878sp6wl24.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37892 Cc: 37892@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Michał Krzywkowski > Cc: Michał Krzywkowski , > 37892@debbugs.gnu.org > Date: Sun, 27 Oct 2019 11:16:03 +0100 > > >> I actually don't care (and can't know) what another thread is doing, I > >> just want to send a signal to it. > > Eli> But thread-signal is not for causing an error in a thread, it is for > Eli> unblocking a thread that waits on a mutex or a condvar. So why would > Eli> you use it when the thread is not blocked? > > Then I think documentation for that function should be changed to > explicitly say that the signal will *only* be delivered if the target > thread is in a "blocked call to ‘mutex-lock’, ‘condition-wait’, or > ‘thread-join’". > > Currently, the docstring of thread-signal just says that the function > will interrupt threads which are blocked, but does not actually say that > the signal will be delivered only in those cases. In fact, it says that > it works like signal, so I don't think it's unreasonable to assume that > it will just interrupt a thread whatever it's doing. The function does work like a signal, but Emacs cannot be interrupted while it waits for input. In all other cases your signal will be delivered, and if unhandled, it will terminate the thread. If we decide that thread-signal will have no effect while a thread waits for input, then we will document that, of course. My question was meant to understand your intent for signaling a thread at arbitrary time, because the effect of that is unpredictable, even if the crash didn't happen. I wanted to understand your thinking and rationale, so as to have a better basis for the decision of how to fix this problem. So could you please elaborate on your rationale? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 27 15:27:02 2019 Received: (at 37892) by debbugs.gnu.org; 27 Oct 2019 19:27:02 +0000 Received: from localhost ([127.0.0.1]:43553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOoBq-0000X6-C7 for submit@debbugs.gnu.org; Sun, 27 Oct 2019 15:27:02 -0400 Received: from sender4-pp-o94.zoho.com ([136.143.188.94]:25463) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOoBo-0000Wr-M7 for 37892@debbugs.gnu.org; Sun, 27 Oct 2019 15:27:01 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1572204414; cv=none; d=zohomail.com; s=zohoarc; b=JejLpM6QGkcbXT5izcy2DLssKV49aSQUWc6BjOoFcLtu/6Kft4C3uW4lsuVm3WO3cM94Cmhn66lTWlikd5BOT03iLZQU7rLDDpYqc8DnK9/jlkQvDY9wTgd6F56QYBaRiAN+uJn9E4BzbByJ4rfhM3wYG895uyIgUNDyfhpngXs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1572204414; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KB9oQzqXpE9VSSDGYZ7oPPvI6OiaDtfnQlX+IRDhW7U=; b=FoRpQOb9ZTiM8T0beX1NvA57SBxoz1Kg7FpjdsnES2lDDFNof+lTX2TrAhap3SjmU6HAl9UldyPuJBc13Nn2qCx3wNvxLLXbBoEKB/3+4bB4PW9x0AlG6JHWrKIya1BsB8mCG15UwphXY3oGFPpacaPMjjPafo4e7XMOCQgYGyw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=gmail.com; spf=pass smtp.mailfrom=k.michal@zoho.com; dmarc=pass header.from= header.from= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=references:user-agent:from:to:cc:subject:in-reply-to:date:message-id:mime-version:content-type:sender; b=a4Wt+gicHgGbXjcoZYMjyjSj9jCqUp27YD0XUYoZH1RthiL2qaDPB9Ga7mEqbxCx7V/EZXctoFJy 0xeV6xQ2MMx6l0b+5aq8Zlilt0VtSeDvMtuMr6FL+4QYoc84I3NU Received: from debian (89-65-39-79.dynamic.chello.pl [89.65.39.79]) by mx.zohomail.com with SMTPS id 1572204412304474.17981881179776; Sun, 27 Oct 2019 12:26:52 -0700 (PDT) References: <87zhhro0gt.fsf@gmail.com> <83sgnhw6xr.fsf@gnu.org> <87blu3lmfc.fsf@gmail.com> <8336ffvf1p.fsf@gnu.org> <878sp6wl24.fsf@gmail.com> <83r22ys4kh.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.3.50 From: =?utf-8?Q?Micha=C5=82?= Krzywkowski To: Eli Zaretskii Subject: Re: bug#37892: 27.0.50; Crash when signaling a thread In-reply-to: <83r22ys4kh.fsf@gnu.org> Date: Sun, 27 Oct 2019 20:26:43 +0100 Message-ID: <8736feyop8.fsf@zoho.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Zoho-Virus-Status: 1 X-ZohoMailClient: External X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >>>>> "Eli" == Eli Zaretskii writes: Eli> But thread-signal is not for causing an error in a thread, it is for Eli> unblocking a thread that waits on a mutex or a condvar. So why would Eli> you use [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: zoho.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (k.michal[at]zoho.com) 1.0 FORGED_GMAIL_RCVD 'From' gmail.com does not match 'Received' headers 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: 37892 Cc: 37892@debbugs.gnu.org, =?utf-8?Q?Micha=C5=82?= Krzywkowski X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >>>>> "Eli" =3D=3D Eli Zaretskii writes: Eli> But thread-signal is not for causing an error in a thread, it is f= or Eli> unblocking a thread that waits on a mutex or a condvar. So why wo= uld Eli> you use it when the thread is not blocked? >> >> Then I think documentation for that function should be changed to >> explicitly say that the signal will *only* be delivered if the target >> thread is in a "blocked call to =E2=80=98mutex-lock=E2=80=99, =E2=80= =98condition-wait=E2=80=99, or >> =E2=80=98thread-join=E2=80=99". >> >> Currently, the docstring of thread-signal just says that the function >> will interrupt threads which are blocked, but does not actually say = that >> the signal will be delivered only in those cases. In fact, it says = that >> it works like signal, so I don't think it's unreasonable to assume t= hat >> it will just interrupt a thread whatever it's doing. Eli> The function does work like a signal, but Emacs cannot be interrup= ted Eli> while it waits for input. In all other cases your signal will be Eli> delivered, and if unhandled, it will terminate the thread. Eli> If we decide that thread-signal will have no effect while a thread Eli> waits for input, then we will document that, of course. My questi= on Eli> was meant to understand your intent for signaling a thread at Eli> arbitrary time, because the effect of that is unpredictable, even = if Eli> the crash didn't happen. I wanted to understand your thinking and Eli> rationale, so as to have a better basis for the decision of how to= fix Eli> this problem. Eli> So could you please elaborate on your rationale? Actually there is no deeper reason behind it. I was just testing threads in Emacs, seeing how things behave. I certainly would think twice before writing code that interrupts a thread at an arbitrary point in a real program. When it comes to sit-for, I use it sometimes. Is there a reason not to use it in threads? In any case, I'm not encouraging anyone to program like that, I'm just reporting a crash... =2D- Micha=C5=82 Krzywkowski PGP: A5A7 06C4 28EF 8F64 2868 13A1 7BDE C129 F0B8 09A1 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEWxyvIOWnapfz9K2Z20CneWXMPiIFAl2173MACgkQ20CneWXM PiItyQf/XUCbgk2oQlkbuCHC5jcMofcQmT6ieV/0xxnwzYcklBFchXmyTeEHq8m0 E97bHXgUXHrhbm06IDuYitKQtIuYFxHxTTct6U9boE32r+mit8IXHDNVvFXK16mb APHnY/75xF+gc7ivHZazh6RYKYfvWm9BruVeu7ZSYhcnYmlc1U5ns0T/hpqKF5ZH 68o8M/oZJAAS0dSXWrhx0M+o0wqJAWHQr67+3jCY8V5RuTHpilEF+dDtbg83mgD6 ewIjc3tmDKG1ts4iIpEE/8Wckg0VPp80+Hg0oF7AMpZor4yZ83014eRHvs0ggJho pzmPrrgbtTdX8DEW8tznTvt0GO3lew== =ESb2 -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 04 22:15:18 2021 Received: (at 37892) by debbugs.gnu.org; 5 Dec 2021 03:15:18 +0000 Received: from localhost ([127.0.0.1]:55943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mthzi-0003Tw-1B for submit@debbugs.gnu.org; Sat, 04 Dec 2021 22:15:18 -0500 Received: from quimby.gnus.org ([95.216.78.240]:45224) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mthzg-0003NT-SQ for 37892@debbugs.gnu.org; Sat, 04 Dec 2021 22:15:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=vw69d1TcHv5fkB7c1bXOH3cQ1xW1Ysog2ojDEQtGVuE=; b=sDg7p06TmFx2BPbiqJgw7jm1j9 OJK0hdujx5H8G4CrdYgzBh/nOsaaUpmbCETKaNxR0AW0a9eIMsyIp9/7WSbWA1qwLQdrHTe9G/nHu v4irWOFDS/wJVNSaRCLEBQH/dXtWRBPE9SbE6Gb8ZO/4ZjMZdWo/TfVkRpAXt3RgxBVo=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mthzY-0003f7-EF; Sun, 05 Dec 2021 04:15:11 +0100 From: Lars Ingebrigtsen To: =?utf-8?Q?Micha=C5=82?= Krzywkowski Subject: Re: bug#37892: 27.0.50; Crash when signaling a thread References: <87zhhro0gt.fsf@gmail.com> X-Now-Playing: Pink Floyd's _Animals_: "Sheep" Date: Sun, 05 Dec 2021 04:15:07 +0100 In-Reply-To: <87zhhro0gt.fsf@gmail.com> (=?utf-8?Q?=22Micha=C5=82?= Krzywkowski"'s message of "Wed, 23 Oct 2019 19:06:42 +0200") Message-ID: <878rwzu4hw.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Michał Krzywkowski writes: > When I evaluate this sexp, Emacs aborts: > > (let ((thread (make-thread (lambda () (sit-for 1.0))))) > (sit-for 0.5) > (thread-signal thread 'error nil)) Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37892 Cc: 37892@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Micha=C5=82 Krzywkowski writes: > When I evaluate this sexp, Emacs aborts: > > (let ((thread (make-thread (lambda () (sit-for 1.0))))) > (sit-for 0.5) > (thread-signal thread 'error nil)) I can reproduce this in Emacs 27.1, but not in Emacs 28, so it seems like this has been fixed, and I'm closing this bug report. If the problem is still present in Emacs 28, please respond to the debbugs address and we'll reopen. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 04 22:15:25 2021 Received: (at control) by debbugs.gnu.org; 5 Dec 2021 03:15:25 +0000 Received: from localhost ([127.0.0.1]:55946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mthzp-0003b7-D1 for submit@debbugs.gnu.org; Sat, 04 Dec 2021 22:15:25 -0500 Received: from quimby.gnus.org ([95.216.78.240]:45238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mthzn-0003Ub-U2 for control@debbugs.gnu.org; Sat, 04 Dec 2021 22:15:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Nk0j03Laifupe5S4lt+1PbnN3SO70T8IYYi/5j+LOhQ=; b=pUDRftwp5TjpoLD5Jyykm07pNl JOaTrtgk3dPqOX71w+NFO1cElIbsfxs8wrT4dXZ9I0EkBxxrnVfO/cuhXRh86fpA5v62Yxl25L071 zZXlPhThZhVMRasdp1m8GhsUqrI6hc9jFB4UCqa488+jbEhHwbpgnPlwOKkJR52EuNQg=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mthzg-0003fF-96 for control@debbugs.gnu.org; Sun, 05 Dec 2021 04:15:18 +0100 Date: Sun, 05 Dec 2021 04:15:15 +0100 Message-Id: <877dcju4ho.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #37892 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 37892 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 37892 quit From unknown Wed Sep 10 09:28:51 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 02 Jan 2022 12:24:12 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator