From mboxrd@z Thu Jan 1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Philipp Stephani
Newsgroups: gmane.emacs.devel
Subject: Re: Two fixes for module bug when interleaving threads
Date: Sun, 29 Nov 2020 21:16:04 +0100
Message-ID:
References:
<87o8jgvtxg.fsf@mail.linkov.net>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
logging-data="36215"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: Emacs developers
To: Juri Linkov
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 29 21:17:48 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 1kjT8l-0009KR-Qw
for ged-emacs-devel@m.gmane-mx.org; Sun, 29 Nov 2020 21:17:47 +0100
Original-Received: from localhost ([::1]:53430 helo=lists1p.gnu.org)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from )
id 1kjT8k-0007f7-S2
for ged-emacs-devel@m.gmane-mx.org; Sun, 29 Nov 2020 15:17:46 -0500
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52778)
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from )
id 1kjT7L-0006kF-QX
for emacs-devel@gnu.org; Sun, 29 Nov 2020 15:16:19 -0500
Original-Received: from mail-ot1-x32c.google.com ([2607:f8b0:4864:20::32c]:34746)
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.90_1) (envelope-from )
id 1kjT7I-0002Hk-Qw
for emacs-devel@gnu.org; Sun, 29 Nov 2020 15:16:19 -0500
Original-Received: by mail-ot1-x32c.google.com with SMTP id h19so9482466otr.1
for ; Sun, 29 Nov 2020 12:16:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc; bh=hZOPEYsmOsvkXeJAOO9fdgKlvAJxbIucIjtd+rqVfUc=;
b=dDTy5YdC4KMtogwscIHfGAsUJ4Z4u0Z1F0VWSIBYVJrryYEdIYiOW/VVpcBgnf3fBJ
B+pXcb5GO6ovL4xyHhY1fhf2HsuBk0SNRXQBbGu/cDP5NTB/VnNJnhlQrmeBm4WxJXpN
OZBRsTfLk9gh1dhOGW3FcjA1cePf1nNDTw1m91PevXRBZNjuYVAncIWFbWTpxz+yZjTt
CFSOeIBVlTpOkqVMCgMBh57t4Hb1pwTxD1nG5h7wc3dk7Zny7UnxhhBjO3K2wOcOnb7l
eyGga+7uREtb3jWgLwOETlJrzhQrp7OhqkzFP0SHaUo8aQ4/qUkYNN8ZYlqG8MgRNrkK
KPNA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=hZOPEYsmOsvkXeJAOO9fdgKlvAJxbIucIjtd+rqVfUc=;
b=Kzavkn7+YvqMjckoRM8buf+Uk/6D57EZfFawf5aPNodNx1Y6KbvbC59t5lCMX9+zIk
BOtNIqBLLyMWGT50+pteyHBqMVfnl1Ptc0+wvQ7+l6PCZ3a6PsZ6g7gOUND6JPZX4MLN
XRAmF4el70Q126IkXuJ6SenG2fadb6lB2RUGKoxWUrqx1m7Dlq46yzijw6tCizDtMO6P
qCY0jFvF0f9PQ824XeTyZmkpHy5W1RkpL6BuzU0ZYbCo6rlQbTv27yjeEqjTGBP3+Szc
KTLmygASMJH32Hcv2VkwzpbUjHBIBuflBL4lv4/tP0so6XEaIKpCpsfzBRVFcCHHgmoz
eh1g==
X-Gm-Message-State: AOAM530SZroXCLqFnyBUft3qXuVviA1SmIbcQRQ8kqNZWhUZ/HWGy2Y0
Ogg0jDAfDvLrIU6rAq2aoEtEJzV5FVdoSmZsNIE=
X-Google-Smtp-Source: ABdhPJw69E3VeFPCZ5pB9wIz61n/XbYYhgMd4TsSAaFgY/m+MGUM2u6h7eSG4ZOwW1TC+/eZWjacN6FqejAPXMB/NEc=
X-Received: by 2002:a9d:6b08:: with SMTP id g8mr8716004otp.36.1606680975472;
Sun, 29 Nov 2020 12:16:15 -0800 (PST)
In-Reply-To: <87o8jgvtxg.fsf@mail.linkov.net>
Received-SPF: pass client-ip=2607:f8b0:4864:20::32c;
envelope-from=p.stephani2@gmail.com; helo=mail-ot1-x32c.google.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001 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:260035
Archived-At:
Am So., 29. Nov. 2020 um 20:49 Uhr schrieb Juri Linkov :
>
> > 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.)