From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Charles A. Roelli" Newsgroups: gmane.emacs.bugs Subject: bug#25265: make-thread crashes in OS X 10.6 Date: Sun, 18 Jun 2017 15:05:04 +0200 Message-ID: References: <20170502204935.GA79100@breton.holly.idiocy.org> <20170613204643.GA98084@breton.holly.idiocy.org> <20170615190432.GA12317@breton.holly.idiocy.org> <20170616194531.GA27453@breton.holly.idiocy.org> <20170616205139.GA27574@breton.holly.idiocy.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1497791176 26096 195.159.176.226 (18 Jun 2017 13:06:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 18 Jun 2017 13:06:16 +0000 (UTC) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cc: 25265@debbugs.gnu.org To: Alan Third , Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 18 15:06:09 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1dMZu4-0006Lc-IX for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Jun 2017 15:06:08 +0200 Original-Received: from localhost ([::1]:38374 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMZu8-0002YY-86 for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Jun 2017 09:06:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMZu1-0002YR-Ei for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2017 09:06:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMZty-0003Qt-9K for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2017 09:06:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51401) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dMZty-0003Qp-3v for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2017 09:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dMZtx-0001bq-JP for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2017 09:06:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Charles A. Roelli" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Jun 2017 13:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25265 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25265-submit@debbugs.gnu.org id=B25265.14977911196131 (code B ref 25265); Sun, 18 Jun 2017 13:06:01 +0000 Original-Received: (at 25265) by debbugs.gnu.org; 18 Jun 2017 13:05:19 +0000 Original-Received: from localhost ([127.0.0.1]:54077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMZtH-0001ao-I7 for submit@debbugs.gnu.org; Sun, 18 Jun 2017 09:05:19 -0400 Original-Received: from sinyavsky.aurox.ch ([37.35.109.145]:44184) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMZtE-0001aW-JB for 25265@debbugs.gnu.org; Sun, 18 Jun 2017 09:05:18 -0400 Original-Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id A172C22479 for <25265@debbugs.gnu.org>; Sun, 18 Jun 2017 13:00:18 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= content-transfer-encoding:content-type:content-type:in-reply-to :mime-version:user-agent:date:date:message-id:from:from :references:to:subject:subject; s=dkim; t=1497790816; x= 1498654817; bh=QUNGcGY8+yu5Dz4KhwlSW7yEkg5PBzfDgMl3qMOsqiY=; b=B eQSUojmS/RpJDZm8v/c7MbvRut5yWF863Uu3af/aCHguvoUZOzInG0ys2/QVJwjD W5dCc9pW9ZxbBHui8ZYlnFWK/0X/GVKc+4LG/48cLU6xITC+KkkBxeYKekF+rRxt zRXr3ffUPUSo9DKyRey8rL1WwTc9S7i5vb1ikqQFvk= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Original-Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id TBp8mrDNhSPl for <25265@debbugs.gnu.org>; Sun, 18 Jun 2017 13:00:16 +0000 (UTC) Original-Received: from [192.168.1.121] (125.85.192.178.dynamic.wline.res.cust.swisscom.ch [178.192.85.125]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 51CA322457; Sun, 18 Jun 2017 13:00:16 +0000 (UTC) In-Reply-To: <20170616205139.GA27574@breton.holly.idiocy.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: 208.118.235.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:133725 Archived-At: The tests sometimes all pass with the updated patch, but then I got this once (the errors you've seen previously, I think): Selector: t Passed: 26 Failed: 2 (2 unexpected) Skipped: 0 Total: 28/28 Started at: 2017-06-18 14:54:43+0200 Finished. Finished at: 2017-06-18 14:54:47+0200 .F........F................. F thread-signal-early Test signaling a thread as soon as it is started by the OS. (ert-test-failed ((should-not (thread-alive-p thread)) :form (thread-alive-p #) :value t)) F threads-condvar-wait test waiting on conditional variable (ert-test-failed ((should (= (length (all-threads)) 1)) :form (= 2 1) :value nil)) from nextstep/Emacs.app/Contents/MacOS/Emacs -Q -l ert -l test/src/thread-tests.el I also tried this way of running the tests in batch mode: cd test && rm -rf src/thread-tests.log && make src/thread-tests.log but got a segfault: GEN src/thread-tests.log /bin/sh: line 1: 87214 Segmentation fault HOME=/nonexistent EMACSLOADPATH= LC_ALL=C EMACS_TEST_DIRECTORY=/Volumes/Toblerone/Code/emacs-devel/test "../src/emacs" -batch --no-site-file --no-site-lisp -L ":." -l ert -l src/thread-tests.el --eval "(ert-run-tests-batch-and-exit nil)" > src/thread-tests.log 2>&1 Running 28 tests (2017-06-18 15:00:03+0200) make: *** [src/thread-tests.log] Error 139 I'm not sure where the problem is happening (or if it's specific to NS). The file 'src/thread-tests.log' also doesn't give any extra information (besides 'Running 28 tests (2017-06-18 15:00:03+0200)'). On 16/06/2017 22:51, Alan Third wrote: > On Fri, Jun 16, 2017 at 04:05:58PM -0400, Noam Postavsky wrote: >> On Fri, Jun 16, 2017 at 3:45 PM, Alan Third wrote: >>> The first one looks like the thread’s starting too quick? >> I think it's rather failing to be killed by the `thread-signal' call. > Ah, yes. I completely misread the test. > >>> The second looks like the thread’s not dying quick enough? >> Same for that one. I don't know much about the thread internals, and >> even less macOS internals though... > Well, I’ve discovered that if I keep the mouse moving over the Emacs > frame while the tests are running then none of them fail, so I think > it’s something to do with ns_select jamming everything up for the > duration of its timeout. > > I could probably get round that by getting the thread to fire off an > NS app defined event when it dies. That would break ns_select out of > its event loop, presumably letting the dying thread actually die... > > Amazingly that seems to have worked! Updated patch attached.