From unknown Sat Aug 16 13:40:47 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#28630 <28630@debbugs.gnu.org> To: bug#28630 <28630@debbugs.gnu.org> Subject: Status: 27.0.50; C-g while a non-main thread is sitting crashes Emacs Reply-To: bug#28630 <28630@debbugs.gnu.org> Date: Sat, 16 Aug 2025 20:40:47 +0000 retitle 28630 27.0.50; C-g while a non-main thread is sitting crashes Emacs reassign 28630 emacs submitter 28630 Alex severity 28630 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 28 03:23:29 2017 Received: (at submit) by debbugs.gnu.org; 28 Sep 2017 07:23:30 +0000 Received: from localhost ([127.0.0.1]:35849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxTAP-0003TV-LR for submit@debbugs.gnu.org; Thu, 28 Sep 2017 03:23:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42049) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxTAM-0003TH-8S for submit@debbugs.gnu.org; Thu, 28 Sep 2017 03:23:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxTAB-00063k-63 for submit@debbugs.gnu.org; Thu, 28 Sep 2017 03:23:21 -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, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52656) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dxTAB-00063e-2j for submit@debbugs.gnu.org; Thu, 28 Sep 2017 03:23:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxTA6-0000VQ-SK for bug-gnu-emacs@gnu.org; Thu, 28 Sep 2017 03:23:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxTA0-0005yM-Vz for bug-gnu-emacs@gnu.org; Thu, 28 Sep 2017 03:23:10 -0400 Received: from mail-io0-x22b.google.com ([2607:f8b0:4001:c06::22b]:56560) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dxTA0-0005xz-QZ for bug-gnu-emacs@gnu.org; Thu, 28 Sep 2017 03:23:04 -0400 Received: by mail-io0-x22b.google.com with SMTP id m103so762961iod.13 for ; Thu, 28 Sep 2017 00:23:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=7wXCwejQRmcJLC/akMuklnawKl5GN5WfVJFkSxLNA5w=; b=Bym89Hr2YcVvTCFMo1juegWBO5pAXzzjkAKOO9dFj7fpLzSN6jllx8RKQt19n2M0eD SATN9C0wY+q+fBPuqXbcqHN0xmcJmzRNdcgAmmzYD8NkdnYdvKq8cwEdnrAelGlR66WP kBr9ViKq7RDzWEL1PXcTKPeAlMKKyHpA2ZvFWgOzCkuYHwLpkjSV5hAZhKU00yC4EylR IY/1nZHdEgY8j8sGIEhAnaf25m9idikblZRZSAkYVvc9MKzlgJP+XOu3YBTsy3BGgiGj zQd9XWqW8gUQz1ix8UiTr7UqYC3dLIRJDXWD7FktfpzicJkb0BYDKww8sj6o7nImCVbm V/JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=7wXCwejQRmcJLC/akMuklnawKl5GN5WfVJFkSxLNA5w=; b=oa9t+EsMFlUxR4o4Evy9aKmmnjq+Fpn0PR0i9w+/a9kHF1zekrlig08RX5goKEGAFP 5uzGvx+whgwvm2ETswOtvU7pkwVaI9W/Jlm4c0pois7tlRf5ckpwwHXuVVxidZRsedfZ UQSp47+ZZM4Sgmjfo2V//LGKJJ86azrRDVVfOjqiOukmShd9Jw1bQmm/CPsa2gxwaXLk 2Zhx3nTcZorxzDjlX1XrCyYzxhamQuRYgO82tMCoqHqokonfWZ9LdhKfr1tfG5wUVS56 /pODwZ1obfIv0I1zi1WZuaxPwLlqIs8SC3y8l7A/T0XZa212hM4lL1JSlq0yfFDQDMb4 iNCA== X-Gm-Message-State: AMCzsaWhyr2U/SzZuveuyRLsVINZS0V7LohLp9yjMn61y9Ib9I4qzqVI lnJZ26PGJv1dldJaSuyJCG/CWw== X-Google-Smtp-Source: AOwi7QDTxzDqW1NDxQQVA9DHXPiDAJco/S4jnLQvqZpD0X0S0QIq6bY39vjp3H3uLVER5e+dVBQZpw== X-Received: by 10.107.18.85 with SMTP id a82mr5665986ioj.251.1506583383655; Thu, 28 Sep 2017 00:23:03 -0700 (PDT) Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id 137sm47998ity.7.2017.09.28.00.23.02 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Sep 2017 00:23:02 -0700 (PDT) From: Alex To: bug-gnu-emacs@gnu.org Subject: 27.0.50; C-g while a non-main thread is sitting crashes Emacs Date: Thu, 28 Sep 2017 01:22:58 -0600 Message-ID: <87efqri8x9.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) 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: -4.0 (----) Evaluate the following in emacs -Q: (make-thread (lambda () (message "hello") (sit-for 2) (message "there"))) Executing C-g before this finishes crashes Emacs. Here's a backtrace: #0 0x00007fffefa8bfcf in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007fffefa8d3fa in __GI_abort () at abort.c:89 #2 0x00007fffefac9bd0 in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7fffefbbd2c5 "*** %s ***: %s terminated\n") at ../sysdeps/posix/libc_fatal.c:175 #3 0x00007fffefb521b7 in __GI___fortify_fail (msg=0x7fffefbbd284 "longjmp causes uninitialized stack frame") at fortify_fail.c:30 #4 0x00007fffefb520ed in ____longjmp_chk () at ../sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S:100 #5 0x00007fffefb5204b in __longjmp_chk (env=env@entry=0xbbd960 , val=val@entry=1) at ../setjmp/longjmp.c:38 #6 0x00000000004f3007 in quit_throw_to_read_char (from_signal=from_signal@entry=false) at keyboard.c:10537 #7 0x0000000000501a4c in set_waiting_for_input (time_to_clear=time_to_clear@entry=0x7fffffffd940) at keyboard.c:10311 #8 0x00000000005a5d6d in wait_reading_process_output (time_limit=time_limit@entry=30, nsecs=nsecs@entry=0, read_kbd=read_kbd@entry=-1, do_display=do_display@entry=true, wait_for_cell=..., wait_for_cell@entry=..., wait_proc=wait_proc@entry=0x0, just_wait_proc=0) at process.c:5172 #9 0x0000000000424000 in sit_for (timeout=..., reading=reading@entry=true, display_option=display_option@entry=1) at dispnew.c:5764 #10 0x00000000004fdeef in read_char (commandflag=commandflag@entry=1, map=..., map@entry=..., prev_event=..., used_mouse_menu=used_mouse_menu@entry=0x7fffffffe31b, end_time=end_time@entry=0x0) at keyboard.c:2724 #11 0x00000000004feb2c in read_key_sequence (keybuf=keybuf@entry=0x7fffffffe420, prompt=..., prompt@entry=..., dont_downcase_last=dont_downcase_last@entry=false, can_return_switch_frame=can_return_switch_frame@entry=true, fix_current_buffer=fix_current_buffer@entry=true, prevent_redisplay=prevent_redisplay@entry=false, bufsize=30) at keyboard.c:9154 #12 0x0000000000500576 in command_loop_1 () at keyboard.c:1372 #13 0x000000000056495e in internal_condition_case (bfun=bfun@entry=0x500350 , handlers=..., handlers@entry=..., hfun=hfun@entry=0x4f6eb0 ) at eval.c:1332 #14 0x00000000004f2444 in command_loop_2 (ignore=..., ignore@entry=...) at keyboard.c:1114 #15 0x00000000005648cd in internal_catch (tag=..., tag@entry=..., func=func@entry=0x4f2420 , arg=..., arg@entry=...) at eval.c:1097 #16 0x00000000004f23db in command_loop () at keyboard.c:1093 #17 0x00000000004f6ac3 in recursive_edit_1 () at keyboard.c:699 #18 0x00000000004f6de6 in Frecursive_edit () at keyboard.c:770 #19 0x000000000041a3f1 in main (argc=, #argv=0x7fffffffe7a8) at emacs.c:1713 In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.18) of 2017-09-28 built on lylat Repository revision: 1f02ae39310f15bf683642b9aee1cf162bd391e6 Windowing system distributor 'The X.Org Foundation', version 11.0.11903000 System Description: Debian GNU/Linux testing (buster) Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 LCMS2 From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 30 23:18:17 2017 Received: (at 28630) by debbugs.gnu.org; 1 Oct 2017 03:18:17 +0000 Received: from localhost ([127.0.0.1]:41644 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyUll-00060b-H9 for submit@debbugs.gnu.org; Sat, 30 Sep 2017 23:18:17 -0400 Received: from mail-io0-f169.google.com ([209.85.223.169]:53572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyUlk-00060K-Ow for 28630@debbugs.gnu.org; Sat, 30 Sep 2017 23:18:17 -0400 Received: by mail-io0-f169.google.com with SMTP id q11so2491842ioe.10 for <28630@debbugs.gnu.org>; Sat, 30 Sep 2017 20:18:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=+ifYWknWImjLmWuYrf8JadDE5aUBBcbo24uTGYn8ntw=; b=SW8GgaXnmwn6cvq2J6SmF5CfEuPqi1p2R5U3PZYgmQQ4teMFb+R1PudjzB4Ak+8+GP /HIE736WPtWDw9Bjs4wv/wim4RYVv+/1r2dtY97aE/M4popCqX2+G63dnq4LLK+no/HC P8or3iBy31Wn0R2jwJnXSwj7RShUYvxaa8WswSLxHErlCucMqYidQ2jQCay0NXB2XPLl Dj6WIiDWFzmXpp/wU6/MYgknlwYKAPlu9HBiorsl9d52daXOWyQA0qN2sb3WWBs2lm1e ulr1oC+Lra3oS9RU6eV8pPSq+dNJkJnUg2up0SfBbOd7vlLkr8uqIbHCeaAAVxPWZAWg aBqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=+ifYWknWImjLmWuYrf8JadDE5aUBBcbo24uTGYn8ntw=; b=mcljkwJudsLEHTnlrEIyDb2cBMGJUnt+M1jADancpBZUh1SUEd/Wk8uC0K6MBoGodU GnFFPnVQ3D8lJxIafIJ26v192KW39KO8pp96LdX4etwRp1q9AdyqkB18aY5cxSQkXhkk SvXfujRAYAb+xll4ZNnLuXoC8qe5JleY4FN7kjDDFqTejJqfjqeb7BTZAbSgA6gRx6kP GTU8ND756TtViTx+H7e/zlYoUyyLAIkemG57S5z3i3uL5K1CXo5PldrKhOdbJbPShgBk HnDF1DjQ9rZI3wNCsLOtdx/dFOKhM2EDeLgdWFUmqdv2+H9n6LYobrXDZ9KcmDIG/PWs 9BUQ== X-Gm-Message-State: AMCzsaVgEjlqNWl5GmXlWArzRRvPrTQG1VvJrUTbRZCc6R2xAjrycgqY 08jfwCH7koLEnPy8yPwEhT0= X-Google-Smtp-Source: AOwi7QB6UOB2rXbGOu/DfNnTNxZdEv9UrwmO85wsE7xWkh5k/d3oxwczPa/V4vlWxAhmyG8Kp/ePGQ== X-Received: by 10.107.201.84 with SMTP id z81mr19617245iof.96.1506827891125; Sat, 30 Sep 2017 20:18:11 -0700 (PDT) Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id o71sm3102131itb.15.2017.09.30.20.18.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 30 Sep 2017 20:18:10 -0700 (PDT) From: Alex To: 28630@debbugs.gnu.org Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs References: <87efqri8x9.fsf@gmail.com> Date: Sat, 30 Sep 2017 21:18:08 -0600 In-Reply-To: <87efqri8x9.fsf@gmail.com> (Alex's message of "Thu, 28 Sep 2017 01:22:58 -0600") Message-ID: <874lrjy2rz.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 28630 Cc: eliz@gnu.org, Tom Tromey 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 (--) Alex writes: > Evaluate the following in emacs -Q: > > (make-thread > (lambda () > (message "hello") > (sit-for 2) > (message "there"))) > > Executing C-g before this finishes crashes Emacs. Here's a backtrace: > [...] Should this be labelled a blocker for Emacs 26? This appears to be a related to bug 25214, since I just tried to hit C-g when running the example there and it indeed crashes Emacs. It should be noted that `keyboard-escape-quit' (ESC ESC ESC) doesn't crash Emacs. Also, replacing (sit-for 2) with (read-char) or its family and hitting C-g will also crash Emacs. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 01 06:08:12 2017 Received: (at 28630) by debbugs.gnu.org; 1 Oct 2017 10:08:12 +0000 Received: from localhost ([127.0.0.1]:41767 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dybAS-0000kb-EO for submit@debbugs.gnu.org; Sun, 01 Oct 2017 06:08:12 -0400 Received: from mail-wr0-f171.google.com ([209.85.128.171]:49635) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dybAQ-0000kN-Ik for 28630@debbugs.gnu.org; Sun, 01 Oct 2017 06:08:10 -0400 Received: by mail-wr0-f171.google.com with SMTP id p10so261287wrc.6 for <28630@debbugs.gnu.org>; Sun, 01 Oct 2017 03:08:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=YtoDykx3DhtMv0xeS70bO18eNCpzekbczvjeUhw8hoA=; b=AIISvszO6wrtscoLJzE97SFvbMEP0ly9KQDHctU1oZK7az2ckucd89dytc0BGPxlRc 2Ddh4zexIt6D9jfsWjggqXR98GFGsx5xezB/HHJSOgJ41+ftfIO6gEnbUMq4HoFKVzzM CFKKubkDuvVw90oJJzXf1SoBJ48aIwiLY+utls3tKWEiJjyzLf7Xpah5ZQlEdM/JiOdt GW4in9H5kh3yIPZ2kdKmG9LN+vIk3CKvY8XlEveTZIx+QHPxnRTFwxUpx5/k8jufyWm+ HR9h8Bxl40pnjfq/IbA8+z9+zFBAV0UCDcIMB1AFcObXRJSfPkGda8hF/9RBdzkJByax C/Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=YtoDykx3DhtMv0xeS70bO18eNCpzekbczvjeUhw8hoA=; b=mTDM2r8cSxvHctnNi+IxIA0nC0+lgZm895iN5cje97ty4pTjdYvbCHD2YOkdZHAJfL /5L9wqrjo0wcYYbvP+MnrLx8OOUfxIqZuI/HvsVhSH/beTBoZqxdTXLdLKYvTK1ZWLBy ODwQvmkWSdHmsV4DCq47TwB3xFoSF3fRGHe0qW0XXczAFWkWu9edb1cgdISC81YehGVv APPGRQFlWr+G5faiU8qUkORKhhNKTZgIybZVf8m1ZSx/P+XeEGpkRXaOyRy0czsBfuv9 Iv6eKOiOLV9+9ATAHND6I0qr72xLux3iDkdmxEVhEskUY6n0Fn0GHQm3y7pHOJsrOwjI AseQ== X-Gm-Message-State: AHPjjUhAjhbXrwA0JaEZukHkJB6nwgAaK22mTw89ElfgSXXX3pN+jY3f XIAqqjGHeM5QdLt92Xmcvuk= X-Google-Smtp-Source: AOwi7QAac9Vb4ttWwCuoBsM8ozBFw7sC4Rj9CYuCxpLSNH41UDTP3xZrKSWpCh1LH+c0930oSmXhNQ== X-Received: by 10.223.179.200 with SMTP id x8mr11759818wrd.274.1506852484937; Sun, 01 Oct 2017 03:08:04 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-ad89-e054-05c6-3eca.holly.idiocy.org. [2001:8b0:3f8:8129:ad89:e054:5c6:3eca]) by smtp.gmail.com with ESMTPSA id w75sm4330581wmw.17.2017.10.01.03.08.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Oct 2017 03:08:04 -0700 (PDT) Date: Sun, 1 Oct 2017 11:08:01 +0100 From: Alan Third To: Alex Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs Message-ID: <20171001100801.GA33081@breton.holly.idiocy.org> References: <87efqri8x9.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87efqri8x9.fsf@gmail.com> User-Agent: Mutt/1.9.0 (2017-09-02) X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 28630 Cc: 28630@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: -2.6 (--) On Thu, Sep 28, 2017 at 01:22:58AM -0600, Alex wrote: > Evaluate the following in emacs -Q: > > (make-thread > (lambda () > (message "hello") > (sit-for 2) > (message "there"))) > > Executing C-g before this finishes crashes Emacs. I can reproduce this crash on GNU/Linux, but not when built --with-ns. -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 01 11:02:01 2017 Received: (at 28630) by debbugs.gnu.org; 1 Oct 2017 15:02:01 +0000 Received: from localhost ([127.0.0.1]:42867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyfkn-0005d3-6a for submit@debbugs.gnu.org; Sun, 01 Oct 2017 11:02:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36128) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyfkk-0005cr-Q3 for 28630@debbugs.gnu.org; Sun, 01 Oct 2017 11:01:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dyfka-0003zu-Ud for 28630@debbugs.gnu.org; Sun, 01 Oct 2017 11:01:53 -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.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48203) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dyfkD-0003lr-Gh; Sun, 01 Oct 2017 11:01:25 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4885 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dyfkC-0003ee-Gx; Sun, 01 Oct 2017 11:01:25 -0400 Date: Sun, 01 Oct 2017 18:01:19 +0300 Message-Id: <831smm52v4.fsf@gnu.org> From: Eli Zaretskii To: Alex In-reply-to: <874lrjy2rz.fsf@gmail.com> (message from Alex on Sat, 30 Sep 2017 21:18:08 -0600) Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com 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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Alex > Cc: eliz@gnu.org, Tom Tromey > Date: Sat, 30 Sep 2017 21:18:08 -0600 > > Should this be labelled a blocker for Emacs 26? Maybe I'm not sure. It doesn't sound like threads are used much, if at all, which would make blocking on it silly. > This appears to be a related to bug 25214, since I just tried to hit > C-g when running the example there and it indeed crashes Emacs. Could be, but the problem in that bug is not a crash, it's the way the code was written to work. > It should be noted that `keyboard-escape-quit' (ESC ESC ESC) doesn't > crash Emacs. Most probably because it doesn't longjmp. > Also, replacing (sit-for 2) with (read-char) or its family and hitting > C-g will also crash Emacs. Is your Emacs built with --enable-checking? Because I get an assertion violation in that case, not a crash. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 01 11:03:47 2017 Received: (at 28630) by debbugs.gnu.org; 1 Oct 2017 15:03:47 +0000 Received: from localhost ([127.0.0.1]:42871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyfmU-0005g3-NL for submit@debbugs.gnu.org; Sun, 01 Oct 2017 11:03:46 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyfmT-0005fp-5r for 28630@debbugs.gnu.org; Sun, 01 Oct 2017 11:03:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dyfmJ-0005DQ-Ky for 28630@debbugs.gnu.org; Sun, 01 Oct 2017 11:03:40 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48456) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dyfmJ-0005DH-Il; Sun, 01 Oct 2017 11:03:35 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4887 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dyfmH-0008HF-SE; Sun, 01 Oct 2017 11:03:35 -0400 Date: Sun, 01 Oct 2017 18:03:26 +0300 Message-Id: <83zi9a3o75.fsf@gnu.org> From: Eli Zaretskii To: Alan Third In-reply-to: <20171001100801.GA33081@breton.holly.idiocy.org> (message from Alan Third on Sun, 1 Oct 2017 11:08:01 +0100) Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs References: <87efqri8x9.fsf@gmail.com> <20171001100801.GA33081@breton.holly.idiocy.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, agrambot@gmail.com 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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Sun, 1 Oct 2017 11:08:01 +0100 > From: Alan Third > Cc: 28630@debbugs.gnu.org > > I can reproduce this crash on GNU/Linux, but not when built --with-ns. AFAIR, the NS build uses a very different code for both input and thread switch. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 01 14:10:50 2017 Received: (at 28630) by debbugs.gnu.org; 1 Oct 2017 18:10:50 +0000 Received: from localhost ([127.0.0.1]:43090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyihW-00021p-3L for submit@debbugs.gnu.org; Sun, 01 Oct 2017 14:10:50 -0400 Received: from mail-it0-f44.google.com ([209.85.214.44]:53325) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyihU-00021b-Nz for 28630@debbugs.gnu.org; Sun, 01 Oct 2017 14:10:49 -0400 Received: by mail-it0-f44.google.com with SMTP id 85so5020469ith.2 for <28630@debbugs.gnu.org>; Sun, 01 Oct 2017 11:10:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=3SjaknrxJbvIKO6ddF2qMxpyQfuiPBlhPgTizmmmnug=; b=Qk+E7YFSgCPJ3pTJKHRBSav6v6cBG2TFEgtNC4ZUTFYPTVE/RvwNHO4PZXmi2AHwMO bHt7CQB2+VsbKdXWb24ZQNgJK3/HThtmy9fjyzL9QGYNtKSGTeztFxuKQ54icazTapb6 552AdH8EpMSQWyTcVgA/he7mSl3/jgIXTAvp3jeYqrmWTgoK2z+xxM0X2hsL9O98kLNl b4ycNunpok7v8HkT7GdlQJ9XJpWRb3rVPNtT0WpI6jLtNG2Z3/RZ0XLHUDcglxasw8lr GJOeE107PwsBpZ/voMXsaLC5kEA0HltrbGcDfoBUN8LB900PjdDMwvJQToFVg2U84UU5 ht3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=3SjaknrxJbvIKO6ddF2qMxpyQfuiPBlhPgTizmmmnug=; b=fOHYor3CauLWYkzgWNM/fPA/4P1sF/IaYftygoxC4pnltP8SllQR8gQvJsc+AfxlY9 /C7fF1kkQsSN2XNDWdJouU4rbvHokgb5Hxdx3SNe9tB3goTbhACSxhDrRVbpl0XbhfXP tS7oqO7XInKMa5iHTHA84O4zRpCU8rlqLl+hQiqAJnybbqJ1moClT4vNXnowOy+05s75 gOSAx2608JHN1YHfnzXZhbCKuUqzKY87MG8d1O6e14Nma7bSYwvmGHJjcShDdeHdXCOz R7SfNSUJSFhg/J50/nlXm4D27J3IOEYpgGiSCzpQ5qpDRF3zS+GVEBBM7Y4FImr1PlCM 0lQQ== X-Gm-Message-State: AMCzsaX6LeWlNe++jXymWDRg3/hzsxRIyLdXM6KKPqlFbDztooa5Ruj0 4KQdqF3sq9x22tBLTx33wDg= X-Google-Smtp-Source: AOwi7QD0gjWfcb62cuZWJnm/V6fAZs1YdNXbqGSrCT2HxfcxA92wfD+N1DS0A0S66UPjqgMUHq02Ow== X-Received: by 10.36.196.84 with SMTP id v81mr15515927itf.142.1506881443184; Sun, 01 Oct 2017 11:10:43 -0700 (PDT) Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id n4sm3923658ioe.71.2017.10.01.11.10.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 01 Oct 2017 11:10:42 -0700 (PDT) From: Alex To: Eli Zaretskii Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> Date: Sun, 01 Oct 2017 12:10:40 -0600 In-Reply-To: <831smm52v4.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 01 Oct 2017 18:01:19 +0300") Message-ID: <87d166rb6n.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com 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.5 (/) Eli Zaretskii writes: >> From: Alex >> Cc: eliz@gnu.org, Tom Tromey >> Date: Sat, 30 Sep 2017 21:18:08 -0600 >> >> Should this be labelled a blocker for Emacs 26? > > Maybe I'm not sure. It doesn't sound like threads are used much, if > at all, which would make blocking on it silly. It's understandable that bug 25214 isn't a blocker for this reason, but I think crashing is severe enough to be a blocker, especially since it's somewhat trivial to trigger. >> Also, replacing (sit-for 2) with (read-char) or its family and hitting >> C-g will also crash Emacs. > > Is your Emacs built with --enable-checking? Because I get an > assertion violation in that case, not a crash. I just tried building with "./configure --enable-checking" and it still crashes for me. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 01 14:33:16 2017 Received: (at 28630) by debbugs.gnu.org; 1 Oct 2017 18:33:16 +0000 Received: from localhost ([127.0.0.1]:43104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyj3E-0002dx-GX for submit@debbugs.gnu.org; Sun, 01 Oct 2017 14:33:16 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34555) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyj3C-0002dh-Dj for 28630@debbugs.gnu.org; Sun, 01 Oct 2017 14:33:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dyj33-0001Uc-NC for 28630@debbugs.gnu.org; Sun, 01 Oct 2017 14:33:09 -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.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46316) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dyj2X-00018P-RG; Sun, 01 Oct 2017 14:32:33 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1094 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dyj2V-00072A-2A; Sun, 01 Oct 2017 14:32:33 -0400 Date: Sun, 01 Oct 2017 21:32:22 +0300 Message-Id: <83o9pq3eix.fsf@gnu.org> From: Eli Zaretskii To: Alex In-reply-to: <87d166rb6n.fsf@gmail.com> (message from Alex on Sun, 01 Oct 2017 12:10:40 -0600) Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com 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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Alex > Cc: 28630@debbugs.gnu.org, tom@tromey.com > Date: Sun, 01 Oct 2017 12:10:40 -0600 > > >> Should this be labelled a blocker for Emacs 26? > > > > Maybe I'm not sure. It doesn't sound like threads are used much, if > > at all, which would make blocking on it silly. > > It's understandable that bug 25214 isn't a blocker for this reason, but > I think crashing is severe enough to be a blocker, especially since it's > somewhat trivial to trigger. If this trigger never happens in real life, why should we block on it? More generally, if no one besides my sorry self is interested in using this feature, let alone fixing its bugs, maybe we should simply remove it from Emacs. > > Is your Emacs built with --enable-checking? Because I get an > > assertion violation in that case, not a crash. > > I just tried building with "./configure --enable-checking" and it still > crashes for me. Strange, that's not what I see. I hope to have some time soon to look into this. I think I understand the root cause: we are longjmp-ing in a thread other than the one which called setjmp. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 02 00:30:50 2017 Received: (at 28630) by debbugs.gnu.org; 2 Oct 2017 04:30:50 +0000 Received: from localhost ([127.0.0.1]:43293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dysNV-00058W-SD for submit@debbugs.gnu.org; Mon, 02 Oct 2017 00:30:50 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:55948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dysNU-00058M-3n for 28630@debbugs.gnu.org; Mon, 02 Oct 2017 00:30:48 -0400 Received: from fermat1.math.s.chiba-u.ac.jp (fermat [192.168.32.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 8D8CBF08E5; Mon, 2 Oct 2017 13:30:44 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) Date: Mon, 02 Oct 2017 13:30:44 +0900 Message-ID: From: YAMAMOTO Mitsuharu To: Eli Zaretskii Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs In-Reply-To: <83o9pq3eix.fsf@gnu.org> References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com, Alex 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.0 (/) >>>>> On Sun, 01 Oct 2017 21:32:22 +0300, Eli Zaretskii said: > I hope to have some time soon to look into this. I think I > understand the root cause: we are longjmp-ing in a thread other than > the one which called setjmp. The secondary thread seems to be still blocking in a pselect call when crash occurs. Maybe SIGIO (and SIGALRM) should be unmasked in the secondary thread that calls pselect for keyboard input, and the main thread should forward the delivery of these signals to the secondary (or mask them) so that the pselect call in the secondary thread can be interrupted. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 02 01:11:51 2017 Received: (at submit) by debbugs.gnu.org; 2 Oct 2017 05:11:51 +0000 Received: from localhost ([127.0.0.1]:43305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyt1D-0006I4-Cb for submit@debbugs.gnu.org; Mon, 02 Oct 2017 01:11:51 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36141) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyt1B-0006Hi-QP for submit@debbugs.gnu.org; Mon, 02 Oct 2017 01:11:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dyt15-0004El-Qw for submit@debbugs.gnu.org; Mon, 02 Oct 2017 01:11:44 -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.0 required=5.0 tests=BAYES_40 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:38083) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dyt15-0004Eg-Nb for submit@debbugs.gnu.org; Mon, 02 Oct 2017 01:11:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55334) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dyt14-0001Jh-PP for bug-gnu-emacs@gnu.org; Mon, 02 Oct 2017 01:11:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dyt10-0004DK-M1 for bug-gnu-emacs@gnu.org; Mon, 02 Oct 2017 01:11:42 -0400 Received: from [195.159.176.226] (port=37303 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dyt10-0004Bs-FD for bug-gnu-emacs@gnu.org; Mon, 02 Oct 2017 01:11:38 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dyt0m-0005y1-2W for bug-gnu-emacs@gnu.org; Mon, 02 Oct 2017 07:11:24 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Eric Abrahamsen Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs Date: Sun, 01 Oct 2017 22:11:24 -0700 Lines: 23 Message-ID: <87a81a9ls3.fsf@ericabrahamsen.net> References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@blaine.gmane.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) Cancel-Lock: sha1:sQpuzhefoYJ6NnB/ASU5yydjKyA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) 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: -5.0 (-----) Eli Zaretskii writes: >> From: Alex >> Cc: 28630@debbugs.gnu.org, tom@tromey.com >> Date: Sun, 01 Oct 2017 12:10:40 -0600 >> >> >> Should this be labelled a blocker for Emacs 26? >> > >> > Maybe I'm not sure. It doesn't sound like threads are used much, if >> > at all, which would make blocking on it silly. >> >> It's understandable that bug 25214 isn't a blocker for this reason, but >> I think crashing is severe enough to be a blocker, especially since it's >> somewhat trivial to trigger. > > If this trigger never happens in real life, why should we block on it? > > More generally, if no one besides my sorry self is interested in using > this feature, let alone fixing its bugs, maybe we should simply remove > it from Emacs. Don't remove it! I am (extraordinarily slowly) working to make Gnus use threading. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 02 08:43:59 2017 Received: (at 28630) by debbugs.gnu.org; 2 Oct 2017 12:43:59 +0000 Received: from localhost ([127.0.0.1]:43516 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dz04l-0004ZK-B5 for submit@debbugs.gnu.org; Mon, 02 Oct 2017 08:43:59 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:55194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dz04i-0004ZA-QQ for 28630@debbugs.gnu.org; Mon, 02 Oct 2017 08:43:57 -0400 Received: from fermat1.math.s.chiba-u.ac.jp (fermat [192.168.32.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id EA3A0F08E5; Mon, 2 Oct 2017 21:43:52 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) Date: Mon, 02 Oct 2017 21:43:52 +0900 Message-ID: From: YAMAMOTO Mitsuharu To: Eli Zaretskii Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs In-Reply-To: References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com, Alex 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.0 (/) >>>>> On Mon, 02 Oct 2017 13:30:44 +0900, YAMAMOTO Mitsuharu said: > The secondary thread seems to be still blocking in a pselect call > when crash occurs. Maybe SIGIO (and SIGALRM) should be unmasked in > the secondary thread that calls pselect for keyboard input, and the > main thread should forward the delivery of these signals to the > secondary (or mask them) so that the pselect call in the secondary > thread can be interrupted. Sorry. The stacks seem to be already clobbered by (bad) longjmp. So the above analysis would be bogus. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 02 11:55:07 2017 Received: (at 28630) by debbugs.gnu.org; 2 Oct 2017 15:55:07 +0000 Received: from localhost ([127.0.0.1]:44355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dz33j-0004o7-AI for submit@debbugs.gnu.org; Mon, 02 Oct 2017 11:55:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57007) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dz33f-0004nY-J6 for 28630@debbugs.gnu.org; Mon, 02 Oct 2017 11:55:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dz33V-0004xF-GZ for 28630@debbugs.gnu.org; Mon, 02 Oct 2017 11:54:58 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41772) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dz33V-0004x7-DS; Mon, 02 Oct 2017 11:54:53 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1981 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dz33U-000472-Mb; Mon, 02 Oct 2017 11:54:53 -0400 Date: Mon, 02 Oct 2017 18:54:36 +0300 Message-Id: <83infx35qb.fsf@gnu.org> From: Eli Zaretskii To: Eric Abrahamsen In-reply-to: <87a81a9ls3.fsf@ericabrahamsen.net> (message from Eric Abrahamsen on Sun, 01 Oct 2017 22:11:24 -0700) Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> <87a81a9ls3.fsf@ericabrahamsen.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28630 Cc: 28630@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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Eric Abrahamsen > Date: Sun, 01 Oct 2017 22:11:24 -0700 > > Don't remove it! I am (extraordinarily slowly) working to make Gnus use > threading. You've convinced me. (I'd really like to see a thread-using Gnus, and I'm sure so are people who actually use Gnus.) From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 02 12:09:59 2017 Received: (at 28630) by debbugs.gnu.org; 2 Oct 2017 16:09:59 +0000 Received: from localhost ([127.0.0.1]:44393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dz3I7-0005DC-Do for submit@debbugs.gnu.org; Mon, 02 Oct 2017 12:09:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35719) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dz3I6-0005D1-DN for 28630@debbugs.gnu.org; Mon, 02 Oct 2017 12:09:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dz3Hx-00028B-96 for 28630@debbugs.gnu.org; Mon, 02 Oct 2017 12:09:53 -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,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42151) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dz3HR-0001bO-F4; Mon, 02 Oct 2017 12:09:17 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2017 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dz3HQ-00051g-HX; Mon, 02 Oct 2017 12:09:17 -0400 Date: Mon, 02 Oct 2017 19:08:59 +0300 Message-Id: <838tgt352c.fsf@gnu.org> From: Eli Zaretskii To: YAMAMOTO Mitsuharu In-reply-to: (message from YAMAMOTO Mitsuharu on Mon, 02 Oct 2017 21:43:52 +0900) Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com 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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Mon, 02 Oct 2017 21:43:52 +0900 > From: YAMAMOTO Mitsuharu > Cc: 28630@debbugs.gnu.org, > tom@tromey.com, > Alex > > Sorry. The stacks seem to be already clobbered by (bad) longjmp. So > the above analysis would be bogus. I think the second thread calls setjmp and clobbers the values set by the main thread, when the main thread called setjmp. We need to eliminate this possibility of threads stepping on each other's toes. Caveat: I didn't yet take a good look at the involved code, so what I say might make no sense. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 03 05:35:17 2017 Received: (at 28630) by debbugs.gnu.org; 3 Oct 2017 09:35:17 +0000 Received: from localhost ([127.0.0.1]:45191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzJbh-000190-1U for submit@debbugs.gnu.org; Tue, 03 Oct 2017 05:35:17 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:38238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzJbe-00018g-Tb for 28630@debbugs.gnu.org; Tue, 03 Oct 2017 05:35:15 -0400 Received: by mail-wm0-f66.google.com with SMTP id q124so5226225wmb.5 for <28630@debbugs.gnu.org>; Tue, 03 Oct 2017 02:35:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=V3+L2dRfotxtaRVJJy+bSuT3iS9uOckz+JSirsvR82Y=; b=eJrS2SmU7Kfh1CL6JDeCaUJkxK4hgNgBtdOBhkDVEzwf+x7xlAioeyaMZH/PfG2Fg9 Ag7tHQ1JYKta5zBVaCQLf0itZ9gA+BMZfkxBu2rdBbSbphG7XzhYgdbE1sU1ghx59N8h Lo0WLQH36BmdI18z2lSDcqQfa7A5HJq8gnqKruvG4rxK8uyEXKioswUUC/ndi2tv9vsP +t8FMEdgwEw5QEH2aZgrwbuJYAQ59oHkF4kSc4fegkLrM+W7PmpwPWART4TDtvBD0n4a /1BqDBwNV4cE+C5n30shDgLWPsVy1gt/Q8nUGdprRD5LwJD8rEnxPr//4WnrJ2sI5OFX YvHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=V3+L2dRfotxtaRVJJy+bSuT3iS9uOckz+JSirsvR82Y=; b=q+iJbXwzswfO2ARlpZj3c6f+9fLXbrMyeI4t6CeNSRuQS+0eAVr+Sf8fiFcYGgteDn 9FKUHbr+PDqmTX3jYsWqibDLP3phptDXHJpwWxXVJXAT3Lc6blrcpXwpfJqlUOXxz5Gm yy/pajQth3Ig9Gjh7Pa0L3lDCWFl76fYrWMUTOb+jijM7ypoRusPNP0+FqIRAWakPcEk G0DS/nICxHFLljhQkpOvtbyjXNHd6obEZiOIP4QNrLkIFJ3F34l6TAQFx12NDCXCYOXW qkxDqW7Q8cXncQVeyyzih7Gxl987tpGC4YbOYmF00dL9j24yCoLtkrr2qlX1Y4ugK+1e kBow== X-Gm-Message-State: AHPjjUhKCxau5IJxWxYeLTjM3X4s3TiSDtczSHlJcG+lci7xT4fD3IhZ EU1JVlvrZULkVq1AvDJKiJo= X-Google-Smtp-Source: AOwi7QDeDziRl/sVcX/zYTznAOQXXJl7psr7VFHP9yCUmOIjPTFp6TN9Rz/kHn60YLnTIvUVvvJiHA== X-Received: by 10.80.150.69 with SMTP id y63mr23735760eda.75.1507023309018; Tue, 03 Oct 2017 02:35:09 -0700 (PDT) Received: from [192.168.0.97] (catv-80-98-57-21.catv.broadband.hu. [80.98.57.21]) by smtp.googlemail.com with ESMTPSA id b3sm12073903edb.19.2017.10.03.02.35.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Oct 2017 02:35:07 -0700 (PDT) Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs To: Eli Zaretskii , Alex References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> From: Dmitry Gutov Message-ID: <90fb2a78-41da-6dfd-3d09-c436b143d979@yandex.ru> Date: Tue, 3 Oct 2017 11:35:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Thunderbird/56.0 MIME-Version: 1.0 In-Reply-To: <83o9pq3eix.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com 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.7 (/) On 10/1/17 8:32 PM, Eli Zaretskii wrote: > More generally, if no one besides my sorry self is interested in using > this feature, let alone fixing its bugs, maybe we should simply remove > it from Emacs. I'm also interested! Just slow. The core dev aside, the community would be disappointed, I'm sure. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 03 10:39:12 2017 Received: (at 28630) by debbugs.gnu.org; 3 Oct 2017 14:39:12 +0000 Received: from localhost ([127.0.0.1]:46456 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzOLo-0003J7-IB for submit@debbugs.gnu.org; Tue, 03 Oct 2017 10:39:12 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzOLm-0003Iu-9t for 28630@debbugs.gnu.org; Tue, 03 Oct 2017 10:39:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzOLc-0001Fd-PB for 28630@debbugs.gnu.org; Tue, 03 Oct 2017 10:39: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.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33922) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzOL4-00082v-No; Tue, 03 Oct 2017 10:38:26 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2777 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dzOL4-0004QR-5v; Tue, 03 Oct 2017 10:38:26 -0400 Date: Tue, 03 Oct 2017 17:38:10 +0300 Message-Id: <83mv581elp.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-reply-to: <90fb2a78-41da-6dfd-3d09-c436b143d979@yandex.ru> (message from Dmitry Gutov on Tue, 3 Oct 2017 11:35:04 +0200) Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> <90fb2a78-41da-6dfd-3d09-c436b143d979@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com 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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Cc: 28630@debbugs.gnu.org, tom@tromey.com > From: Dmitry Gutov > Date: Tue, 3 Oct 2017 11:35:04 +0200 > > The core dev aside, the community would be disappointed, I'm sure. Does anyone know of any packages out there which use this feature? Because if not, I'd have hard time understanding the disappointment. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 03 10:50:32 2017 Received: (at 28630) by debbugs.gnu.org; 3 Oct 2017 14:50:32 +0000 Received: from localhost ([127.0.0.1]:46475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzOWl-0005Sj-UH for submit@debbugs.gnu.org; Tue, 03 Oct 2017 10:50:32 -0400 Received: from mail-oi0-f50.google.com ([209.85.218.50]:54297) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzOWj-0005SS-Kj for 28630@debbugs.gnu.org; Tue, 03 Oct 2017 10:50:29 -0400 Received: by mail-oi0-f50.google.com with SMTP id u130so14694807oib.11 for <28630@debbugs.gnu.org>; Tue, 03 Oct 2017 07:50:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IsOq4BR0RkJpuW2vJ3yrnht6AIswTZkz881Cc2Y5BfU=; b=gedWx0s3j7u4LOg2UGQONjNOX/fZRMARa/7BKCs+DnqLPTacIExGa/QXHnki96tNkI dLglCIQDCFnRXxdG3188pxBUx1HoeOVblmYzVXktjYg6+tnaSUsfnIZDdXojANQYfIvH M5a6gy3xCWEIOc3C8EcqLDW/1qkkQ0adINjhfjT8biPJa7uelxAg9OQ2NHt6oT5VmQJ5 ez5teEfWrnoxNPXt649rk2N+KsvgFBN48V2TP8LjD12Udu2AvcEATF8SXV5Nj7J+M0KW GFRAkCQEEdvNpuLOOR7mktBAuu8His5yGJCuTKZlAqc2RWdMlMc4aAtlo4ncQtbYlXq4 JyXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IsOq4BR0RkJpuW2vJ3yrnht6AIswTZkz881Cc2Y5BfU=; b=Lpy7ZDx9NxBThCP8zAzpH/Y+eWKiqeJZ1FXpFUAXZChP2lU9XaS1FnhfdDRbZnVpfu 9UQE09XBHTtUjDGEzEU/78brWycv0LcncLM2Agpnjntld10OiEszF7KeeVAQ5PeGcAY6 uMm6hyMQvqCu4aKSszLSJ7/2fMDXJGWTRgh9BxHQlboUntT7hprKlzI9sUd1FcD9ED5e T+vPXr+v20X4rtrf2GAuM+10kT+EYsySjSx/WqU11futadA8cQJKgMMPzLZkZ24DAeQx Dp3ZUgfnbQJfyBLkSdq57Vp1fgS+oqxEHmQUT3J+E+1vBQizp4pb48WYNTQRDZJSBWlz CBmQ== X-Gm-Message-State: AMCzsaUkJppzoTyIYiGx6rqjOvGXxbk/5jNhHnEPilA38KmplYvsFSCI euXOEROne1gAuh8r3chcvxnIdgsMWo6g6Pnritc= X-Google-Smtp-Source: AOwi7QCbSRRo93A7WvjfE4AxSm9IMjlJZ3ch+T1v5tQNSr6leuRK5Kkk25JT/UxHtgyMen3sB0i297Eg9xz42v7InpA= X-Received: by 10.202.206.207 with SMTP id e198mr3053455oig.150.1507042223950; Tue, 03 Oct 2017 07:50:23 -0700 (PDT) MIME-Version: 1.0 References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> <90fb2a78-41da-6dfd-3d09-c436b143d979@yandex.ru> <83mv581elp.fsf@gnu.org> In-Reply-To: <83mv581elp.fsf@gnu.org> From: Philipp Stephani Date: Tue, 03 Oct 2017 14:50:13 +0000 Message-ID: Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs To: Eli Zaretskii , Dmitry Gutov Content-Type: multipart/alternative; boundary="001a113ade5e6b91d9055aa59cff" X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com 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.7 (/) --001a113ade5e6b91d9055aa59cff Content-Type: text/plain; charset="UTF-8" Eli Zaretskii schrieb am Di., 3. Okt. 2017 um 16:40 Uhr: > > Cc: 28630@debbugs.gnu.org, tom@tromey.com > > From: Dmitry Gutov > > Date: Tue, 3 Oct 2017 11:35:04 +0200 > > > > The core dev aside, the community would be disappointed, I'm sure. > > Does anyone know of any packages out there which use this feature? > Because if not, I'd have hard time understanding the disappointment. > > > > Since no released version of Emacs has thread support, I'm not surprised that they aren't widely used yet. Let's wait a couple more years to gain some experience. --001a113ade5e6b91d9055aa59cff Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Eli Za= retskii <eliz@gnu.org> schrieb am= Di., 3. Okt. 2017 um 16:40=C2=A0Uhr:
> Cc: 2863= 0@debbugs.gnu.org, = tom@tromey.com
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Tue, 3 Oct 2017 11:35:04 +0200
>
> The core dev aside, the community would be disappointed, I'm sure.=

Does anyone know of any packages out there which use this feature?
Because if not, I'd have hard time understanding the disappointment.



Since no released version of Emacs has= thread support, I'm not surprised that they aren't widely used yet= . Let's wait a couple more years to gain some experience.=C2=A0
--001a113ade5e6b91d9055aa59cff-- From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 03 11:46:32 2017 Received: (at 28630) by debbugs.gnu.org; 3 Oct 2017 15:46:33 +0000 Received: from localhost ([127.0.0.1]:46574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzPOy-0006yK-MX for submit@debbugs.gnu.org; Tue, 03 Oct 2017 11:46:32 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35793) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzPOx-0006y7-Bd for 28630@debbugs.gnu.org; Tue, 03 Oct 2017 11:46:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzPOo-0003xA-7C for 28630@debbugs.gnu.org; Tue, 03 Oct 2017 11:46:26 -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.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35171) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzPOT-0003fh-J2; Tue, 03 Oct 2017 11:46:01 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2814 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dzPOT-0003Zs-13; Tue, 03 Oct 2017 11:46:01 -0400 Date: Tue, 03 Oct 2017 18:45:46 +0300 Message-Id: <838tgs1bh1.fsf@gnu.org> From: Eli Zaretskii To: Philipp Stephani In-reply-to: (message from Philipp Stephani on Tue, 03 Oct 2017 14:50:13 +0000) Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> <90fb2a78-41da-6dfd-3d09-c436b143d979@yandex.ru> <83mv581elp.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com, dgutov@yandex.ru 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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Philipp Stephani > Date: Tue, 03 Oct 2017 14:50:13 +0000 > Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com > > Does anyone know of any packages out there which use this feature? > Because if not, I'd have hard time understanding the disappointment. > > Since no released version of Emacs has thread support, I'm not surprised that they aren't widely used yet. Well, I am, because Reddit, for example, is full of people who say they use Emacs 26. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 03 12:23:18 2017 Received: (at 28630) by debbugs.gnu.org; 3 Oct 2017 16:23:18 +0000 Received: from localhost ([127.0.0.1]:46604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzPyY-0007u9-0Q for submit@debbugs.gnu.org; Tue, 03 Oct 2017 12:23:18 -0400 Received: from mail-oi0-f41.google.com ([209.85.218.41]:45214) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzPyS-0007tr-NU for 28630@debbugs.gnu.org; Tue, 03 Oct 2017 12:23:16 -0400 Received: by mail-oi0-f41.google.com with SMTP id f3so15218609oia.2 for <28630@debbugs.gnu.org>; Tue, 03 Oct 2017 09:23:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ujpjz11ldnn/AyERPHFBtfQbnjGjeqZo6VnPxM4q650=; b=ulzDg4dUxoSSL1LoHE0SRZG32s97i3wReySZ2urf6D8gXgRPrdnOKdppWtL6N7Bxw5 3wxsrQHXGt5mNNNbWUunKIvUOPOmyenmW5iybvAP6RAAA+AeOhD2HvZ/qPB3x/cYY0D2 ry7KhL0mijwG/0xs623vwVouKKt+7zKovaOzfV3qYa6fWv1k0I55MMWsPXZY+FMmR2eL /5kgrgGhIyFZx9Z6m7OOBQTKQm4jMGY8fPxKXOwyBwVZpp2fiSVt3bkkWVYjSA8Okgjo 1nZo++xqG3CZiVXWkH4o+y8JAzN0kgDKU8oSauUo0cSLbfuCbJULBqUGBnHIZYpfy/qX 744A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ujpjz11ldnn/AyERPHFBtfQbnjGjeqZo6VnPxM4q650=; b=BqZoJTjQ9UufC+lnPtcOESQPcW/qu9B3Um61OQfPimlgxHUK9SK4zPOc524TNcDn5G aqHXwjDyRfDDCYuuULqVEUFgNTxsflLacHUkPOGJEwqnzzyQ/cSeDbJPNSQbekeX3V3J WNwUifK3OXAh0gopJcQHg0aZIlzvzODgZTfc4YSzZeYNmtgeEdDknwCeVDCunYwFjEfa ac884llBjpVWBEctDTYZQtPbnmqyPy+3IIyTDmCph8gSnAuM6Oj2/YMVlIj6NY5cMw4N lVyTRBKQiRkKQRw5VZU2/znDFhoBA+90bvd6fo4TQMT5Y+dQcx3vt82Fx/H3QovMO79e HJ9g== X-Gm-Message-State: AMCzsaWsW42HsiSM64HDQC4EcgxTfLlsty4TkWaZnMiLNRY3Yf/uIEL0 Ez0OrEamUSOz5LNKD/aPm54xZzXmIQhu+0y1900= X-Google-Smtp-Source: AOwi7QBkF22bc7qPm2Phexyr3CrzYcY1n09PBOlThOozyVRtOz2B/PY+xExROpJUJZ54v16rUcabSBiWeCMbyGZGyf0= X-Received: by 10.157.41.36 with SMTP id d33mr10141241otb.61.1507047786922; Tue, 03 Oct 2017 09:23:06 -0700 (PDT) MIME-Version: 1.0 References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> <90fb2a78-41da-6dfd-3d09-c436b143d979@yandex.ru> <83mv581elp.fsf@gnu.org> <838tgs1bh1.fsf@gnu.org> In-Reply-To: <838tgs1bh1.fsf@gnu.org> From: Philipp Stephani Date: Tue, 03 Oct 2017 16:22:56 +0000 Message-ID: Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs To: Eli Zaretskii Content-Type: multipart/alternative; boundary="94eb2c04faa2ffc767055aa6e732" X-Spam-Score: 1.7 (+) 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 Zaretskii schrieb am Di., 3. Okt. 2017 um 17:46 Uhr: > > From: Philipp Stephani > > Date: Tue, 03 Oct 2017 14:50:13 +0000 > > Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com > > > > Does anyone know of any packages out there which use this feature? > > Because if not, I'd have hard time understanding the disappointment. > > > > Since no released version of Emacs has thread support, I'm not surprised > that they aren't widely used yet. > > Well, I am, because Reddit, for example, is full of people who say > they use Emacs 26. > [...] Content analysis details: (1.7 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: gnu.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.218.41 listed in list.dnswl.org] 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [209.85.218.41 listed in dnsbl.sorbs.net] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (p.stephani2[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (p.stephani2[at]gmail.com) 0.0 HTML_MESSAGE BODY: HTML included in message -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.218.41 listed in wl.mailspike.net] 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 1.0 FREEMAIL_REPLY From and body contain different freemails X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com, dgutov@yandex.ru 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.7 (/) --94eb2c04faa2ffc767055aa6e732 Content-Type: text/plain; charset="UTF-8" Eli Zaretskii schrieb am Di., 3. Okt. 2017 um 17:46 Uhr: > > From: Philipp Stephani > > Date: Tue, 03 Oct 2017 14:50:13 +0000 > > Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com > > > > Does anyone know of any packages out there which use this feature? > > Because if not, I'd have hard time understanding the disappointment. > > > > Since no released version of Emacs has thread support, I'm not surprised > that they aren't widely used yet. > > Well, I am, because Reddit, for example, is full of people who say > they use Emacs 26. > I guess there's a huge selection bias at play. Most users typically use whatever version their OS distributor provides, and that's often not even Emacs 25. Libraries tend to support 24.x as well, and therefore can't use threads until they drop compatibility with both 24.x and 25.x. --94eb2c04faa2ffc767055aa6e732 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Eli Za= retskii <eliz@gnu.org> schrieb am= Di., 3. Okt. 2017 um 17:46=C2=A0Uhr:
> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Tue, 03 Oct 2017 14:50:13 +0000
> Cc: 28630@d= ebbugs.gnu.org, tom= @tromey.com, ag= rambot@gmail.com
>
>=C2=A0 Does anyone know of any packages out there which use this featur= e?
>=C2=A0 Because if not, I'd have hard time understanding the disappo= intment.
>
> Since no released version of Emacs has thread support, I'm not sur= prised that they aren't widely used yet.

Well, I am, because Reddit, for example, is full of people who say
they use Emacs 26.

I guess there's = a huge selection bias at play. Most users typically use whatever version th= eir OS distributor provides, and that's often not even Emacs 25. Librar= ies tend to support 24.x as well, and therefore can't use threads until= they drop compatibility with both 24.x and 25.x.=C2=A0
--94eb2c04faa2ffc767055aa6e732-- From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 03 12:36:50 2017 Received: (at 28630) by debbugs.gnu.org; 3 Oct 2017 16:36:50 +0000 Received: from localhost ([127.0.0.1]:46633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzQBe-0008Gw-I2 for submit@debbugs.gnu.org; Tue, 03 Oct 2017 12:36:50 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50801) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzQBd-0008Gh-Ht for 28630@debbugs.gnu.org; Tue, 03 Oct 2017 12:36:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzQBV-0004nz-CF for 28630@debbugs.gnu.org; Tue, 03 Oct 2017 12:36:44 -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,RP_MATCHES_RCVD, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36317) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzQB3-0004Ms-Q8; Tue, 03 Oct 2017 12:36:13 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2973 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dzQB3-0001MG-32; Tue, 03 Oct 2017 12:36:13 -0400 Date: Tue, 03 Oct 2017 19:35:57 +0300 Message-Id: <833770195e.fsf@gnu.org> From: Eli Zaretskii To: Philipp Stephani In-reply-to: (message from Philipp Stephani on Tue, 03 Oct 2017 16:22:56 +0000) Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> <90fb2a78-41da-6dfd-3d09-c436b143d979@yandex.ru> <83mv581elp.fsf@gnu.org> <838tgs1bh1.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com, dgutov@yandex.ru 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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Philipp Stephani > Date: Tue, 03 Oct 2017 16:22:56 +0000 > Cc: dgutov@yandex.ru, 28630@debbugs.gnu.org, tom@tromey.com, > agrambot@gmail.com > > > Since no released version of Emacs has thread support, I'm not surprised that they aren't widely used > yet. > > Well, I am, because Reddit, for example, is full of people who say > they use Emacs 26. > > I guess there's a huge selection bias at play. Most users typically use whatever version their OS distributor > provides, and that's often not even Emacs 25. Libraries tend to support 24.x as well, and therefore can't use > threads until they drop compatibility with both 24.x and 25.x. We are talking about developers, not users. And newer versions can be supported by using the relevant version-comparison stuff. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 03 13:04:48 2017 Received: (at 28630) by debbugs.gnu.org; 3 Oct 2017 17:04:48 +0000 Received: from localhost ([127.0.0.1]:46661 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzQch-0000Xk-Oe for submit@debbugs.gnu.org; Tue, 03 Oct 2017 13:04:48 -0400 Received: from mail-oi0-f45.google.com ([209.85.218.45]:53156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzQce-0000XS-Kb for 28630@debbugs.gnu.org; Tue, 03 Oct 2017 13:04:46 -0400 Received: by mail-oi0-f45.google.com with SMTP id p126so15408682oih.9 for <28630@debbugs.gnu.org>; Tue, 03 Oct 2017 10:04:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6gpt315vuwun12jq8QzbnGi7xZ/epasTVEDYjuiQMUE=; b=rN2RJwJeWKmYVr4H+VWTk4s81Ya05oOflI4ox3Eu5ixGsSrFVnolFCCXtvsNfZQc3A /zcITTK0yWqOMT4IP6xZJYOTUnpYYI45jk49Khv7Bomup598JMAewoS45a/Fx4YXdyl/ ny9n7J37gE7Ao+S3HC3xdIUiFe91Ue3fAXZcwXMX/fsoQlI2f9cflxIVPKtKGr89VufJ cB01AwCPEx0erQX4qv4KBzpuOPoldEzMrSV0IABVzfa4h63qIf+2qGhDwFqk4JdN5Isa 9a7GbfSM/0K8qmwN2LbkFKFIKdr8UIwZ0LU/6pVYAkdFw+qW6WtyWJCKp754XFXHp3yL 1B1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6gpt315vuwun12jq8QzbnGi7xZ/epasTVEDYjuiQMUE=; b=aIJzhTl8N2dBOyXP0Vcvch77zOb1HE5AajeupDgcyHamlPqySRYMUNg+mGyeMyyHXN aci0cEY7xHpIuqAMR2e88ZvYHnEV+k4uL0s1tzYbdqrSwfRbbmoA2NBJaRWhYqH9IBkr tuUHjV+HqMWM1nMNqicT3wGPoJxzKweSoIgLJlo01T5jhRRC9lAmkj4tFvRVI51orI91 u19B1VyGkuJbsBqA/o6fjLptJ6Cmn2FerCvv1dh+Ajsh3YZspToc6PCyMz46diiJQEB7 6KT1PU5xQrwIwVbmx43/YG/5j0VBJ9XwOBh8jQayY20T6E3ZmK5VM15d3VE64cfZlzob uuTg== X-Gm-Message-State: AMCzsaVGpcyrIId10lhjY+eDbXkmiZ/DFgjoFKl+UdZXcHMpPYB213yJ +3+9t+nmy5LhJikjfC2kaizfHftTTPxAkqOmSRU= X-Google-Smtp-Source: AOwi7QBSEZsEtucU0QEr30GS8QFQ4+mBAC9/scgMlAYCK0F38fJd9ngkV5rRbuBtxjyxvJDfsZIh4NmbgCTh5SPcoBI= X-Received: by 10.157.68.38 with SMTP id u35mr5091684ote.415.1507050278944; Tue, 03 Oct 2017 10:04:38 -0700 (PDT) MIME-Version: 1.0 References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> <90fb2a78-41da-6dfd-3d09-c436b143d979@yandex.ru> <83mv581elp.fsf@gnu.org> <838tgs1bh1.fsf@gnu.org> <833770195e.fsf@gnu.org> In-Reply-To: <833770195e.fsf@gnu.org> From: Philipp Stephani Date: Tue, 03 Oct 2017 17:04:28 +0000 Message-ID: Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs To: Eli Zaretskii Content-Type: multipart/alternative; boundary="001a11489cf489041d055aa77c24" X-Spam-Score: 1.7 (+) 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 Zaretskii schrieb am Di., 3. Okt. 2017 um 18:37 Uhr: > > From: Philipp Stephani > > Date: Tue, 03 Oct 2017 16:22:56 +0000 > > Cc: dgutov@yandex.ru, 28630@debbugs.gnu.org, tom@tromey.com, > > agrambot@gmail.com > > > > > Since no released version of Emacs has thread support, I'm not > surprised that they aren't widely used > > yet. > > > > Well, I am, because Reddit, for example, is full of people who say > > they use Emacs 26. > > > > I guess there's a huge selection bias at play. Most users typically use > whatever version their OS distributor > > provides, and that's often not even Emacs 25. Libraries tend to support > 24.x as well, and therefore can't use > > threads until they drop compatibility with both 24.x and 25.x. > > We are talking about developers, not users. And newer versions can be > supported by using the relevant version-comparison stuff. > [...] Content analysis details: (1.7 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: tromey.com] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.218.45 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.218.45 listed in wl.mailspike.net] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (p.stephani2[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (p.stephani2[at]gmail.com) 0.0 HTML_MESSAGE BODY: HTML included in message 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [209.85.218.45 listed in dnsbl.sorbs.net] 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 1.0 FREEMAIL_REPLY From and body contain different freemails X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com, dgutov@yandex.ru 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.7 (/) --001a11489cf489041d055aa77c24 Content-Type: text/plain; charset="UTF-8" Eli Zaretskii schrieb am Di., 3. Okt. 2017 um 18:37 Uhr: > > From: Philipp Stephani > > Date: Tue, 03 Oct 2017 16:22:56 +0000 > > Cc: dgutov@yandex.ru, 28630@debbugs.gnu.org, tom@tromey.com, > > agrambot@gmail.com > > > > > Since no released version of Emacs has thread support, I'm not > surprised that they aren't widely used > > yet. > > > > Well, I am, because Reddit, for example, is full of people who say > > they use Emacs 26. > > > > I guess there's a huge selection bias at play. Most users typically use > whatever version their OS distributor > > provides, and that's often not even Emacs 25. Libraries tend to support > 24.x as well, and therefore can't use > > threads until they drop compatibility with both 24.x and 25.x. > > We are talking about developers, not users. And newer versions can be > supported by using the relevant version-comparison stuff. > Sure, but it's already a lot of work to use threads unconditionally, and they are a feature that can't be easily polyfilled. So I can understand that library developers are hesitant. --001a11489cf489041d055aa77c24 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Eli Za= retskii <eliz@gnu.org> schrieb am= Di., 3. Okt. 2017 um 18:37=C2=A0Uhr:
> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Tue, 03 Oct 2017 16:22:56 +0000
> Cc: dgutov@yande= x.ru, 28630@= debbugs.gnu.org, to= m@tromey.com,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0agrambot@gmail.com
>
>=C2=A0 > Since no released version of Emacs has thread support, I= 9;m not surprised that they aren't widely used
>=C2=A0 yet.
>
>=C2=A0 Well, I am, because Reddit, for example, is full of people who s= ay
>=C2=A0 they use Emacs 26.
>
> I guess there's a huge selection bias at play. Most users typicall= y use whatever version their OS distributor
> provides, and that's often not even Emacs 25. Libraries tend to su= pport 24.x as well, and therefore can't use
> threads until they drop compatibility with both 24.x and 25.x.

We are talking about developers, not users.=C2=A0 And newer versions can be=
supported by using the relevant version-comparison stuff.
<= div>
Sure, but it's already a lot of work to use threads = unconditionally, and they are a feature that can't be easily polyfilled= . So I can understand that library developers are hesitant.=C2=A0
--001a11489cf489041d055aa77c24-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 04 03:39:32 2017 Received: (at 28630) by debbugs.gnu.org; 4 Oct 2017 07:39:32 +0000 Received: from localhost ([127.0.0.1]:47393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzeHE-0002FK-2b for submit@debbugs.gnu.org; Wed, 04 Oct 2017 03:39:32 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:52715) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzeHC-0002F9-0R for 28630@debbugs.gnu.org; Wed, 04 Oct 2017 03:39:30 -0400 Received: from fermat1.math.s.chiba-u.ac.jp (fermat [192.168.32.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 30B31F08F4; Wed, 4 Oct 2017 16:39:27 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) Date: Wed, 04 Oct 2017 16:39:27 +0900 Message-ID: From: YAMAMOTO Mitsuharu To: Eli Zaretskii Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs In-Reply-To: <838tgt352c.fsf@gnu.org> References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> <838tgt352c.fsf@gnu.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com 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.0 (/) >>>>> On Mon, 02 Oct 2017 19:08:59 +0300, Eli Zaretskii said: > I think the second thread calls setjmp and clobbers the values set > by the main thread, when the main thread called setjmp. We need to > eliminate this possibility of threads stepping on each other's toes. Make the global variable `getcjmp' thread-local? YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp diff --git a/src/keyboard.c b/src/keyboard.c index e8701b8870..42d51a2ee8 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -145,10 +145,6 @@ static Lisp_Object recover_top_level_message; /* Message normally displayed by Vtop_level. */ static Lisp_Object regular_top_level_message; -/* For longjmp to where kbd input is being done. */ - -static sys_jmp_buf getcjmp; - /* True while displaying for echoing. Delays C-g throwing. */ static bool echoing; @@ -3325,13 +3321,13 @@ record_char (Lisp_Object c) static void save_getcjmp (sys_jmp_buf temp) { - memcpy (temp, getcjmp, sizeof getcjmp); + memcpy (temp, current_thread->getcjmp, sizeof current_thread->getcjmp); } static void restore_getcjmp (sys_jmp_buf temp) { - memcpy (getcjmp, temp, sizeof getcjmp); + memcpy (current_thread->getcjmp, temp, sizeof current_thread->getcjmp); } /* Low level keyboard/mouse input. @@ -10534,7 +10530,7 @@ quit_throw_to_read_char (bool from_signal) do_switch_frame (make_lispy_switch_frame (internal_last_event_frame), 0, 0, Qnil); - sys_longjmp (getcjmp, 1); + sys_longjmp (current_thread->getcjmp, 1); } DEFUN ("set-input-interrupt-mode", Fset_input_interrupt_mode, diff --git a/src/lisp.h b/src/lisp.h index 680c25d4c4..ed2423596e 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1865,8 +1865,6 @@ verify (offsetof (struct Lisp_Sub_Char_Table, contents) == (offsetof (struct Lisp_Vector, contents) + SUB_CHAR_TABLE_OFFSET * sizeof (Lisp_Object))); -#include "thread.h" - /*********************************************************************** Symbols ***********************************************************************/ @@ -3096,6 +3094,8 @@ union specbinding } bt; }; +#include "thread.h" + /* These 3 are defined as macros in thread.h. */ /* extern union specbinding *specpdl; */ /* extern union specbinding *specpdl_ptr; */ diff --git a/src/thread.h b/src/thread.h index 7fce8674f0..125ca23b55 100644 --- a/src/thread.h +++ b/src/thread.h @@ -177,6 +177,9 @@ struct thread_state It must do so ASAP. */ int not_holding_lock; + /* For longjmp to where kbd input is being done. */ + sys_jmp_buf getcjmp; + /* Threads are kept on a linked list. */ struct thread_state *next_thread; }; From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 04 03:39:54 2017 Received: (at 28630) by debbugs.gnu.org; 4 Oct 2017 07:39:54 +0000 Received: from localhost ([127.0.0.1]:47396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzeHa-0002G2-Bf for submit@debbugs.gnu.org; Wed, 04 Oct 2017 03:39:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42977) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzeHY-0002Fp-CM for 28630@debbugs.gnu.org; Wed, 04 Oct 2017 03:39:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzeHP-00048g-7T for 28630@debbugs.gnu.org; Wed, 04 Oct 2017 03:39:47 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51250) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzeH1-0003t4-GP; Wed, 04 Oct 2017 03:39:19 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3703 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dzeH0-0007xD-SG; Wed, 04 Oct 2017 03:39:19 -0400 Date: Wed, 04 Oct 2017 10:39:05 +0300 Message-Id: <83fuazz7ja.fsf@gnu.org> From: Eli Zaretskii To: mituharu@math.s.chiba-u.ac.jp, agrambot@gmail.com In-reply-to: <838tgt352c.fsf@gnu.org> (message from Eli Zaretskii on Mon, 02 Oct 2017 19:08:59 +0300) Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> <838tgt352c.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com 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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Mon, 02 Oct 2017 19:08:59 +0300 > From: Eli Zaretskii > Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com > > I think the second thread calls setjmp and clobbers the values set by > the main thread, when the main thread called setjmp. That guess was correct. I hope I fixed this now, but please test this in a GUI session on X, as I couldn't test that configuration. If there are still crashes, please post a backtrace. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 04 03:49:27 2017 Received: (at 28630) by debbugs.gnu.org; 4 Oct 2017 07:49:27 +0000 Received: from localhost ([127.0.0.1]:47405 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzeQp-0002Vm-97 for submit@debbugs.gnu.org; Wed, 04 Oct 2017 03:49:27 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:52696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzeQm-0002Vd-S3 for 28630@debbugs.gnu.org; Wed, 04 Oct 2017 03:49:25 -0400 Received: from fermat1.math.s.chiba-u.ac.jp (fermat [192.168.32.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 8023AF08F4; Wed, 4 Oct 2017 16:49:22 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) Date: Wed, 04 Oct 2017 16:49:22 +0900 Message-ID: From: YAMAMOTO Mitsuharu To: Eli Zaretskii Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs In-Reply-To: <83fuazz7ja.fsf@gnu.org> References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> <838tgt352c.fsf@gnu.org> <83fuazz7ja.fsf@gnu.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com 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.0 (/) >>>>> On Wed, 04 Oct 2017 10:39:05 +0300, Eli Zaretskii said: >> I think the second thread calls setjmp and clobbers the values set >> by the main thread, when the main thread called setjmp. > That guess was correct. > I hope I fixed this now, but please test this in a GUI session on X, > as I couldn't test that configuration. If there are still crashes, > please post a backtrace. My patch was a bit late :-) I confirmed the original test case no longer crashes with your patch on X11 (and also on my internal version of the Mac port for Emacs 26). Thanks. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 04 04:15:24 2017 Received: (at 28630) by debbugs.gnu.org; 4 Oct 2017 08:15:24 +0000 Received: from localhost ([127.0.0.1]:47439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzepw-0003Fk-8V for submit@debbugs.gnu.org; Wed, 04 Oct 2017 04:15:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50779) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzept-0003FY-LU for 28630@debbugs.gnu.org; Wed, 04 Oct 2017 04:15:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzepk-0004p3-5U for 28630@debbugs.gnu.org; Wed, 04 Oct 2017 04:15:16 -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,RP_MATCHES_RCVD, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzepF-0004Ap-6Q; Wed, 04 Oct 2017 04:14:41 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3719 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dzepE-00054O-33; Wed, 04 Oct 2017 04:14:40 -0400 Date: Wed, 04 Oct 2017 11:14:26 +0300 Message-Id: <83bmlnz5wd.fsf@gnu.org> From: Eli Zaretskii To: YAMAMOTO Mitsuharu In-reply-to: (message from YAMAMOTO Mitsuharu on Wed, 04 Oct 2017 16:39:27 +0900) Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> <838tgt352c.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com 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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Wed, 04 Oct 2017 16:39:27 +0900 > From: YAMAMOTO Mitsuharu > Cc: 28630@debbugs.gnu.org, > tom@tromey.com, > agrambot@gmail.com > > >>>>> On Mon, 02 Oct 2017 19:08:59 +0300, Eli Zaretskii said: > > > I think the second thread calls setjmp and clobbers the values set > > by the main thread, when the main thread called setjmp. We need to > > eliminate this possibility of threads stepping on each other's toes. > > Make the global variable `getcjmp' thread-local? That indeed was the central part of the solution I installed. But it isn't enough, because in a TTY session C-g triggers a SIGINT, which is delivered to the main thread. So we need also to make sure that when the signal handler calls quit_throw_to_read_char, current_thread points to main_thread, we have the global lock held by the main thread, and all our Lisp thread machinery is aware that it's the main thread that's running. Otherwise, we are asking for trouble. Note that this means the effect of C-g while I/O APIs are called from non-main threads is inherently unportable: the effect will be different in TTY and GUI sessions on Unix, and also on Windows (where there are no signals, and therefore the original recipe didn't crash at all, but instead interrupted the sit-for on the non-main thread and caused that thread's early demise). After the change, sit-for on non-main thread is effectively a sleep-for, at least on Unix TTY frames (and I think on GUI frames as well). But on MS-Windows and I think also NS it still works as sit-for on the non-main thread. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 04 04:17:43 2017 Received: (at 28630) by debbugs.gnu.org; 4 Oct 2017 08:17:44 +0000 Received: from localhost ([127.0.0.1]:47445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzesB-0003Jp-M9 for submit@debbugs.gnu.org; Wed, 04 Oct 2017 04:17:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzesA-0003Ja-4j for 28630@debbugs.gnu.org; Wed, 04 Oct 2017 04:17:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzes0-0007dU-Mc for 28630@debbugs.gnu.org; Wed, 04 Oct 2017 04:17:36 -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.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzerX-0006xJ-S9; Wed, 04 Oct 2017 04:17:03 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3723 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dzerX-0005Pt-9O; Wed, 04 Oct 2017 04:17:03 -0400 Date: Wed, 04 Oct 2017 11:16:50 +0300 Message-Id: <83a817z5sd.fsf@gnu.org> From: Eli Zaretskii To: YAMAMOTO Mitsuharu In-reply-to: (message from YAMAMOTO Mitsuharu on Wed, 04 Oct 2017 16:49:22 +0900) Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> <838tgt352c.fsf@gnu.org> <83fuazz7ja.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com 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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Wed, 04 Oct 2017 16:49:22 +0900 > From: YAMAMOTO Mitsuharu > Cc: agrambot@gmail.com, > 28630@debbugs.gnu.org, > tom@tromey.com > > I confirmed the original test case no longer crashes with your patch > on X11 (and also on my internal version of the Mac port for Emacs 26). > Thanks. Thanks for testing, I will close the bug. OOC, could you please see whether on X the sit-for call is interrupted or not? That is, do you see the "there" message after typing C-g? From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 04 04:32:47 2017 Received: (at 28630) by debbugs.gnu.org; 4 Oct 2017 08:32:47 +0000 Received: from localhost ([127.0.0.1]:47459 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzf6k-0003hm-8i for submit@debbugs.gnu.org; Wed, 04 Oct 2017 04:32:46 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:52640) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzf6h-0003hb-Kt for 28630@debbugs.gnu.org; Wed, 04 Oct 2017 04:32:44 -0400 Received: from fermat1.math.s.chiba-u.ac.jp (fermat [192.168.32.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id D6763F08F4; Wed, 4 Oct 2017 17:32:40 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) Date: Wed, 04 Oct 2017 17:32:40 +0900 Message-ID: From: YAMAMOTO Mitsuharu To: Eli Zaretskii Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs In-Reply-To: <83a817z5sd.fsf@gnu.org> References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> <838tgt352c.fsf@gnu.org> <83fuazz7ja.fsf@gnu.org> <83a817z5sd.fsf@gnu.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com 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.0 (/) >>>>> On Wed, 04 Oct 2017 11:16:50 +0300, Eli Zaretskii said: >> I confirmed the original test case no longer crashes with your >> patch on X11 (and also on my internal version of the Mac port for >> Emacs 26). Thanks. > Thanks for testing, I will close the bug. > OOC, could you please see whether on X the sit-for call is > interrupted or not? That is, do you see the "there" message after > typing C-g? Not interrupted (I see "there") on GTK+3, GTK+2, Athena, no toolkit, and (my internal version of) the Mac port. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 04 05:24:11 2017 Received: (at 28630-done) by debbugs.gnu.org; 4 Oct 2017 09:24:11 +0000 Received: from localhost ([127.0.0.1]:47517 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzfuV-00050F-Fr for submit@debbugs.gnu.org; Wed, 04 Oct 2017 05:24:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38957) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzfuT-000502-JG for 28630-done@debbugs.gnu.org; Wed, 04 Oct 2017 05:24:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzfuK-0007P2-Gi for 28630-done@debbugs.gnu.org; Wed, 04 Oct 2017 05:24:04 -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.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52623) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzftv-0006tS-IE; Wed, 04 Oct 2017 05:23:35 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4040 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dzfts-0007lR-I3; Wed, 04 Oct 2017 05:23:34 -0400 Date: Wed, 04 Oct 2017 12:23:19 +0300 Message-Id: <834lrfz2pk.fsf@gnu.org> From: Eli Zaretskii To: YAMAMOTO Mitsuharu In-reply-to: (message from YAMAMOTO Mitsuharu on Wed, 04 Oct 2017 17:32:40 +0900) Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> <838tgt352c.fsf@gnu.org> <83fuazz7ja.fsf@gnu.org> <83a817z5sd.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28630-done Cc: 28630-done@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com 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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Wed, 04 Oct 2017 17:32:40 +0900 > From: YAMAMOTO Mitsuharu > Cc: agrambot@gmail.com, > 28630@debbugs.gnu.org, > tom@tromey.com > > > OOC, could you please see whether on X the sit-for call is > > interrupted or not? That is, do you see the "there" message after > > typing C-g? > > Not interrupted (I see "there") on GTK+3, GTK+2, Athena, no toolkit, > and (my internal version of) the Mac port. That's what I thought should happen, thanks for confirming. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 04 23:27:35 2017 Received: (at 28630-done) by debbugs.gnu.org; 5 Oct 2017 03:27:35 +0000 Received: from localhost ([127.0.0.1]:49544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzwox-0007lf-1z for submit@debbugs.gnu.org; Wed, 04 Oct 2017 23:27:35 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:51420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzwou-0007lS-OE for 28630-done@debbugs.gnu.org; Wed, 04 Oct 2017 23:27:33 -0400 Received: from fermat1.math.s.chiba-u.ac.jp (fermat [192.168.32.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id D579BF08FB; Thu, 5 Oct 2017 12:27:28 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) Date: Thu, 05 Oct 2017 12:27:28 +0900 Message-ID: From: YAMAMOTO Mitsuharu To: Eli Zaretskii Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs In-Reply-To: <834lrfz2pk.fsf@gnu.org> References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> <838tgt352c.fsf@gnu.org> <83fuazz7ja.fsf@gnu.org> <83a817z5sd.fsf@gnu.org> <834lrfz2pk.fsf@gnu.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 28630-done Cc: 28630-done@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com 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.0 (/) >>>>> On Wed, 04 Oct 2017 12:23:19 +0300, Eli Zaretskii said: >> > OOC, could you please see whether on X the sit-for call is >> > interrupted or not? That is, do you see the "there" message >> > after typing C-g? >> >> Not interrupted (I see "there") on GTK+3, GTK+2, Athena, no >> toolkit, and (my internal version of) the Mac port. > That's what I thought should happen, thanks for confirming. Same for NS. Interestingly, some variants of the original recipe behave differently with respect to C-g depending on the toolkit. Example 1: (thread-join (make-thread (lambda () (message "hello") (sit-for 2) (message "there")))) Interrupted: GTK+, Athena, no toolkit, Mac Not interrupted: NS Example 2: (thread-join (make-thread (lambda () (message "hello") (sleep-for 2) (message "there")))) Interrupted: GTK+ Not interrupted: Athena, no toolkit, Mac, NS Probably it has something to do with xg_select. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 05 03:24:52 2017 Received: (at 28630) by debbugs.gnu.org; 5 Oct 2017 07:24:52 +0000 Received: from localhost ([127.0.0.1]:49634 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e00Wa-0005EC-GY for submit@debbugs.gnu.org; Thu, 05 Oct 2017 03:24:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e00WY-0005Dz-Nh for 28630@debbugs.gnu.org; Thu, 05 Oct 2017 03:24:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e00WO-0008Ce-AO for 28630@debbugs.gnu.org; Thu, 05 Oct 2017 03:24:43 -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.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44167) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e00W7-0007hA-He; Thu, 05 Oct 2017 03:24:23 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2600 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e00W6-0006iL-Px; Thu, 05 Oct 2017 03:24:23 -0400 Date: Thu, 05 Oct 2017 10:24:11 +0300 Message-Id: <83infuxdk4.fsf@gnu.org> From: Eli Zaretskii To: YAMAMOTO Mitsuharu In-reply-to: (message from YAMAMOTO Mitsuharu on Thu, 05 Oct 2017 12:27:28 +0900) Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> <838tgt352c.fsf@gnu.org> <83fuazz7ja.fsf@gnu.org> <83a817z5sd.fsf@gnu.org> <834lrfz2pk.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com 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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Thu, 05 Oct 2017 12:27:28 +0900 > From: YAMAMOTO Mitsuharu > Cc: agrambot@gmail.com, > 28630-done@debbugs.gnu.org, > tom@tromey.com > > >>>>> On Wed, 04 Oct 2017 12:23:19 +0300, Eli Zaretskii said: > > >> > OOC, could you please see whether on X the sit-for call is > >> > interrupted or not? That is, do you see the "there" message > >> > after typing C-g? > Same for NS. Interestingly, some variants of the original recipe > behave differently with respect to C-g depending on the toolkit. > > Example 1: > > (thread-join > (make-thread > (lambda () > (message "hello") > (sit-for 2) > (message "there")))) > > Interrupted: GTK+, Athena, no toolkit, Mac > Not interrupted: NS > > > Example 2: > > (thread-join > (make-thread > (lambda () > (message "hello") > (sleep-for 2) > (message "there")))) > > Interrupted: GTK+ > Not interrupted: Athena, no toolkit, Mac, NS For the record, on MS-Windows, both are interrupted. > Probably it has something to do with xg_select. Could be. The upshot of this is that doing keyboard I/O in non-main threads is inherently unportable. Should we mention this in the manual? From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 07 09:54:03 2017 Received: (at 28630) by debbugs.gnu.org; 7 Oct 2017 13:54:04 +0000 Received: from localhost ([127.0.0.1]:53845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0pYJ-0000uV-KP for submit@debbugs.gnu.org; Sat, 07 Oct 2017 09:54:03 -0400 Received: from mail-oi0-f46.google.com ([209.85.218.46]:46819) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0pYG-0000tm-7g for 28630@debbugs.gnu.org; Sat, 07 Oct 2017 09:54:01 -0400 Received: by mail-oi0-f46.google.com with SMTP id n82so26322796oig.3 for <28630@debbugs.gnu.org>; Sat, 07 Oct 2017 06:54:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lwENhnf75YKQjcKPRtKJzumycTxN3vnXs9CnDfaOAkU=; b=WfOtlEAnv7lQTKGxQj5QBXw7deFjC8pEDrKi1L4XJV7Aj7mBe7LAMpAldIiqAns8hd uXbtLmrWFWckR+e6uOEa8X3mK2eM29ZfLQRqfC+nY6Mu/V5pzWC8EI3RoXRQzNZ1zUEn GjwQOKOXdOAg411x/n4r4KBvTINhYrP6+mZK1s4mRh/DOVtlL905FUfUlzoHuoNmTpw0 OwXroxuMYV9L0HkbK6+CcTQRJ14PDMFh3Ua/ifBUVQYSknuhCyoG2hwrtg9arvUM5W5l nEKp0dHqzxj683R6If4pv17azRjwtHrB/5zPUQeROvQHUJraJIHfCYXFuvhNvdi/1dXS +VEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lwENhnf75YKQjcKPRtKJzumycTxN3vnXs9CnDfaOAkU=; b=EswVa35bb3a2RPjL3DgwMbUls3KnI42Zdutct8KPkTuxTIzsmHtrKqpi3RRSRubJP2 VTgMbjFVpuzdxGSoU0u5JnMgcCHeEU49ziS2AD180KpQrW3Nm/oX0nM3devBXOv5GKk0 7/L4LvXn8jlJQ7C9vOI7ZR0HpDoQNtbpFKLvLze/l1MynbXn9v/xp7o9YqVnP3lLiKEN gJYX6ZL6J3FDdtwrhIzK2TzSfLJLA08TRPpHjTZRitZoyKpnJzucArdTFZLyxJoTrG5Y 63nhgYkaHG3yV7lVky5/khi2ldUbKITDWLrgmaWRGsMI6ZN9a3cJ+6zCW2hN/ElD7lUj JQBw== X-Gm-Message-State: AMCzsaXPjOEPMGHKwVZksl0UUCtfje21R4rrtBWFrSmgArKCHcNTrcSm 1DMRN9fNt/maKBmJ6rAUGAJ9XeQk0A3KQKbTvgY= X-Google-Smtp-Source: AOwi7QC5sT79UvlCCqdzX4ScNpp0KoW0oor8RECjp4fZ4s/kJOnKAcBhlNuNbpIFNLewDiIpkU5djrzo3lkz48ydqus= X-Received: by 10.157.59.55 with SMTP id z52mr2797779otb.75.1507384434298; Sat, 07 Oct 2017 06:53:54 -0700 (PDT) MIME-Version: 1.0 References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> <838tgt352c.fsf@gnu.org> <83fuazz7ja.fsf@gnu.org> <83a817z5sd.fsf@gnu.org> <834lrfz2pk.fsf@gnu.org> <83infuxdk4.fsf@gnu.org> In-Reply-To: <83infuxdk4.fsf@gnu.org> From: Philipp Stephani Date: Sat, 07 Oct 2017 13:53:43 +0000 Message-ID: Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs To: Eli Zaretskii , YAMAMOTO Mitsuharu Content-Type: multipart/alternative; boundary="001a113779eabf1a8d055af549d5" X-Spam-Score: 1.7 (+) 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 Zaretskii schrieb am Do., 5. Okt. 2017 um 09:25 Uhr: > > Date: Thu, 05 Oct 2017 12:27:28 +0900 > > From: YAMAMOTO Mitsuharu > > Cc: agrambot@gmail.com, > > 28630-done@debbugs.gnu.org, > > tom@tromey.com > > > > >>>>> On Wed, 04 Oct 2017 12:23:19 +0300, Eli Zaretskii > said: > > > > >> > OOC, could you please see whether on X the sit-for call is > > >> > interrupted or not? That is, do you see the "there" message > > >> > after typing C-g? > > Same for NS. Interestingly, some variants of the original recipe > > behave differently with respect to C-g depending on the toolkit. > > > > Example 1: > > > > (thread-join > > (make-thread > > (lambda () > > (message "hello") > > (sit-for 2) > > (message "there")))) > > > > Interrupted: GTK+, Athena, no toolkit, Mac > > Not interrupted: NS > > > > > > Example 2: > > > > (thread-join > > (make-thread > > (lambda () > > (message "hello") > > (sleep-for 2) > > (message "there")))) > > > > Interrupted: GTK+ > > Not interrupted: Athena, no toolkit, Mac, NS > > For the record, on MS-Windows, both are interrupted. > > > Probably it has something to do with xg_select. > > Could be. > > The upshot of this is that doing keyboard I/O in non-main threads is > inherently unportable. Should we mention this in the manual? > > > > [...] Content analysis details: (1.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [209.85.218.46 listed in dnsbl.sorbs.net] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (p.stephani2[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (p.stephani2[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.218.46 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.218.46 listed in wl.mailspike.net] 0.0 HTML_MESSAGE BODY: HTML included in message 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 1.0 FREEMAIL_REPLY From and body contain different freemails X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com 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.7 (/) --001a113779eabf1a8d055af549d5 Content-Type: text/plain; charset="UTF-8" Eli Zaretskii schrieb am Do., 5. Okt. 2017 um 09:25 Uhr: > > Date: Thu, 05 Oct 2017 12:27:28 +0900 > > From: YAMAMOTO Mitsuharu > > Cc: agrambot@gmail.com, > > 28630-done@debbugs.gnu.org, > > tom@tromey.com > > > > >>>>> On Wed, 04 Oct 2017 12:23:19 +0300, Eli Zaretskii > said: > > > > >> > OOC, could you please see whether on X the sit-for call is > > >> > interrupted or not? That is, do you see the "there" message > > >> > after typing C-g? > > Same for NS. Interestingly, some variants of the original recipe > > behave differently with respect to C-g depending on the toolkit. > > > > Example 1: > > > > (thread-join > > (make-thread > > (lambda () > > (message "hello") > > (sit-for 2) > > (message "there")))) > > > > Interrupted: GTK+, Athena, no toolkit, Mac > > Not interrupted: NS > > > > > > Example 2: > > > > (thread-join > > (make-thread > > (lambda () > > (message "hello") > > (sleep-for 2) > > (message "there")))) > > > > Interrupted: GTK+ > > Not interrupted: Athena, no toolkit, Mac, NS > > For the record, on MS-Windows, both are interrupted. > > > Probably it has something to do with xg_select. > > Could be. > > The upshot of this is that doing keyboard I/O in non-main threads is > inherently unportable. Should we mention this in the manual? > > > > I'd rather see this as a bug and document it in etc/PROBLEMS. Also, if the behavior between main and non-main threads differ, there should probably a `in-main-thread-p' function. --001a113779eabf1a8d055af549d5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Eli Za= retskii <eliz@gnu.org> schrieb am= Do., 5. Okt. 2017 um 09:25=C2=A0Uhr:
> Date: Thu, 05 Oct 2017 12:27:28 +0900
> From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
> Cc: agrambot@g= mail.com,
>=C2=A0 =C2=A0 =C2=A0 =C2=A028630-done@debbugs.gnu.org,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0tom@tromey.com
>
> >>>>> On Wed, 04 Oct 2017 12:23:19 +0300, Eli Zaretskii= <eliz@gnu.org>= said:
>
> >> > OOC, could you please see whether on X the sit-for call = is
> >> > interrupted or not?=C2=A0 That is, do you see the "= there" message
> >> > after typing C-g?
> Same for NS.=C2=A0 Interestingly, some variants of the original recipe=
> behave differently with respect to C-g depending on the toolkit.
>
> Example 1:
>
> (thread-join
>=C2=A0 (make-thread
>=C2=A0 =C2=A0(lambda ()
>=C2=A0 =C2=A0 =C2=A0(message "hello")
>=C2=A0 =C2=A0 =C2=A0(sit-for 2)
>=C2=A0 =C2=A0 =C2=A0(message "there"))))
>
> Interrupted: GTK+, Athena, no toolkit, Mac
> Not interrupted: NS
>
>
> Example 2:
>
> (thread-join
>=C2=A0 (make-thread
>=C2=A0 =C2=A0(lambda ()
>=C2=A0 =C2=A0 =C2=A0(message "hello")
>=C2=A0 =C2=A0 =C2=A0(sleep-for 2)
>=C2=A0 =C2=A0 =C2=A0(message "there"))))
>
> Interrupted: GTK+
> Not interrupted: Athena, no toolkit, Mac, NS

For the record, on MS-Windows, both are interrupted.

> Probably it has something to do with xg_select.

Could be.

The upshot of this is that doing keyboard I/O in non-main threads is
inherently unportable.=C2=A0 Should we mention this in the manual?





I'd rather see this= as a bug and document it in etc/PROBLEMS.
Also, if the behavior = between main and non-main threads differ, there should probably a `in-main-= thread-p' function.=C2=A0
--001a113779eabf1a8d055af549d5-- From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 07 10:25:43 2017 Received: (at 28630) by debbugs.gnu.org; 7 Oct 2017 14:25:43 +0000 Received: from localhost ([127.0.0.1]:54822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0q2x-0001uy-Ks for submit@debbugs.gnu.org; Sat, 07 Oct 2017 10:25:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49011) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0q2w-0001um-DU for 28630@debbugs.gnu.org; Sat, 07 Oct 2017 10:25:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0q2m-0007DW-HK for 28630@debbugs.gnu.org; Sat, 07 Oct 2017 10:25:37 -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,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0q2L-0006rh-Vj; Sat, 07 Oct 2017 10:25:06 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2852 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e0q2L-0002Ug-B3; Sat, 07 Oct 2017 10:25:05 -0400 Date: Sat, 07 Oct 2017 17:24:59 +0300 Message-Id: <83mv53t4qs.fsf@gnu.org> From: Eli Zaretskii To: Philipp Stephani In-reply-to: (message from Philipp Stephani on Sat, 07 Oct 2017 13:53:43 +0000) Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> <838tgt352c.fsf@gnu.org> <83fuazz7ja.fsf@gnu.org> <83a817z5sd.fsf@gnu.org> <834lrfz2pk.fsf@gnu.org> <83infuxdk4.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com, mituharu@math.s.chiba-u.ac.jp 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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Philipp Stephani > Date: Sat, 07 Oct 2017 13:53:43 +0000 > Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com > > I'd rather see this as a bug and document it in etc/PROBLEMS. PROBLEMS is not about Emacs bugs, it's about bugs in other software that affect Emacs users and uses. Emacs bugs are "documented" in the bug tracker. In any case, this is not a bug, this is how the feature was designed and coded. It's just that the consequences of this design were not immediately apparent. > Also, if the behavior between main and non-main threads differ, there should probably a `in-main-thread-p' > function. I'd rather not add primitives before there are real-life applications that need them and can describe the needs and the requirements. (We have such a function on the C level, because it was actually needed.) From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 07 10:51:15 2017 Received: (at 28630) by debbugs.gnu.org; 7 Oct 2017 14:51:15 +0000 Received: from localhost ([127.0.0.1]:54829 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0qRe-0002Yf-Q6 for submit@debbugs.gnu.org; Sat, 07 Oct 2017 10:51:14 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0qRb-0002YR-QG for 28630@debbugs.gnu.org; Sat, 07 Oct 2017 10:51:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0qRS-0005nq-Iz for 28630@debbugs.gnu.org; Sat, 07 Oct 2017 10:51:06 -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.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48486) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0qR7-0005SN-Ey; Sat, 07 Oct 2017 10:50:41 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2859 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e0qR6-0004Qm-Lm; Sat, 07 Oct 2017 10:50:41 -0400 Date: Sat, 07 Oct 2017 17:50:33 +0300 Message-Id: <83lgknt3k6.fsf@gnu.org> From: Eli Zaretskii To: Eli Zaretskii In-reply-to: <83mv53t4qs.fsf@gnu.org> (message from Eli Zaretskii on Sat, 07 Oct 2017 17:24:59 +0300) Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> <838tgt352c.fsf@gnu.org> <83fuazz7ja.fsf@gnu.org> <83a817z5sd.fsf@gnu.org> <834lrfz2pk.fsf@gnu.org> <83infuxdk4.fsf@gnu.org> <83mv53t4qs.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28630 Cc: p.stephani2@gmail.com, tom@tromey.com, 28630@debbugs.gnu.org, agrambot@gmail.com 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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Sat, 07 Oct 2017 17:24:59 +0300 > From: Eli Zaretskii > Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com > > > Also, if the behavior between main and non-main threads differ, there should probably a `in-main-thread-p' > > function. > > I'd rather not add primitives before there are real-life applications > that need them and can describe the needs and the requirements. And, btw, I think you can already check whether the current thread is the main thread by using the existing primitive 'current-thread'. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 09 04:22:05 2017 Received: (at 28630) by debbugs.gnu.org; 9 Oct 2017 08:22:05 +0000 Received: from localhost ([127.0.0.1]:57092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1TK9-0007tO-0Y for submit@debbugs.gnu.org; Mon, 09 Oct 2017 04:22:05 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:61456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1TK6-0007st-TL for 28630@debbugs.gnu.org; Mon, 09 Oct 2017 04:22:03 -0400 Received: from fermat1.math.s.chiba-u.ac.jp (fermat [192.168.32.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id E743EF08E5; Mon, 9 Oct 2017 17:21:59 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) Date: Mon, 09 Oct 2017 17:21:59 +0900 Message-ID: From: YAMAMOTO Mitsuharu To: Eli Zaretskii Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs In-Reply-To: <83infuxdk4.fsf@gnu.org> References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> <838tgt352c.fsf@gnu.org> <83fuazz7ja.fsf@gnu.org> <83a817z5sd.fsf@gnu.org> <834lrfz2pk.fsf@gnu.org> <83infuxdk4.fsf@gnu.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Organization: Faculty of Science, Chiba University MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com, YAMAMOTO Mitsuharu 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.0 (/) >>>>> On Thu, 05 Oct 2017 10:24:11 +0300, Eli Zaretskii said: >> Interestingly, some variants of the original recipe behave >> differently with respect to C-g depending on the toolkit. > For the record, on MS-Windows, both are interrupted. I could make the Mac port interruptible also for Example 2 (with some delay because it uses polling with SIGALRM rather than SIGIO). I also confirmed that Motif behaved like Athena. Below is updated one: Example 1: (thread-join (make-thread (lambda () (message "hello") (sit-for 2) (message "there")))) Interrupted: GTK+, Athena, Motif, no toolkit, MS-Windows, Mac Not interrupted: NS Example 2: (thread-join (make-thread (lambda () (message "hello") (sleep-for 2) (message "there")))) Interrupted: GTK+, MS-Windows, Mac Not interrupted: Athena, Motif, no toolkit, NS > The upshot of this is that doing keyboard I/O in non-main threads is > inherently unportable. Should we mention this in the manual? In principle, the method I used for the Mac port is also applicable to X11 (but probably not for NS where secondary threads cannot read keyboard input). Each pselect call not involving keyboard input additionally monitors one side of a socket pair, and the SIGALRM handler writes to the other side. This way, a pselect call in a secondary thread is unblocked when the signal arrived, and then it tries to see if keyboard input is available when none of other threads is monitoring the keyboard input channel. An alternative way would be to forward the signal to all the Lisp threads. But it looked too much for many cases. Having said that, I don't think we need the change like this urgently. For now, we can see if the above method really works for more complicated situations using the Mac port. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 09 04:39:18 2017 Received: (at 28630) by debbugs.gnu.org; 9 Oct 2017 08:39:18 +0000 Received: from localhost ([127.0.0.1]:57123 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1Tan-0008MA-TX for submit@debbugs.gnu.org; Mon, 09 Oct 2017 04:39:18 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57154) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1Tam-0008Lx-8y for 28630@debbugs.gnu.org; Mon, 09 Oct 2017 04:39:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1Tad-0006WY-2f for 28630@debbugs.gnu.org; Mon, 09 Oct 2017 04:39:11 -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,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53657) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1TaF-0006Qw-Ix; Mon, 09 Oct 2017 04:38:43 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4801 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e1TaD-0006qB-MZ; Mon, 09 Oct 2017 04:38:42 -0400 Date: Mon, 09 Oct 2017 11:38:33 +0300 Message-Id: <838tgksol2.fsf@gnu.org> From: Eli Zaretskii To: YAMAMOTO Mitsuharu In-reply-to: (message from YAMAMOTO Mitsuharu on Mon, 09 Oct 2017 17:21:59 +0900) Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting crashes Emacs References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> <838tgt352c.fsf@gnu.org> <83fuazz7ja.fsf@gnu.org> <83a817z5sd.fsf@gnu.org> <834lrfz2pk.fsf@gnu.org> <83infuxdk4.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com 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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Mon, 09 Oct 2017 17:21:59 +0900 > From: YAMAMOTO Mitsuharu > Cc: YAMAMOTO Mitsuharu , agrambot@gmail.com, > 28630@debbugs.gnu.org, tom@tromey.com > > > For the record, on MS-Windows, both are interrupted. > > I could make the Mac port interruptible also for Example 2 (with some > delay because it uses polling with SIGALRM rather than SIGIO). I also > confirmed that Motif behaved like Athena. Below is updated one: Thanks, more commonality in behavior is good, I think. > In principle, the method I used for the Mac port is also applicable to > X11 (but probably not for NS where secondary threads cannot read > keyboard input). Each pselect call not involving keyboard input > additionally monitors one side of a socket pair, and the SIGALRM > handler writes to the other side. This way, a pselect call in a > secondary thread is unblocked when the signal arrived, and then it > tries to see if keyboard input is available when none of other threads > is monitoring the keyboard input channel. But the problematic part in these examples is that the main thread always waits for keyboard input, because the non-main thread starts running only when the main thread becomes idle, and becoming idle means calling pselect. And since the main thread is always the first one to call pselect, it is the thread which finds the keyboard descriptor unmonitored, and installs itself as its monitoring thread. So with your proposal, more often than not, the "none of other threads is monitoring the keyboard input channel" part will never be true, except for the main thread. Or am I missing something? > Having said that, I don't think we need the change like this urgently. > For now, we can see if the above method really works for more > complicated situations using the Mac port. I agree. So far, I've only seen toy programs, and it isn't clear to me how serious those problems are in real life. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 09 06:34:35 2017 Received: (at 28630) by debbugs.gnu.org; 9 Oct 2017 10:34:35 +0000 Received: from localhost ([127.0.0.1]:57164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1VON-0002pC-Es for submit@debbugs.gnu.org; Mon, 09 Oct 2017 06:34:35 -0400 Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:61277) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1VOJ-0002p0-GC for 28630@debbugs.gnu.org; Mon, 09 Oct 2017 06:34:32 -0400 Received: from weber.math.s.chiba-u.ac.jp (weber [192.168.32.4]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id AB7E1F08E5; Mon, 9 Oct 2017 19:34:28 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) Received: from 114.157.130.169 (SquirrelMail authenticated user mituharu) by weber.math.s.chiba-u.ac.jp with HTTP; Mon, 9 Oct 2017 19:34:28 +0900 Message-ID: In-Reply-To: <838tgksol2.fsf@gnu.org> References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> <838tgt352c.fsf@gnu.org> <83fuazz7ja.fsf@gnu.org> <83a817z5sd.fsf@gnu.org> <834lrfz2pk.fsf@gnu.org> <83infuxdk4.fsf@gnu.org> <838tgksol2.fsf@gnu.org> Date: Mon, 9 Oct 2017 19:34:28 +0900 Subject: Re: bug#28630: 27.0.50;C-g while a non-main thread is sitting crashes Emacs From: mituharu@math.s.chiba-u.ac.jp To: "Eli Zaretskii" User-Agent: SquirrelMail/1.4.22-5.el6 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-2022-jp Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com 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.0 (/) >> In principle, the method I used for the Mac port is also applicable to >> X11 (but probably not for NS where secondary threads cannot read >> keyboard input). Each pselect call not involving keyboard input >> additionally monitors one side of a socket pair, and the SIGALRM >> handler writes to the other side. This way, a pselect call in a >> secondary thread is unblocked when the signal arrived, and then it >> tries to see if keyboard input is available when none of other threads >> is monitoring the keyboard input channel. > > But the problematic part in these examples is that the main thread > always waits for keyboard input, because the non-main thread starts > running only when the main thread becomes idle, and becoming idle > means calling pselect. And since the main thread is always the first > one to call pselect, it is the thread which finds the keyboard > descriptor unmonitored, and installs itself as its monitoring thread. > > So with your proposal, more often than not, the "none of other threads > is monitoring the keyboard input channel" part will never be true, > except for the main thread. Or am I missing something? In both Examples, the main thread is not blocking at pselect, but thread-join (sys_cond_wait internally), i.e., without monitoring the keyboard descriptor. The secondary one is blocking at pselect in sit-for (Example 1) or sleep-for (Example 2). So "none of other threads is monitoring the keyboard input channel" part becomes true for the secondary thread after returning from pselect. In Example 2, no thread is monitoring the keyboard while the secondary thread is blocking at pselect, and that is why the Mac port could not be interrupted with C-g previously. I think this basically also applies to X11. For GTK+ cases, my guess is the additionally monitored descriptors obtained by g_main_context_query has something to do with its peculiar behavior. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 09 07:01:52 2017 Received: (at 28630) by debbugs.gnu.org; 9 Oct 2017 11:01:52 +0000 Received: from localhost ([127.0.0.1]:57184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1Vom-0003V0-Aa for submit@debbugs.gnu.org; Mon, 09 Oct 2017 07:01:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33586) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1Vok-0003Uo-QH for 28630@debbugs.gnu.org; Mon, 09 Oct 2017 07:01:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1Vob-0003Og-Bq for 28630@debbugs.gnu.org; Mon, 09 Oct 2017 07:01:45 -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.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55287) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1VoE-0003Et-5b; Mon, 09 Oct 2017 07:01:18 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4872 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e1VoC-0002PG-W9; Mon, 09 Oct 2017 07:01:17 -0400 Date: Mon, 09 Oct 2017 14:01:05 +0300 Message-Id: <834lr8shzi.fsf@gnu.org> From: Eli Zaretskii To: mituharu@math.s.chiba-u.ac.jp In-reply-to: (mituharu@math.s.chiba-u.ac.jp) Subject: Re: bug#28630: 27.0.50;C-g while a non-main thread is sitting crashes Emacs References: <87efqri8x9.fsf@gmail.com> <874lrjy2rz.fsf@gmail.com> <831smm52v4.fsf@gnu.org> <87d166rb6n.fsf@gmail.com> <83o9pq3eix.fsf@gnu.org> <838tgt352c.fsf@gnu.org> <83fuazz7ja.fsf@gnu.org> <83a817z5sd.fsf@gnu.org> <834lrfz2pk.fsf@gnu.org> <83infuxdk4.fsf@gnu.org> <838tgksol2.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28630 Cc: 28630@debbugs.gnu.org, tom@tromey.com, agrambot@gmail.com 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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Mon, 9 Oct 2017 19:34:28 +0900 > From: mituharu@math.s.chiba-u.ac.jp > Cc: agrambot@gmail.com, > 28630@debbugs.gnu.org, > tom@tromey.com > > In both Examples, the main thread is not blocking at pselect, but > thread-join (sys_cond_wait internally), i.e., without monitoring > the keyboard descriptor. The secondary one is blocking at pselect > in sit-for (Example 1) or sleep-for (Example 2). So "none of > other threads is monitoring the keyboard input channel" part > becomes true for the secondary thread after returning from > pselect. OK, with thread-join this is so. Sorry for missing that part. In any case, on TTY frames C-g triggers SIGINT, and we always deliver signals to the main thread. If we want to be able to handle keyboard input in non-main threads, we should change how signals are handled in Emacs. From unknown Sat Aug 16 13:40:47 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 06 Nov 2017 12:24:04 +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