Subject: dbus-call-method-non-blocking loops forever

From: Rob Browning <[email-masked]>
Date: Wed, 25 Sep 2013 12:52:11 -0500

[If possible, and appropriate, please preserve the -fowarded Cc in any replies.]

This issue was filed with the Debian bug tracker, and I was hoping to
get your opinion on the matter.

Please see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=698304 for
further information.

Camm Maguire <[email-masked]> writes:

> Version: 24.2+1-1
>
> dbus-call-method-non-blocking loops forever waiting for a dbus message
> that never arrives, unlike emacs23.
>
> When auctex is installed and a .bib file opened, for example, emacs24
> hangs until interrupted.  Here is the backtrace:
>
> =============================================================================
>   dbus-call-method-non-blocking(:session "org.gnome.evince.Daemon" "/org/gnome/evince/Daemon" "org.freedesktop.DBus.Introspectable" "Introspect")
>   byte-code(\20.\305\202	.\306	\n\f\307%\207" [noninteractive bus service path dbus-interface-introspectable dbus-call-method dbus-call-method-non-blocking "Introspect"] 6)
>   dbus-introspect(:session "org.gnome.evince.Daemon" "/org/gnome/evince/Daemon")
>   byte-code("\304\305!.q\210\306\216\307	\n#c\210\310ed\"+\207" [temp-buffer bus service path generate-new-buffer " *temp*" ((byte-code "\30!\203\n.\30!\210\301\207" [temp-buffer buffer-name kill-buffer] 2)) dbus-introspect xml-parse-region] 4)
>   dbus-introspect-xml(:session "org.gnome.evince.Daemon" "/org/gnome/evince/Daemon")
>   dbus-introspect-get-interface(:session "org.gnome.evince.Daemon" "/org/gnome/evince/Daemon" "org.gnome.evince.Daemon")
>   dbus-introspect-get-method(:session "org.gnome.evince.Daemon" "/org/gnome/evince/Daemon" "org.gnome.evince.Daemon" "FindDocument")
>   TeX-evince-dbus-p(:forward)
>   byte-code(\301=\20.\302\207\303\304\305\306\307\310\311!\203..\312\202+.\313\314\315\316\317\320!\"\203&.\321\202'.\322D\323BBD\324BBBBB\207" [system-type windows-nt (("Yap" ("yap -1" (mode-io-correlate " -s %n%b") " %o")) ("dvips and start" "dvips %d -o && start \"\" %f") ("start" "start \"\" %o")) ("xdvi" ("%(o?)xdvi" (mode-io-correlate " -sourceposition \"%n %b\" -editor \"%cS\"") ((paper-a4 paper-portrait) " -paper a4") ((paper-a4 paper-landscape) " -paper a4r") ((paper-a5 paper-portrait) " -paper a5") ((paper-a5 paper-landscape) " -paper a5r") (paper-b5 " -paper b5") (paper-letter " -paper us") (paper-legal " -paper legal") (paper-executive " -paper 7.25x10.5in") " %d")) ("dvips and gv" "%(o?)dvips %d -o && gv %f") ("gv" "gv %o") ("xpdf" ("xpdf -remote %s -raise %o" (mode-io-correlate " %(outpage)"))) "Evince" TeX-evince-dbus-p :forward TeX-evince-sync-view "evince" mode-io-correlate string-match "--page-index" shell-command-to-string "evince --help" " -i %(outpage)" " -p %(outpage)" (" %o") (("Okular" ("okular --unique %o" (mode-io-correlate "#src:%n%b"))) ("xdg-open" "xdg-open %o"))] 11)
>   (defvar TeX-view-program-list-builtin (byte-code \301=\20.\302\207\303\304\305\306\307\310\311!\203..\312\202+.\313\314\315\316\317\320!\"\203&.\321\202'.\322D\323BBD\324BBBBB\207" [system-type windows-nt (("Yap" ("yap -1" (mode-io-correlate " -s %n%b") " %o")) ("dvips and start" "dvips %d -o && start \"\" %f") ("start" "start \"\" %o")) ("xdvi" ("%(o?)xdvi" (mode-io-correlate " -sourceposition \"%n %b\" -editor \"%cS\"") ((paper-a4 paper-portrait) " -paper a4") ((paper-a4 paper-landscape) " -paper a4r") ((paper-a5 paper-portrait) " -paper a5") ((paper-a5 paper-landscape) " -paper a5r") (paper-b5 " -paper b5") (paper-letter " -paper us") (paper-legal " -paper legal") (paper-executive " -paper 7.25x10.5in") " %d")) ("dvips and gv" "%(o?)dvips %d -o && gv %f") ("gv" "gv %o") ("xpdf" ("xpdf -remote %s -raise %o" (mode-io-correlate " %(outpage)"))) "Evince" TeX-evince-dbus-p :forward TeX-evince-sync-view "evince" mode-io-correlate string-match "--page-index" shell-command-to-string "evince --help" " -i %(outpage)" " -p %(outpage)" (" %o") (("Okular" ("okular --unique %o" (mode-io-correlate "#src:%n%b"))) ("xdg-open" "xdg-open %o"))] 11) ("/usr/share/emacs24/site-lisp/auctex/tex.elc" . 30407))
>   require(tex)
>   byte-code("\300\301!\210\300\302!\207" [require tex tex-style] 2)
>   BibTeX-auto-store()
>   run-hooks(change-major-mode-after-body-hook bibtex-mode-hook)
>   apply(run-hooks (change-major-mode-after-body-hook bibtex-mode-hook))
>   run-mode-hooks(bibtex-mode-hook)
>   bibtex-mode()
> =============================================================================
>
> The offending loop in dbus-call-method-non-blocking is
>
>     (while (eq (gethash key dbus-return-values-table :ignore) :ignore)
>       (read-event nil nil 0.1))
>
> While the dbus message failure is ultimately a gnome issue, this
> should fail more gracefully.
>
> Take care,

Thanks
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4