zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Dennis Schwartz <dennis.schwartz@protonmail.com>
Cc: Daniel Shahaf <d.s@daniel.shahaf.name>,
	Peter Stephenson <p.stephenson@samsung.com>,
	 "zsh-users@zsh.org" <zsh-users@zsh.org>
Subject: Re: TRAPINT doesn't work reliably
Date: Sat, 28 Sep 2019 09:00:51 -0700	[thread overview]
Message-ID: <CAH+w=7YkHfcU2SGg=f+LOBr_GTOZicUGFZ7msyz-K+_fqGd0nQ@mail.gmail.com> (raw)
In-Reply-To: <ODmJIQmuJJcZdaTGdd_T4zXxU0G7RHNJl3pSGxRC3qTePtsFsXSosieytwRTp2x2GTxggH_l9ZGZQb19rELfq70ZCOU9Xtr0Ik4ks9SpbOQ=@protonmail.com>

On Sat, Sep 28, 2019 at 4:17 AM Dennis Schwartz
<dennis.schwartz@protonmail.com> wrote:
>
> * On my system (Debian 10), I need to compile zsh with the version
>   number from my default Debian installation. So I always do
>   `git checkout zsh-5.7.1 -- Config/version.mk` before I compile.

So, you should definitely STOP doing that.  It's only creating confusion.

The version number from config.mk determines three things:
1. The function load path
2. The compiled module load path
3. The format of "compiled" function definitions from .zwc files

and as a corollary to #3, whether zsh will load the .zwc file at all,
because it compares a version number embedded in the file to to
version number of the compiled zsh.

If you compile version X.Y.Z of zsh with the version.mk from version
P.D.Q, particularly on a host where P.D.Q was previously (or is
currently) installed, you are extremely likely to either be linking
with an incompatible shared object file, or loading a .zwc file whose
bytecode is garbage to the internals of your newly compiled binary.
Either of those things could be causing the crashes you are seeing, or
cause valgrind to generate results that have no real relationship to
the original problem.

This part --

> * `zsh` needs to be started twice.
>   * The first time the bug cannot be triggered.
>   * The second time the bug can be triggered by typing a character and
>     then hitting TAB to autocomplete. Now hit Ctrl+C to interrupt.

-- suggests very strongly that this is related to loading an incorrect
version of a compiled function as a result of the .zcompdump file
having been updated, or some similar automatic configuration update,
probably (as you suggest) being performed by antigen.

To get anywhere with this, we need a zsh that is compiled entirely
consistently, not with bits an pieces of different versions.  Either
check out the entire git revision matching your OS version, not just
the version number file, or run the entire test with the most recent
version, including the correct version.mk for that build.

I would also suggest that you go back to the configuration where you
first observed the problem (i.e., do NOT use a custom-compiled binary)
and start zsh with
  zsh -o sourcetrace
which will show you where all the configuration files are being found.
You can then compare that to "zsh -o sourcetrace" from your newly
compiled binary to determine which files are the same and which are
different in the event that the bug behavior changes with the new
build.

If after correcting the build process you STILL observe that zsh must
be started twice, comparing sourcetrace from the first and second runs
may also be informative.

  parent reply	other threads:[~2019-09-28 16:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20190917164905epcas1p4ad458ffcd504501780d522880c81de3e@epcas1p4.samsung.com>
2019-09-17 16:47 ` Dennis Schwartz
2019-09-24  8:44   ` Peter Stephenson
2019-09-25 13:02     ` Dennis Schwartz
2019-09-25 14:01       ` Peter Stephenson
2019-09-25 16:25         ` Dennis Schwartz
2019-09-25 17:04           ` Peter Stephenson
2019-09-25 18:46             ` Daniel Shahaf
2019-09-26 15:27               ` Peter Stephenson
2019-09-27 13:43                 ` Daniel Shahaf
2019-09-25 17:56           ` Peter Stephenson
2019-09-26 14:48             ` Dennis Schwartz
2019-09-26 15:25               ` Peter Stephenson
2019-09-26 17:10                 ` Dennis Schwartz
2019-09-27 13:46                   ` Daniel Shahaf
2019-09-28 11:16                     ` Dennis Schwartz
2019-09-28 14:29                       ` Daniel Shahaf
2019-09-28 18:21                         ` Dennis Schwartz
2019-09-28 18:58                           ` Dennis Schwartz
2019-09-28 16:00                       ` Bart Schaefer [this message]
2019-09-29 16:54                         ` Peter Stephenson
2019-09-27 19:05                   ` Peter Stephenson

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='CAH+w=7YkHfcU2SGg=f+LOBr_GTOZicUGFZ7msyz-K+_fqGd0nQ@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=d.s@daniel.shahaf.name \
    --cc=dennis.schwartz@protonmail.com \
    --cc=p.stephenson@samsung.com \
    --cc=zsh-users@zsh.org \
    /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 public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).