From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Fabrice Popineau Newsgroups: gmane.emacs.devel Subject: Re: Emacs-26 threads problem [win64] Date: Tue, 10 Oct 2017 20:57:20 +0200 Message-ID: References: <83h8v7r02e.fsf@gnu.org> <83vajnotik.fsf@gnu.org> <83r2ubosnd.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a113e4ca6acdfce055b35e10e" X-Trace: blaine.gmane.org 1507661904 24713 195.159.176.226 (10 Oct 2017 18:58:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 10 Oct 2017 18:58:24 +0000 (UTC) Cc: Emacs developers To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 10 20:58:20 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1zjP-0005uF-Lp for ged-emacs-devel@m.gmane.org; Tue, 10 Oct 2017 20:58:19 +0200 Original-Received: from localhost ([::1]:36689 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1zjX-0000CL-5K for ged-emacs-devel@m.gmane.org; Tue, 10 Oct 2017 14:58:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50892) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1zir-0000A5-BI for emacs-devel@gnu.org; Tue, 10 Oct 2017 14:57:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1ziq-0008Am-0a for emacs-devel@gnu.org; Tue, 10 Oct 2017 14:57:45 -0400 Original-Received: from mail-qt0-x22a.google.com ([2607:f8b0:400d:c0d::22a]:54724) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e1zio-0008AP-5N; Tue, 10 Oct 2017 14:57:42 -0400 Original-Received: by mail-qt0-x22a.google.com with SMTP id z19so8848437qtg.11; Tue, 10 Oct 2017 11:57:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=1Smn71Dz5iSgxC4IrzpyHwI2G3sYh9Hmr/C1vlMAU0M=; b=gl0MjGRzLR39zqrbQKYedV1fPSsUPHu/NcIQ70vhbdOLpDOuc75etp7P8uXiRvfgvD uP5Q49/tt9xL/rNIiNqY0IWW6qAPD+yz6swDUBYb/jsK4K7VL6Y/g9E3s1yMnyXPOM4T aS9bWF4bukKrsxi+8nHqn0TWJwO50ymqbCG5Lthp/TRx8/ig3BQzpJ0WSsseV6wytloU 7lYp/9KGKxTIAxkHjb2DJXKXTN7/PYFk/rdsdZMvmVUgj4VxQN1C7lRTvozPLeC9IqvQ 6o0NCVVQww3HOXvWhBXBTuWCK7rocKLv9qaU5ae0h786CHPVbdToubtvbDUd2NzxGJxd hMCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=1Smn71Dz5iSgxC4IrzpyHwI2G3sYh9Hmr/C1vlMAU0M=; b=CGJToxlchSdnOBQUI5rsPylrOKg+7E2zWKFOp8ptdEgSpP5coTupCmUPDpTm8BjREs a/vO0jqf6JqIgRwWuiq4A7TRIqLZeCJuax7UeKzl4zKJS8Du5DLm5eBU3yI6zl26D4c2 BzuxDqSeuhHmeaj2aKQ1YIEWkK9vo8LWVRi7IN7RZ6w5UqJ0MPoWHv0HipnX2vZeSwvZ nHo44m8w2p/ZXv2BUrDq19n26d5kDZj4vOhq8p+Z/WcjzAj+AMgZtmk7DvDZJf1+c2tW p6ivqW1B6d0mJeerXWAR+UrmBA7+eCVGITXOQPATWt+NAOMq+HrbVYPk1Azb9NlqzkpN x1kw== X-Gm-Message-State: AMCzsaV2Hg9vGLeOMGBLWooK4eVevcfsOAIGyHyPg1OZFAJfOFC0W8pW WlImZ3TFCx+bE92n60O6iuQY/imnpOMiyM0HCEm5ag== X-Google-Smtp-Source: AOwi7QDnn43qWda+sNoc3T5ZLGijMrkLAl57+HJARDIqKu6oQpXtwFZHK18pKe9uKskJDEMkcO0Fu3NkHFsup/3e8OY= X-Received: by 10.200.39.236 with SMTP id x41mr2788245qtx.287.1507661861148; Tue, 10 Oct 2017 11:57:41 -0700 (PDT) Original-Received: by 10.140.94.2 with HTTP; Tue, 10 Oct 2017 11:57:20 -0700 (PDT) In-Reply-To: <83r2ubosnd.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::22a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:219354 Archived-At: --001a113e4ca6acdfce055b35e10e Content-Type: text/plain; charset="UTF-8" 2017-10-10 18:48 GMT+02:00 Eli Zaretskii : > > Date: Tue, 10 Oct 2017 19:30:11 +0300 > > From: Eli Zaretskii > > Cc: emacs-devel@gnu.org > > > > > From: Fabrice Popineau > > > Date: Tue, 10 Oct 2017 18:13:19 +0200 > > > Cc: Emacs developers > > > > > > (gdb) p stack_pos > > > $3 = {__max_align_ll = 0, __max_align_ld = 3. > 587554638101247699761989924457637e-4943} > > > > What is &stack_pos, the address of stack_pos? Is it properly aligned? > > Also, this very snippet runs every time a non-main thread is run by > Emacs, and yet all of the 18 tests before this one succeeded for you. > What is different in this 19th test that it fails? > What does this test do exactly ? (Well I could read the code but ... doing many other things in parallel) Because if I print &stack_pos, I get : (gdb) run -batch --no-site-file --no-site-lisp -L ";../../emacs/test" -l ert -l src/thread-tests.el --eval "(ert-run-tests-batch-and-exit (quote (not (tag :expensive-test))))" Starting program: /d/Source/emacs/build-emacs-26/src/emacs -batch --no-site-file --no-site-lisp -L ";../../emacs/test" -l ert -l src/thread-tests.el --eval "(ert-run-tests-batch-and-exit (quote (not (tag :expensive-test))))" [New Thread 20864.0x60c] [New Thread 20864.0x5bb4] [New Thread 20864.0x3070] [New Thread 20864.0x332c] [New Thread 20864.0x512c] Running 28 tests (2017-10-10 19:54:11+0100) [New Thread 20864.0x42ec] [Thread 20864.0x42ec exited with code 0] [New Thread 20864.0x25e8] stack_pos = 741feb0 stack_pos = 7c1feb0 passed 1/28 thread-errors [New Thread 20864.0x1118] [Thread 20864.0x25e8 exited with code 0] [Thread 20864.0x1118 exited with code 0] stack_pos = 841feb0 passed 2/28 thread-signal-early passed 3/28 thread-sticky-point [New Thread 20864.0x562c] stack_pos = 8c1feb0 passed 4/28 threads-alive passed 5/28 threads-all-threads [New Thread 20864.0x471c] [Thread 20864.0x562c exited with code 0] [Thread 20864.0x471c exited with code 0] stack_pos = 941feb0 passed 6/28 threads-basic passed 7/28 threads-condvar-mutex passed 8/28 threads-condvar-name passed 9/28 threads-condvar-name-2 passed 10/28 threads-condvar-type [New Thread 20864.0x2970] [Thread 20864.0x2970 exited with code 0] stack_pos = 9c1feb0 passed 11/28 threads-condvar-wait passed 12/28 threads-condvarp passed 13/28 threads-condvarp-2 [New Thread 20864.0x16a0] [Thread 20864.0x16a0 exited with code 0] stack_pos = a41feb0 passed 14/28 threads-io-switch passed 15/28 threads-is-one [New Thread 20864.0x4e68] [Thread 20864.0x4e68 exited with code 0] stack_pos = ac1feb0 passed 16/28 threads-join passed 17/28 threads-join-self [New Thread 20864.0x63f4] [Thread 20864.0x63f4 exited with code 0] stack_pos = b41feb0 passed 18/28 threads-let-binding [New Thread 20864.0x4340] Thread 15 received signal SIGSEGV, Segmentation fault. [Switching to Thread 20864.0x4340] run_thread (state=0x400ae5e78 ) at ../../emacs/src/thread.c:702 702 self->m_stack_bottom = (char *) &stack_pos; The value of stack_pos keeps increasing. Isn't there some limit that is reached here ? Fabrice --001a113e4ca6acdfce055b35e10e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


2017-10-10 18:48 GMT+02:00 Eli Zaretskii <eliz@gnu.org>:
=
> Date: Tue, 10 Oct 20= 17 19:30:11 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc:
emacs-devel@gnu.org
>
> > From: Fabrice Popineau <fabrice.popineau@gmail.com>
> > Date: Tue, 10 Oct 2017 18:13:19 +0200
> > Cc: Emacs developers <e= macs-devel@gnu.org>
> >
> > (gdb) p stack_pos
> > $3 =3D {__max_align_ll =3D 0, __max_align_ld =3D 3.587554638= 101247699761989924457637e-4943}
>
> What is &stack_pos, the address of stack_pos?=C2=A0 Is it properly= aligned?

Also, this very snippet runs every time a non-main thread is run by<= br> Emacs, and yet all of the 18 tests before this one succeeded for you.
What is different in this 19th test that it fails?
What does this test do exactly ? (Well I could read the code bu= t ... doing many other things in parallel)

Because= if I print &stack_pos, I get :

(gdb) run -bat= ch --no-site-file --no-site-lisp -L ";../../emacs/test" -l ert -l= src/thread-tests.el --eval "(ert-run-tests-batch-and-exit (quote (not= (tag :expensive-test))))"
Starting program: /d/Source/emacs= /build-emacs-26/src/emacs -batch --no-site-file --no-site-lisp -L ";..= /../emacs/test" -l ert -l src/thread-tests.el --eval "(ert-run-te= sts-batch-and-exit (quote (not (tag :expensive-test))))"
[Ne= w Thread 20864.0x60c]
[New Thread 20864.0x5bb4]
[New Th= read 20864.0x3070]
[New Thread 20864.0x332c]
[New Threa= d 20864.0x512c]
Running 28 tests (2017-10-10 19:54:11+0100)
=
[New Thread 20864.0x42ec]
[Thread 20864.0x42ec exited with c= ode 0]
[New Thread 20864.0x25e8]
stack_pos =3D 741feb0<= /div>
stack_pos =3D 7c1feb0
=C2=A0 =C2=A0passed=C2=A0 =C2=A01= /28=C2=A0 thread-errors
[New Thread 20864.0x1118]
[Thre= ad 20864.0x25e8 exited with code 0]
[Thread 20864.0x1118 exited w= ith code 0]
stack_pos =3D 841feb0
=C2=A0 =C2=A0passed= =C2=A0 =C2=A02/28=C2=A0 thread-signal-early
=C2=A0 =C2=A0passed= =C2=A0 =C2=A03/28=C2=A0 thread-sticky-point
[New Thread 20864.0x5= 62c]
stack_pos =3D 8c1feb0
=C2=A0 =C2=A0passed=C2=A0 = =C2=A04/28=C2=A0 threads-alive
=C2=A0 =C2=A0passed=C2=A0 =C2=A05/= 28=C2=A0 threads-all-threads
[New Thread 20864.0x471c]
= [Thread 20864.0x562c exited with code 0]
[Thread 20864.0x471c exi= ted with code 0]
stack_pos =3D 941feb0
=C2=A0 =C2=A0pas= sed=C2=A0 =C2=A06/28=C2=A0 threads-basic
=C2=A0 =C2=A0passed=C2= =A0 =C2=A07/28=C2=A0 threads-condvar-mutex
=C2=A0 =C2=A0passed=C2= =A0 =C2=A08/28=C2=A0 threads-condvar-name
=C2=A0 =C2=A0passed=C2= =A0 =C2=A09/28=C2=A0 threads-condvar-name-2
=C2=A0 =C2=A0passed= =C2=A0 10/28=C2=A0 threads-condvar-type
[New Thread 20864.0x2970]=
[Thread 20864.0x2970 exited with code 0]
stack_pos =3D= 9c1feb0
=C2=A0 =C2=A0passed=C2=A0 11/28=C2=A0 threads-condvar-wa= it
=C2=A0 =C2=A0passed=C2=A0 12/28=C2=A0 threads-condvarp
=C2=A0 =C2=A0passed=C2=A0 13/28=C2=A0 threads-condvarp-2
[New = Thread 20864.0x16a0]
[Thread 20864.0x16a0 exited with code 0]
stack_pos =3D a41feb0
=C2=A0 =C2=A0passed=C2=A0 14/28=C2= =A0 threads-io-switch
=C2=A0 =C2=A0passed=C2=A0 15/28=C2=A0 threa= ds-is-one
[New Thread 20864.0x4e68]
[Thread 20864.0x4e6= 8 exited with code 0]
stack_pos =3D ac1feb0
=C2=A0 =C2= =A0passed=C2=A0 16/28=C2=A0 threads-join
=C2=A0 =C2=A0passed=C2= =A0 17/28=C2=A0 threads-join-self
[New Thread 20864.0x63f4]
=
[Thread 20864.0x63f4 exited with code 0]
stack_pos =3D b41fe= b0
=C2=A0 =C2=A0passed=C2=A0 18/28=C2=A0 threads-let-binding
[New Thread 20864.0x4340]

Thread 15 received= signal SIGSEGV, Segmentation fault.
[Switching to Thread 20864.0= x4340]
run_thread (state=3D0x400ae5e78 <dumped_data+4670360>= ;) at ../../emacs/src/thread.c:702
702=C2=A0 =C2=A0 =C2=A0 =C2=A0= self->m_stack_bottom =3D (char *) &stack_pos;


The value of stack_pos keeps=C2=A0 increasing. Isn't = there some limit that is reached here ?

Fabric= e

--001a113e4ca6acdfce055b35e10e--