From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: trunk r116499: Improve dbus error handling; detect bus failure Date: Mon, 24 Feb 2014 09:54:45 +0100 Message-ID: <878ut0gaay.fsf@gmx.de> References: <87ha7ogbz8.fsf@gmx.de> <530B01C3.5010209@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1393232102 31456 80.91.229.3 (24 Feb 2014 08:55:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 24 Feb 2014 08:55:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 24 09:55:09 2014 Return-path: Envelope-to: ged-emacs-devel@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 1WHrJb-0003sq-2b for ged-emacs-devel@m.gmane.org; Mon, 24 Feb 2014 09:55:07 +0100 Original-Received: from localhost ([::1]:56367 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHrJa-0007w6-Kx for ged-emacs-devel@m.gmane.org; Mon, 24 Feb 2014 03:55:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44299) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHrJR-0007qL-Q3 for emacs-devel@gnu.org; Mon, 24 Feb 2014 03:55:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WHrJL-0004Kf-Em for emacs-devel@gnu.org; Mon, 24 Feb 2014 03:54:57 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:50754) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHrJL-0004KX-55 for emacs-devel@gnu.org; Mon, 24 Feb 2014 03:54:51 -0500 Original-Received: from detlef.gmx.de ([87.146.47.186]) by mail.gmx.com (mrgmx001) with ESMTPS (Nemesis) id 0MdKDb-1WYhjv1LGN-00IWIx for ; Mon, 24 Feb 2014 09:54:49 +0100 In-Reply-To: <530B01C3.5010209@dancol.org> (Daniel Colascione's message of "Mon, 24 Feb 2014 00:24:35 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Provags-ID: V03:K0:tS//VrVZai6PH/Pogep1HDX1F8fcNf0DjHaXIl3FAJcAJC3FSes 6roaUxh8U+31wW4ULwi/7/E8Fmc24iZO8GsczWntq2eDBdItXDWidRfTntMIZP+ba4j6RHy uJcVDIeoQsEXmYtadoFZyKgxVxzS/oyYvk6KTTSoH2fPT5fx2OSzh1oAhaVtBSrLRD6fd8U Ktt7r7QpFKJaEwpW9eBLg== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.15.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:169830 Archived-At: Daniel Colascione writes: >>> + (dbus-notice-synchronous-call-errors): New function. >>> + (dbus-handle-event): Raise errors directly only when `dbus-debug' >>> + is true, not all the time. >> >> Why that? You cannot assume that `dbus-event-error-functions' is non-nil >> (and contains `dbus-notice-synchronous-call-errors'). > > We still call dbus-event-error-functions. In fact, that's how error > propagation to synchronous calls works now. Yes, but you also silently assume that `dbus-notice-synchronous-call-errors' is called from there ... > First of all, before my change, the dbus could would just hang in > response to bus disconnects. Now calls terminate immediately with a > reasonable error. dbus disconnects the bus on certain usage > errors. Here is a call that results in an immediate bus disconnect: > > (dbus-call-method :session "org.freedesktop.secrets" > "/org/freedesktop/secrets/collection/login" > "org.freedesktop.Secret.Collection" "SearchItems" '(:array > (:dict-entry "host" ("xxxx" "xxxx")) (:dict-entry "port" "imaps"))) Wow, this is really strange. It's not obvious to me whether this is a D-Bus bug, or whether this is intended by the "org.freedesktop.secrets" daemon. Anyway, you are right, this must be catched. >> And *if* you are applying such changes, I would expect respective doc >> changes, for example explainig the (changed) structure of the values in >> `dbus-return-values-table', or mentioning >> `dbus-notice-synchronous-call-errors' and its intended use in dbus.texi. > > Neither of these symbols is public. The contractual behavior has not > changed. You have added `dbus-notice-synchronous-call-errors' to `dbus-event-error-functions'. This is a public change, and it deserves documentation. Furthermore, I had developers in mind when I've asked for doc enhancement. Even I, as the original writer of the code, need to consult the doc strings for hash table structures and alike. It would ease our life, if the doc is up-to-date and reasonable. Best regards, Michael.