From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Crashing the new thread code Date: Mon, 12 Dec 2016 19:11:17 +0200 Message-ID: <83a8c1cbt6.fsf@gnu.org> References: <87h96a2tyi.fsf@irif.fr> <83twaacii3.fsf@gnu.org> <87d1gy2mat.fsf@irif.fr> <83oa0hddb9.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1481566689 20032 195.159.176.226 (12 Dec 2016 18:18:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 12 Dec 2016 18:18:09 +0000 (UTC) Cc: jch@irif.fr, emacs-devel@gnu.org To: Noam Postavsky Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 12 19:18:01 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGVAn-0003aR-G6 for ged-emacs-devel@m.gmane.org; Mon, 12 Dec 2016 19:18:01 +0100 Original-Received: from localhost ([::1]:60815 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGVAq-0000pV-53 for ged-emacs-devel@m.gmane.org; Mon, 12 Dec 2016 13:18:04 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34672) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGU7g-0006C0-RB for emacs-devel@gnu.org; Mon, 12 Dec 2016 12:10:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGU7c-0001oT-QF for emacs-devel@gnu.org; Mon, 12 Dec 2016 12:10:44 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGU7c-0001oP-ME; Mon, 12 Dec 2016 12:10:40 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4731 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cGU7b-0004U5-Sk; Mon, 12 Dec 2016 12:10:40 -0500 In-reply-to: (message from Noam Postavsky on Sun, 11 Dec 2016 23:10:48 -0500) 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-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:210364 Archived-At: > From: Noam Postavsky > Date: Sun, 11 Dec 2016 23:10:48 -0500 > Cc: Juliusz Chroboczek , Emacs developers > > On Sun, Dec 11, 2016 at 10:41 PM, Eli Zaretskii wrote: > >> From: Noam Postavsky > >> Date: Sun, 11 Dec 2016 16:58:49 -0500 > >> Cc: Emacs developers , Eli Zaretskii > >> > >> >> What did you expect to happen? > >> > > >> > The thread queues the condition and continues spinning? > >> > >> I would expect the thread to receive the signal as soon as it starts > >> running again. > > > > What would be the indication of the thread receiving the signal? Both > > in general and specifically in Juliusz's snippet? > > In general, that any condition-case or unwind-protect forms should > run. Since Juliusz's snippet had no other signal catching constructs, > the signaled thread would just exit, I suppose. OK, this is how the latest master will behave. The original problem happened because the new thread was trying to signal itself before the signal handlers were set up, and actually before the thread function was even running. Thanks.