From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "T.V Raman" Newsgroups: gmane.emacs.devel Subject: Re: Emacs:Native-Comp Backtrace Date: Wed, 26 Aug 2020 08:06:27 -0700 Message-ID: References: <24389.44700.121870.344164@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=gb18030 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16389"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 26 17:07:11 2020 Return-path: Envelope-to: ged-emacs-devel@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 1kAx14-00048T-Kt for ged-emacs-devel@m.gmane-mx.org; Wed, 26 Aug 2020 17:07:10 +0200 Original-Received: from localhost ([::1]:48490 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kAx13-0001uB-N0 for ged-emacs-devel@m.gmane-mx.org; Wed, 26 Aug 2020 11:07:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55656) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAx0U-000152-JG for emacs-devel@gnu.org; Wed, 26 Aug 2020 11:06:34 -0400 Original-Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]:34861) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kAx0S-0002jm-Ny for emacs-devel@gnu.org; Wed, 26 Aug 2020 11:06:34 -0400 Original-Received: by mail-pl1-x630.google.com with SMTP id a8so811491plm.2 for ; Wed, 26 Aug 2020 08:06:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=eABTJY2PmrnMR4FIbA+n6YQ3Ynbt/f+VZuNiKYjy164=; b=LAwJYl/u7kv2eyIxXKQGWJekxU9VylkU/H36SYEfFUBTDjt8bXsoIXieLwOgneWibO 9J5y+gDrGAp5n6xfYHC5v1pcPdUfmXmX6QX/SPBLVtyMUIeyPj0E2ZVy1lp+gRNbvmcb eph9S+P0DWiNsBT10dxfkyh/RwGJOG8C2xWkPYhz5BD7MT3qxfZNOq46uT9OtYuJaPRj 4moISn+774NXehDolyqu7+BZMMXFMcIOhlmX6SEhIzMxTBAYUHmwwY8p+dkTyrksdoNA 9wIhozMDrbJ8OHs/kM4IkZMfTg952ylyRMI+FtEczA4YNaDSQFwL/upQS1ozqc8DM3CA zQ5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=eABTJY2PmrnMR4FIbA+n6YQ3Ynbt/f+VZuNiKYjy164=; b=p8UyKtvTaPvMXXp4JS9mx6s43Rf4L9ZFX1MquFtyZxDrCDI7j+E/87IBpL47XL3CxZ 6kPZzFhvhTIvbTwfMiSk/HwUMnuob9OrrtxhfyUfGOQepnJSV69vjeXaL0zDjlBRtYnm ILTKi77+MI5ugPv1gh6mJ2Sw9jjp8PeOyfKger+3pOqU39OQKO47pkMbhTkOtruEV37X h0Fu2YWCmTc5WuWTiTy0YlRkPnarO1eNML5dh1+qOwr8v2cxc5x/967rgW1TJ4PbBHos /8OiEMo3qgu37e9OotDFQgecYYYh+798ViY6WgbDnv/LX40idhqwmpp936fFr/qUj/F3 Widw== X-Gm-Message-State: AOAM531/5KQwV8nn/SnYw26fDaEskd/Vf6uTDcaK5lJSC+PO6UsqR/av wQmrmpGSiwCJZsBCL1JlinOsxrxXwtR7bRHY X-Google-Smtp-Source: ABdhPJzUZ6+dj3DuJuD1xEBJpLfbNx2cFiKQ2YLA3YEBmH5vGqMV8oP6WHH3s9vBnVAfFZdwH0r68A== X-Received: by 2002:a17:90a:f416:: with SMTP id ch22mr6305685pjb.232.1598454390347; Wed, 26 Aug 2020 08:06:30 -0700 (PDT) Original-Received: from raman-glaptop.localdomain (c-24-4-174-65.hsd1.ca.comcast.net. [24.4.174.65]) by smtp.gmail.com with ESMTPSA id a13sm1854457pjq.36.2020.08.26.08.06.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 08:06:28 -0700 (PDT) Original-Received: by raman-glaptop.localdomain (Postfix, from userid 13930) id BE94CC2111C; Wed, 26 Aug 2020 08:06:27 -0700 (PDT) In-Reply-To: <24389.44700.121870.344164@google.com> (T. V. Raman's message of "Tue, 25 Aug 2020 17:36:44 -0700") Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=raman@google.com; helo=mail-pl1-x630.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -151 X-Spam_score: -15.2 X-Spam_bar: --------------- X-Spam_report: (-15.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, MIME_CHARSET_FARAWAY=2.45, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:254248 Archived-At: "T.V Raman" writes: Here is some more info based on a work-around: Conjecture: native-comp has issues with with-eval-after-load and friends: The following setup produced the afore-mentioned error: 1. In the emacs startup, load dired-x when dired is loaded: (with-eval-after-load "dired" (require 'dired-x)) 2. dired-mode-hook contains dired-omit-mode defined in dired-x 3. During startup, a dired buffer is opened -- either via psession, desktop or some other means With the above, you get the error (symbol's function definition is void: dired-omit-mode) Fix: If in the startup file, you remove the with-eval-after-load and simply require dired-x, then it works. Additional info which lends credence to the conjecture: Emacspeak loads module-specific code using eval-after-load e.g. when "ido" is loaded, it loads emacspeak-ido after ido is done loading. In native-comp emacs, I find that (featurep 'emacspeak-ido) is nil after ido is loaded. I suspect use-package may also be affected in a similar way. =20=20=20=20=20=20 > Hi Andrea and others, > > This is a follow-on to my earlier message re a possible race > condition, this time with a backtrace. > > 1. I load dired-x in my emacs startup, and I have dired-omit-mode > enabled via customize (settings saved to a custom file) > > 2. The above emacs startup works with no errors or warnings with > regular emacs. > > 3. With emacs native-comp version, this throws a symbol's value > as variable is void in the *Messages* buffer. > 4. native-emacs (native comp version) does not throw a > backtrace even if you start it as native-emacs > --debug-init > > 5. I produced the attached backtrace by setting > debug-on-error to t at the top of my early-init.el > 6. As the backtrace below shows, the psession package > in the process of restoring buffers opens a dired > buffer, and at that point, dired-omit-mode is on > dired-mode-hook, but apparently dired-x hasn't been > fully loaded yet. > > Debugger entered--Lisp error: (void-function dired-omit= -mode) > (dired-omit-mode) > (run-hooks change-major-mode-after-body-hook dired-mode-hook) > (apply run-hooks (change-major-mode-after-body-hook dired-mode-hook)) > (run-mode-hooks dired-mode-hook) > (dired-mode "~/Mail/foo" "-al") > (dired-internal-noselect "~/Mail/foo" nil) > (dired-noselect "~/Mail/foo") > (run-hook-with-args-until-success dired-noselect "~/Mail/foo") > (find-file-noselect "/home/raman/Mail/foo/" nowarn) > (psession--restore-some-buffers) > (run-hooks emacs-startup-hook term-setup-hook) > (#f(compiled-function () #)) > (normal-top-level) > > --=20 > =817=A94Id: kg:/m/0285kf1 =950=DC8=817=A94 --=20 =817=A94Id: kg:/m/0285kf1 =950=DC8=817=A94