From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#19983: 24.4; exit-emacs regression in 24.4? Date: Sun, 08 Mar 2015 18:14:17 +0200 Message-ID: <83d24jlb52.fsf@gnu.org> References: <87pp8rc9e5.fsf@gmail.com> <83egp6qef7.fsf@gnu.org> <87k2yrvea4.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1425831328 3181 80.91.229.3 (8 Mar 2015 16:15:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 Mar 2015 16:15:28 +0000 (UTC) Cc: 19983@debbugs.gnu.org To: Sam Halliday Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Mar 08 17:15:15 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YUdrF-0001qp-10 for geb-bug-gnu-emacs@m.gmane.org; Sun, 08 Mar 2015 17:15:13 +0100 Original-Received: from localhost ([::1]:39605 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUdrE-0001cf-Dz for geb-bug-gnu-emacs@m.gmane.org; Sun, 08 Mar 2015 12:15:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54911) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUdrA-0001az-FQ for bug-gnu-emacs@gnu.org; Sun, 08 Mar 2015 12:15:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YUdr5-0004ec-El for bug-gnu-emacs@gnu.org; Sun, 08 Mar 2015 12:15:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUdr5-0004eK-B1 for bug-gnu-emacs@gnu.org; Sun, 08 Mar 2015 12:15:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YUdr4-0005a6-Qo for bug-gnu-emacs@gnu.org; Sun, 08 Mar 2015 12:15:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Mar 2015 16:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19983 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 19983-submit@debbugs.gnu.org id=B19983.142583128321412 (code B ref 19983); Sun, 08 Mar 2015 16:15:02 +0000 Original-Received: (at 19983) by debbugs.gnu.org; 8 Mar 2015 16:14:43 +0000 Original-Received: from localhost ([127.0.0.1]:39546 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YUdqk-0005ZI-Er for submit@debbugs.gnu.org; Sun, 08 Mar 2015 12:14:42 -0400 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:45018) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YUdqh-0005Z1-KR for 19983@debbugs.gnu.org; Sun, 08 Mar 2015 12:14:41 -0400 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NKW00M00I6ZQ900@mtaout25.012.net.il> for 19983@debbugs.gnu.org; Sun, 08 Mar 2015 18:09:16 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NKW00L6SI7GKA10@mtaout25.012.net.il>; Sun, 08 Mar 2015 18:09:16 +0200 (IST) In-reply-to: <87k2yrvea4.fsf@gmail.com> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:100270 Archived-At: Please always CC the bug address, so that this discussion gets recorded with the bug. > From: Sam Halliday > Date: Sun, 08 Mar 2015 12:56:19 +0000 > > > Can you please show a complete self-contained recipe for reproducing > > the problem, starting with "emacs -Q"? I couldn't find one in the URL > > you provide above; apologies if I missed something. > > > Yes, (our test suite intentionally creates a clean room), but apologies > in advance because this involves a lot of automatic downloading of Java > / Scala jars that will probably be completely irrelevant to you other > than this bug report. But I'll explain to you what is happening and how > to clean up afterwards. > > If you clone our repository > > git clone --depth 1 https://github.com/ensime/ensime-emacs > > you can run the tests with > > test/run_emacs_tests.sh > > That will create a clean-room emacs.d just for the tests and contact > MELPA to download our dependencies. > > HOWEVER, you will also need to have a working JDK and the `sbt` script > in your PATH. 1) Use your package manager to install something like > `openjdk-6-jdk` 2) obtain > https://github.com/paulp/sbt-extras/blob/master/sbt and place it on your > PATH. > > To explain: ENSIME is a bit like SLIME. There is a server component > which runs a Scala compiler in-process. Scala runs on the JVM and we > piggy-back off the SBT build tool for dependency management. Lots of > files are being downloaded and being placed into your `~/.ivy` and > `~/.sbt` folders as a result. For the typical Scala developer, this will > already have been populated because its part of their dev environment. > > When we run the tests in emacs 24.1, 24.2, 24.3 the tests exit 0. But > with 24.4 they exit 1 (despite us printing out on the screen "exiting > 0"). We have absolutely no idea what is going on, but it really feels > like a regression in emacs 24.4. We are primarily interested in a > workaround at this stage, but obviously if this is a bug in emacs > itself, I think we'd all like to see a fix. > > The code that is calling `kill-emacs` is here > https://github.com/ensime/ensime-emacs/blob/master/ensime-test.el#L402 > > If you'd like to continue discussing by email that is fine, but you'll > probably get a faster response on > https://github.com/ensime/ensime-server/issues/862 as I cannot access my > personal email from my work account. > > We really wish we had a more minimal test for you, but of course > anything involving `kill-emacs` works just fine in trivial scripts. I'm sorry, I cannot afford to re-create your environment on my system. I tried to simplify the situation as follows: The code around line 402 in the above repository is this: (progn (goto-char (point-max)) (let* ((status (if ensime--test-had-failures 1 0)) (msg (format "Finished suite with status %s." status))) (message msg) (when ensime--test-exit-on-finish (kill-emacs status)))) I emulated that with the following: emacs -batch --eval "(progn (let ((status 0)) (message \"Status %s\" status) (kill-emacs status)))" and emacs -batch --eval "(progn (let ((status 1)) (message \"Status %s\" status) (kill-emacs status)))" In both cases, I saw the message announcing the value of exit status, and Emacs exited exactly with the status I wanted it to. So I'm sorry to say that I couldn't reproduce the problem you are reporting. What I can suggest is run Emacs under a debugger, put a breakpoint in Fkill_emacs, and when it breaks, show what argument is received by that function. Another possibility is that this is a manifestation of Bug#19897 that was recently fixed on master. (But in that case, I cannot understand why you didn't see it in 24.3, since that bug was VERY old.