unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: Juri Linkov <juri@linkov.net>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Two fixes for module bug when interleaving threads
Date: Sun, 29 Nov 2020 21:16:04 +0100	[thread overview]
Message-ID: <CAArVCkR6FrycCo4NKV9mxY8Lc0JDXmmv4gxcS3_Br4-SZ9Ev9Q@mail.gmail.com> (raw)
In-Reply-To: <87o8jgvtxg.fsf@mail.linkov.net>

Am So., 29. Nov. 2020 um 20:49 Uhr schrieb Juri Linkov <juri@linkov.net>:
>
> > I just pushed two fixes for the same bug that appears when
> > interleaving module calls in separate threads:
> > cdc632fbe6e149318147a98cccf1b7af191f2ce8 for the release branch and
> > 23974cfa48b9245658667eff81d132b3aecd2618 for master. The intention was
> > that a simpler and more localized fix should go to the release branch,
> > the "proper" fix to master. Now I've realized that arguably the
> > simpler fix is overall better: it's more localized, touches fewer
> > moving pieces, and is probably not significantly slower (though I
> > haven't benchmarked it). Any opinions? If people agree, we can
> > overwrite the fix on master with the fix on the release branch.
>
> Unfortunately, 23974cfa48b9245658667eff81d132b3aecd2618 in master
> broke module loading: while loading a module, Emacs prints the
> message "Loading (module)..." and hangs, doesn't react to input,
> becomes completely unresponsive to C-g.
>
> Here's is the shortest reproducible test case:
>
> M-x package-install RET zmq RET
> (load-file "~/.emacs.d/elpa/zmq-20200912.1126/emacs-zmq.so")
>
> It hangs after printing to stderr:
>
>   double free or corruption (!prev)
>   Fatal error 6: Aborted
>

Thanks for the report, fixed with commit
41c338474dd1e086494337fd18ec8828cef1a75c.
(The subtlety here was that this triggered only if a module allocated
more than 512 objects in its initialization function, so the unit
tests didn't catch it.)



      reply	other threads:[~2020-11-29 20:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-27 20:57 Two fixes for module bug when interleaving threads Philipp Stephani
2020-11-28  7:25 ` Eli Zaretskii
2020-11-29 19:44 ` Juri Linkov
2020-11-29 20:16   ` Philipp Stephani [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=CAArVCkR6FrycCo4NKV9mxY8Lc0JDXmmv4gxcS3_Br4-SZ9Ev9Q@mail.gmail.com \
    --to=p.stephani2@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=juri@linkov.net \
    /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.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).