From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#11415: 24.1.50; Dbus hangs indefinitely during batch mode & daemon startup Date: Sun, 06 May 2012 12:59:54 +0200 Message-ID: <87d36hshg5.fsf@gmx.de> References: <4FA5A187.1010601@thompsonclan.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1336302074 1742 80.91.229.3 (6 May 2012 11:01:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 6 May 2012 11:01:14 +0000 (UTC) Cc: 11415@debbugs.gnu.org To: "Ryan C. Thompson" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 06 13:01:13 2012 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 1SQzDF-0005lP-8a for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 May 2012 13:01:13 +0200 Original-Received: from localhost ([::1]:34213 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQzDE-0005x4-NX for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 May 2012 07:01:12 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQzDB-0005rd-8o for bug-gnu-emacs@gnu.org; Sun, 06 May 2012 07:01:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQzD9-0003Gi-HX for bug-gnu-emacs@gnu.org; Sun, 06 May 2012 07:01:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQzD9-0003Ga-E9 for bug-gnu-emacs@gnu.org; Sun, 06 May 2012 07:01:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SQzEz-000441-J6 for bug-gnu-emacs@gnu.org; Sun, 06 May 2012 07:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 May 2012 11:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11415 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11415-submit@debbugs.gnu.org id=B11415.133630212315523 (code B ref 11415); Sun, 06 May 2012 11:03:01 +0000 Original-Received: (at 11415) by debbugs.gnu.org; 6 May 2012 11:02:03 +0000 Original-Received: from localhost ([127.0.0.1]:37884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SQzE1-000425-85 for submit@debbugs.gnu.org; Sun, 06 May 2012 07:02:03 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:42819) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SQzDx-00041l-RD for 11415@debbugs.gnu.org; Sun, 06 May 2012 07:02:00 -0400 Original-Received: (qmail invoked by alias); 06 May 2012 10:59:57 -0000 Original-Received: from p57BB9A1E.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.154.30] by mail.gmx.net (mp037) with SMTP; 06 May 2012 12:59:57 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1/1ClofMJv1aroHYAmjGf0Jgz/R0JpPRfX8BSyJGG Aanp+4x8w+45aZ In-Reply-To: <4FA5A187.1010601@thompsonclan.org> (Ryan C. Thompson's message of "Sat, 05 May 2012 14:54:15 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:59809 Archived-At: "Ryan C. Thompson" writes: > It seems that during the startup of any emacs without a terminal > (i.e. "--batch" or "--daemon"), recent emacs snapshots cannot make dbus > calls. Worse, any attempt to make a dbus call will hang > indefinitely. This stops me from being able to use some of my config in > emacs, since it is dbus based and cannot be loaded on startup in daemon > mode. > > Specifically, I can easily reproduce the bug like this: > > emacs-snapshot -Q --batch -l dbus --eval '(message > "DBus system names: %s" > (dbus-call-method :system dbus-service-dbus > dbus-path-dbus dbus-interface-dbus "ListNames"))' In Emacs 24.1.50, `dbus-call-method' changed from a synchronous call to an asynchronous one (see etc/NEWS). If Emacs runs in batch mode, it doesn't seem to read incoming events. Therefore, the return event of the call is not read. I will see what can be done. Either we must enable Emacs to receive some special input events also in batch mode. Or we must check inside `dbus-call-method', whether Emacs runs daemonized, and use the blocking call then. I would prefer the first alternative, because receiving D-Bus signals and running Emacs as D-Bus enabled server does not work either when Emacs does not accept incoming events. > There is no backtrace or anything, because the dbus call never > returns. In theory, it shall accept at least timeouts, like emacs -Q --daemon -l dbus --eval \ '(message "DBus system names: %s" \ (dbus-call-method \ :system dbus-service-dbus dbus-path-dbus dbus-interface-dbus \ "ListNames" :timeout 5000))' But it doesn't, which is another bug to be fixed. Best regards, Michael.