From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#39343: 27.0.50; Thrad signal crashes Emacs with sgmentation fault Date: Wed, 29 Jan 2020 20:42:34 +0000 Message-ID: <20200129204234.GB60190@breton.holly.idiocy.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="121704"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 39343@debbugs.gnu.org To: Christian Johansson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 29 21:43:14 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iwuB7-000VcQ-VZ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 29 Jan 2020 21:43:13 +0100 Original-Received: from localhost ([::1]:51152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwuB7-0004ap-0O for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 29 Jan 2020 15:43:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48908) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwuAx-0004ac-4b for bug-gnu-emacs@gnu.org; Wed, 29 Jan 2020 15:43:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iwuAw-0004Ie-3K for bug-gnu-emacs@gnu.org; Wed, 29 Jan 2020 15:43:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56873) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iwuAv-0004IH-Td for bug-gnu-emacs@gnu.org; Wed, 29 Jan 2020 15:43:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iwuAv-0005pa-Qc for bug-gnu-emacs@gnu.org; Wed, 29 Jan 2020 15:43:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Jan 2020 20:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39343 X-GNU-PR-Package: emacs Original-Received: via spool by 39343-submit@debbugs.gnu.org id=B39343.158033056822397 (code B ref 39343); Wed, 29 Jan 2020 20:43:01 +0000 Original-Received: (at 39343) by debbugs.gnu.org; 29 Jan 2020 20:42:48 +0000 Original-Received: from localhost ([127.0.0.1]:34613 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iwuAi-0005p9-9P for submit@debbugs.gnu.org; Wed, 29 Jan 2020 15:42:48 -0500 Original-Received: from mail-wm1-f52.google.com ([209.85.128.52]:54714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iwuAf-0005ot-B5 for 39343@debbugs.gnu.org; Wed, 29 Jan 2020 15:42:45 -0500 Original-Received: by mail-wm1-f52.google.com with SMTP id g1so1249160wmh.4 for <39343@debbugs.gnu.org>; Wed, 29 Jan 2020 12:42:45 -0800 (PST) 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:content-transfer-encoding:in-reply-to; bh=+i23xBhtRejMQ2GyUx84z1Xa2+xV128yhvmlV2EiZp8=; b=O2RR/ptfblHKTfi0A0MLvhIWs52zHK7GICuz2qbU2Uqr+fsyLzNyC9UTWyBwG7TOz3 AfUJ6y9RxADzjGKaPezaUZ2PvUNZjRLdSFdapX+sAtlYqK1drcLw6CHbEURYFP5y/md9 6YG9MkkkQetgcB087BvA+tMI74FOUsKNqmAy7/emDR1wUed6Ef1A9XBEK/NuqORQ62dP QKVhNqqCfY0/FFUhA5hN+ZisO45WrmnnlTWU/4gB2hVQdHJcL0KNJOE5ZoFqd1iVHp3n nYS49AZMVnBCvgE8t8fUTBr/6TLeWdsf/s4TWl3l9sKq4+wctCBrTp/Zew1nBPiZyNJN yZKg== 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 :content-transfer-encoding:in-reply-to; bh=+i23xBhtRejMQ2GyUx84z1Xa2+xV128yhvmlV2EiZp8=; b=esarlpLc8KxLlSZVysTqreUv729Wh8m0udZkdtD798lIkiLgu173+OM0wW/Pj46jOJ lzyUWNsUrWIXIcXGYQbMjU9ntkxQgjyXYR/iGUmtYYSkvGsLBS51uhUijWLB7Xv1Kdj3 TzF5Yk9eOKJqJDoeM/hNefKT0kCoVmhHQ1+c7GsflMxemuvNz9Q7qLzXAtzTvObK5UfG I1vMZMJ/Nd5BfSpMajf6GybMxLyEQgLN4rXClTu4O3n7wakckfdsAubf5+RMRz4Pirwq QNTTLLSnX1UDxfcAlO9vK5E0pDSiYyEA+EGSUWxPulh1MkgnpHkQ3Uhsz9WRxxABAppZ SJEw== X-Gm-Message-State: APjAAAUpNODUIQ3tZoTLw0/eplqLoa3HBo7QgeikB53Wa77Al5hxK/bo S8J0FMQ4uHo9HgD5cLFqyUo= X-Google-Smtp-Source: APXvYqzu/bwxLLrhGc2OMhTymwATIU8qElQ6FlnPMSBxmoHYpV8na5as7vj7KgO6IH7tIPAIVzw/kg== X-Received: by 2002:a05:600c:2c41:: with SMTP id r1mr986254wmg.57.1580330557346; Wed, 29 Jan 2020 12:42:37 -0800 (PST) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-a08b-b269-65be-dd6a.holly.idiocy.org. [2001:8b0:3f8:8129:a08b:b269:65be:dd6a]) by smtp.gmail.com with ESMTPSA id y7sm2152496wrr.56.2020.01.29.12.42.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jan 2020 12:42:36 -0800 (PST) Content-Disposition: inline In-Reply-To: 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:175407 Archived-At: On Wed, Jan 29, 2020 at 12:27:19PM +0100, Christian Johansson wrote: > Running following works on Linux but not on macOS. > > (let ((loop t) >       (iterations 1)) >   (while loop >     (make-thread >      (lambda() >        (message "Thread %d" iterations) >        (signal 'error (list "My error")))) >     (setq iterations (1+ iterations)))) > > Error in console: Fatal error 11: Segmentation faultAbort trap: 6 > > It seems to be some kind of issue with quitting threads on macOS which is > not present on Linux It’s a stack overflow caused by the main thread getting stuck in a loop processing calls to ns_send_appdefined which must be coming from the 2000‐odd threads the script starts. Presumably it’s the call to ns_run_loop_break in sys_cond_broadcast that’s doing it. I don’t think there’s really any way round this other than the massive rewrite the NS port needs to make it handle threads correctly. -- Alan Third