From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Micha=C5=82?= Krzywkowski Newsgroups: gmane.emacs.bugs Subject: bug#37892: 27.0.50; Crash when signaling a thread Date: Sun, 27 Oct 2019 11:16:03 +0100 Message-ID: <878sp6wl24.fsf@gmail.com> References: <87zhhro0gt.fsf@gmail.com> <83sgnhw6xr.fsf@gnu.org> <87blu3lmfc.fsf@gmail.com> <8336ffvf1p.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="131755"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: mu4e 1.0; emacs 26.3.50 Cc: 37892@debbugs.gnu.org, =?UTF-8?Q?Micha=C5=82?= Krzywkowski To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 27 11:17:15 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iOfbm-000Y8h-Nn for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Oct 2019 11:17:14 +0100 Original-Received: from localhost ([::1]:44742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOfbl-0001V2-Js for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Oct 2019 06:17:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46471) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOfbc-0001IA-27 for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 06:17:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOfba-0004mg-QO for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 06:17:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:32890) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iOfba-0004mc-NV for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 06:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iOfba-0000cw-Gf for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 06:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Micha=C5=82?= Krzywkowski Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Oct 2019 10:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37892 X-GNU-PR-Package: emacs Original-Received: via spool by 37892-submit@debbugs.gnu.org id=B37892.15721713772345 (code B ref 37892); Sun, 27 Oct 2019 10:17:02 +0000 Original-Received: (at 37892) by debbugs.gnu.org; 27 Oct 2019 10:16:17 +0000 Original-Received: from localhost ([127.0.0.1]:41711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOfar-0000bk-5k for submit@debbugs.gnu.org; Sun, 27 Oct 2019 06:16:17 -0400 Original-Received: from mail-lf1-f48.google.com ([209.85.167.48]:36988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOfao-0000bW-3K for 37892@debbugs.gnu.org; Sun, 27 Oct 2019 06:16:14 -0400 Original-Received: by mail-lf1-f48.google.com with SMTP id b20so5574425lfp.4 for <37892@debbugs.gnu.org>; Sun, 27 Oct 2019 03:16:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=ULPOSIO8Pfwr4bIyitYU2rQB14Wkm7NTnAUCPdQigCs=; b=XscU3A8Wsqyw/6m0KCGulj7lQTvuvXE881VHTaG7/dJTwaKzR09tkuLW+46KI+jhcS L5j5IUw8FoRnRM+Hr6oLpVYcMKVWWD7FKiR+WhCWcc3ZAXL89nf80y1yTyUYuF7Qkh8c U2LW5us+IDvzyAwgHWGkKt7CAM2kV4F1ZjFOuVU6qCV+j4zia5mKwX9dEqF5vrcMOZFh veH+l/ZMsJKHY0OQE7QQnnl03X2wZ3YYqWf7/Xa6DJJzMR9OhSBKnNP90QboCtG2OrT9 +FtRIGOGfDyPlFHL3sacfWqzF7V+vOti3MKUXl6oEbx2/sIGIKJT0d+JIsle8M7enEWq hxlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=ULPOSIO8Pfwr4bIyitYU2rQB14Wkm7NTnAUCPdQigCs=; b=OLFK50Va4XYFuWZPNrtjJPwSPE/0HwBPlcuo1f5F6vckHtp3Hq4tX8p/lg93SK7wNX GFunWgwqfAlN9NfEkEUAZzp3wD9hd5xsUeM/j2R1agl8VMYeSiQRSMhKvCNxwyeZoEqb LubvV0DWWAjZgz8Xtk6CQX/QSAwuUTqfXYRCpLUOcGOlbCTMgP0Oe+skS77OyoFrjmtm 0xOWZzv6FM3HaVR6WONFpJQDHg4t01IQJrJfp7UeP8k9dwlZvLPFBulYm/Pzn2l8Nvfp nvjIolGNhVsM87q0T9JaycRRJEcoL2pfcUGEpoi1LVRP7wkgBMiXNYY/ySkymfhatTg0 HjyQ== X-Gm-Message-State: APjAAAUfBFU/pTkA85sFdS8Lpt2lzUz4QD76K+AFLxj+M2gREl0WJIwX l1ocBQwEZePWFu4rQiWpNaU58PLt X-Google-Smtp-Source: APXvYqyGo8nt1TA1jYpax/3B4LnkxzXIXBHcaIABw0YVBCp5qfD54PKv7y0/NfwbtPzZdBnjoaRozg== X-Received: by 2002:ac2:5df4:: with SMTP id z20mr1413863lfq.2.1572171367894; Sun, 27 Oct 2019 03:16:07 -0700 (PDT) Original-Received: from debian (89-65-39-79.dynamic.chello.pl. [89.65.39.79]) by smtp.gmail.com with ESMTPSA id 3sm3301032lfq.55.2019.10.27.03.16.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Oct 2019 03:16:07 -0700 (PDT) In-reply-to: <8336ffvf1p.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:170239 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >>>>> "Eli" =3D=3D Eli Zaretskii writes: Eli> Micha=C5=82, can you tell why you needed to call thread-signal whi= le the Eli> thread was in sit-for? >> >> I wanted to signal some background thread which was doing some work = and >> then Emacs crashed, because it just so happened that it was in sit-f= or. >> The thread function was doing _more_ than just sit-for. >> >> I actually don't care (and can't know) what another thread is doing,= I >> just want to send a signal to it. Eli> But thread-signal is not for causing an error in a thread, it is f= or Eli> unblocking a thread that waits on a mutex or a condvar. So why wo= uld Eli> you use it when the thread is not blocked? Then I think documentation for that function should be changed to explicitly say that the signal will *only* be delivered if the target thread is in a "blocked call to =E2=80=98mutex-lock=E2=80=99, =E2=80=98cond= ition-wait=E2=80=99, or =E2=80=98thread-join=E2=80=99". Currently, the docstring of thread-signal just says that the function will interrupt threads which are blocked, but does not actually say that the signal will be delivered only in those cases. In fact, it says that it works like signal, so I don't think it's unreasonable to assume that it will just interrupt a thread whatever it's doing. =2D- Micha=C5=82 Krzywkowski PGP: A5A7 06C4 28EF 8F64 2868 13A1 7BDE C129 F0B8 09A1 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEWxyvIOWnapfz9K2Z20CneWXMPiIFAl21bmMACgkQ20CneWXM PiJtPgf/X2KOEx4U/bvSJQ/OAQCNPA4A2MtfHdPSpypOkMXAedASTLKFEydDeAP4 rSU8/XG7G5SP8G09T6f69/vAYO/s+MacB+daIo0X2/p8oGtR+ScRhQ9Pt+hBBd5D /u39H6nfvoewc//fa1fbtD9StDxvqbe9rztrLLioIyZtRjXc1xDaq/KCLdF0xbym lOsDgNaCEywvbkXRB5dZIigBkvLTiS4xHhno2X39FBcqIYcKCtciCOUckQwjNX/V 1dlFa7EkTjdTwHyMmcr4iznpngaiAGm2pUZfS0/fU1q/OZgu588eSCfGqA4VA911 D0ZJEjQLBSBf4xYcVvWMzGtGmlcdxg== =5Xoh -----END PGP SIGNATURE----- --=-=-=--