From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#37331: 27.0.50; segfault when starting from pdump and using dbus Date: Tue, 12 Oct 2021 13:02:10 +0200 Message-ID: <87a6jefqvh.fsf@gnus.org> References: <87blvo8s4l.fsf@lausen.nl> <87tv9ehc28.fsf@lausen.nl> <87h7dnhc05.fsf@gnus.org> <831r4rr1om.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31369"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: eggert@cs.ucla.edu, leonard@lausen.nl, 37331@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 12 13:17:37 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1maFmr-0007xo-0F for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Oct 2021 13:17:37 +0200 Original-Received: from localhost ([::1]:35926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maFmp-0000fl-VW for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Oct 2021 07:17:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58716) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maFYl-0001tn-Vn for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2021 07:03:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50305) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maFYk-0007Ys-0a for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2021 07:03:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1maFYj-0007Hf-QS for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2021 07:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Oct 2021 11:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37331 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed moreinfo Original-Received: via spool by 37331-submit@debbugs.gnu.org id=B37331.163403654326871 (code B ref 37331); Tue, 12 Oct 2021 11:03:01 +0000 Original-Received: (at 37331) by debbugs.gnu.org; 12 Oct 2021 11:02:23 +0000 Original-Received: from localhost ([127.0.0.1]:33618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1maFY7-0006z9-8V for submit@debbugs.gnu.org; Tue, 12 Oct 2021 07:02:23 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:36878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1maFY4-0006tG-V4 for 37331@debbugs.gnu.org; Tue, 12 Oct 2021 07:02:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=D6LuaRtR2b/Oo7a8onMxjTOVRGhi0JIXAfIC47hSFnA=; b=r96xvXPSgWTUJfl7SUtRdHGxI5 w6+O4/rL5UKAhscfuaxg4j/SsGTCtH6AERXztO4AXirc/fJ3o0rgSm0y+3pEGcVjJnwjRDm/BDdOA 6JLuP7c7n3q2RKEmNaOaPWXh5uxrXFgoPWFS29UitFjwjf5sgEysam7nL3QMLjBc/Gr4=; Original-Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1maFXv-0004Iq-4K; Tue, 12 Oct 2021 13:02:13 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAKlBMVEU8O0NAPkdGSE4q LDWen6Hb29toanC+v78dIS0QFScKDRh8foM+QUn///80+ybcAAAAAWJLR0QN9rRh9QAAAAd0SU1F B+UKDAoiFU3DoJUAAAGcSURBVDjLzdHPS8MwFAfwhFLwuPQ/WKUqnsoycQMPsi1jeJxNK3gR16no RVy7g3oQK5h6EhFM9gcMNjzuLxD/MJN1Pyq2F/Hg99DD+/TlhRcAzcwUgZmTfwpGHuQJADAPclok oB9iJAARMlNYNIpoDgWEZCNKACE0AwALYBqIDJTESGCWAlSlBeAFQHm4rKkRSIE9NQ3O2tTHhkgC xqYGNHPVxiU7QWzawJBQpq5dDgLtmNS1ILL83jrdBRBElW4zXOlubDdpo1Wifb2xH550ZB+rks21 O9J5cMOjK8sLw8mtc6FJ4LHVf7KcDf2AlA6JM6STHg17cprgQ3ppnVe7e+SsFgQx8S+p35Z3FeLx xnttxxIarSBglt/3aB1jIAb6Obl3+ds1iarE4brfd3c+FIhHx3t2R1t7pMp0CZNe2PSm8B7uCv+k GZ9Wopcbtu23PmltCgMuGMcxk6mwiDHM5DYUyHAm2DJ4CSJdZywNqite/pOGVBSB8SibwFgmi34H IhsyhysQOTDKA/HnoNYT/wQ+X3j8HXj6MWb2BSMUhJHZcKTUAAAAJXRFWHRkYXRlOmNyZWF0ZQAy MDIxLTEwLTEyVDEwOjM0OjIwKzAwOjAwMfb3JAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0xMC0x MlQxMDozNDoyMCswMDowMECrT5gAAAAASUVORK5CYII= X-Now-Playing: SOPHIE's _PRODUCT_: "L.O.V.E." In-Reply-To: <831r4rr1om.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 11 Oct 2021 19:00:57 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:217002 Archived-At: Eli Zaretskii writes: > We don't yet have good support for re-dumping Emacs, so these > questions don't have good "canonical" answers. The infrastructure is > not there. Right. To fix the original segfault, Paul added /* Initialize internal objects. */ pdumper_do_now_and_after_load (syms_of_dbusbind_for_pdumper); (which just sets xd_registered_buses to Qnil). Would adding a similar thing, basically `pdumper_do_after_load', be the direction we want to go in here? I'm thinking basically making systems that put logic into the load logic, like dbus is doing: (when (featurep 'dbusbind) (dbus-ignore-errors (dbus-init-bus :system)) (dbus-ignore-errors (dbus-init-bus :session))) Rewriting that to (eval-when-load-and-startup (when (featurep 'dbusbind) (dbus-ignore-errors (dbus-init-bus :system)) (dbus-ignore-errors (dbus-init-bus :session)))) that would make pdump eval these forms after loading the dump file? But it strikes me that in the dbus case, we can just avoid all this by having a `dbus-init' function that would initialise the dbus system unless it's already initialised, and make all the dbus interface functions call it as the first thing... Oh, no, we don't want to do that, because dbus wants to start listening to the bus immediately after Emacs starts up, so that messages are queued when code finally gets around to querying the dbus.el functions. OK, I think something like the `eval-when-load-and-startup' thing would be the right thing here, then. I'll take a stab at implementing it. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no