all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Leonard Lausen <leonard@lausen.nl>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: , 37331-done@debbugs.gnu.org
Subject: bug#37331: 27.0.50; segfault when starting from pdump and using dbus
Date: Fri, 13 Sep 2019 09:25:46 +0000	[thread overview]
Message-ID: <87blvo8s4l.fsf@lausen.nl> (raw)
In-Reply-To: <b4b7587f-2898-8223-412f-a8ed270e6ff9@cs.ucla.edu>

Thank you for looking into the problem! Your fix indeed prevents the
crash. Unfortunately there seems to be an issue with dbus sessions. For
exmaple, notmuch-search from notmuch.el or
fcitx--prefix-keys-polling-function error out with

  (dbus-error "No connection to bus" :session)

when loading a pdumped session.

Would you like me to prepare a minimal reproducible example? Should I
open a new bug? Above report is based on the emacs config at
https://github.com/leezu/dotfiles/tree/master/emacs which uses
spacemacs.

Best regards
Leonard

Paul Eggert <eggert@cs.ucla.edu> writes:

> Thanks for reporting the problem. I reproduced it and installed the attached 
> patch, which should fix it.
> From cc4da5b17e9e9aa522a0bd77dc341cd14ec9ea43 Mon Sep 17 00:00:00 2001
> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Wed, 11 Sep 2019 10:19:07 -0700
> Subject: [PATCH] Reset dbus registered buses on dump load
>
> Problem reported by Leonard Lausen (Bug#37331).
> * src/dbusbind.c: Include pdumper.h.
> (syms_of_dbusbind_for_pdumper):
> New function, to reset the registered buses.
> (syms_of_dbusbind): Use it, fixing a TODO.
> ---
>  src/dbusbind.c | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/src/dbusbind.c b/src/dbusbind.c
> index 7f4c8717f4..de67dc94f9 100644
> --- a/src/dbusbind.c
> +++ b/src/dbusbind.c
> @@ -26,6 +26,7 @@
>  #include "lisp.h"
>  #include "termhooks.h"
>  #include "keyboard.h"
> +#include "pdumper.h"
>  #include "process.h"
>  
>  #ifndef DBUS_NUM_MESSAGE_TYPES
> @@ -1681,6 +1682,12 @@ init_dbusbind (void)
>    xputenv ("DBUS_FATAL_WARNINGS=0");
>  }
>  
> +static void
> +syms_of_dbusbind_for_pdumper (void)
> +{
> +  xd_registered_buses = Qnil;
> +}
> +
>  void
>  syms_of_dbusbind (void)
>  {
> @@ -1829,13 +1836,10 @@ syms_of_dbusbind (void)
>  #endif
>  
>    /* Initialize internal objects.  */
> -  xd_registered_buses = Qnil;
> +  pdumper_do_now_and_after_load (syms_of_dbusbind_for_pdumper);
>    staticpro (&xd_registered_buses);
>  
> -  // TODO: reset buses on dump load
> -
>    Fprovide (intern_c_string ("dbusbind"), Qnil);
> -
>  }
>  
>  #endif /* HAVE_DBUS */
> -- 
> 2.17.1





  reply	other threads:[~2019-09-13  9:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-07 15:48 bug#37331: 27.0.50; segfault when starting from pdump and using dbus Leonard Lausen
2019-09-11 17:21 ` Paul Eggert
2019-09-13  9:25   ` Leonard Lausen [this message]
2019-09-13 18:55     ` Paul Eggert
2019-09-14 20:12       ` Leonard Lausen
2021-10-11 14:28         ` Lars Ingebrigtsen
2021-10-11 16:00           ` Eli Zaretskii
2021-10-12 11:02             ` Lars Ingebrigtsen
2021-10-12 11:57               ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87blvo8s4l.fsf@lausen.nl \
    --to=leonard@lausen.nl \
    --cc=37331-done@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.