From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by sourceware.org (Postfix) with ESMTPS id 4306E3858C2C for ; Tue, 21 Dec 2021 14:21:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4306E3858C2C Received: by mail-lj1-x229.google.com with SMTP id r22so1936334ljk.11 for ; Tue, 21 Dec 2021 06:21:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=uP1U3Joc5O/rAYz76i2nv0dw5ALS1VaUgjytUtXOETs=; b=UwG3EcEmM80DABHIu/FiXQEI9LxV54rp2LgvQh4dhfiB7jQX6v4wtGggbXqZWhPOLx fAfE64YlqpDMHhx0t04ebqzu8/lmwjyxuO33BlLdBGT6p1tyJAMQMJ+4+tiLmXWxjtEV kjLjUuD4RLlLmJIbWfgNIJohGbyptRstmY2+YwdQitRDJzN7QN2nwdPyOdawo8+F+xcy eniaO7Vj6BR0XumDGgpOoTPy1Occd8V714iDEfIcSuwa37S0mSFNg2rabfxS/dRgRpmK BA7CY/ifeGVmQ55xIPHb6fVGch1Ucfr1cd0OUTNln8vFT7cclE3dFjsCcohzFta5571o yikQ== X-Gm-Message-State: AOAM531u5Bo2DBUmJ97KP7/se8FD5hDF2JcNBXvek0PsFvZdi//0W4Xs +BynpBzcAK1IY5pmIGy8GUP7uvvpUnvp X-Google-Smtp-Source: ABdhPJzcBocptRIeHUBFRifAl0bPr0o6t3+zvIL+PLOXBYtrG0xRus2qzx/j9W+ugwR71DTj6fFX1Q== X-Received: by 2002:a2e:9805:: with SMTP id a5mr2222842ljj.493.1640096502067; Tue, 21 Dec 2021 06:21:42 -0800 (PST) Received: from [192.168.0.135] ([185.30.228.158]) by smtp.gmail.com with ESMTPSA id e17sm2725261lfr.296.2021.12.21.06.21.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Dec 2021 06:21:41 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: [TCWG CI] Regression caused by newlib: Cygwin: pty: Fix input switching failure. From: Maxim Kuvyrkov In-Reply-To: <1469739579.6057.1639920949795@jenkins.jenkins> Date: Tue, 21 Dec 2021 17:21:41 +0300 Cc: gcc-regression@gcc.gnu.org Content-Transfer-Encoding: quoted-printable Message-Id: <9303480D-5991-4C9F-ABD8-A4839D9D43C6@linaro.org> References: <1469739579.6057.1639920949795@jenkins.jenkins> To: Takashi Yano X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_LOTSOFHASH, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-regression@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-regression mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Dec 2021 14:21:45 -0000 Hello Yano-san, This was sent out due to a bug in our CI. Sorry for the noise. Regards, -- Maxim Kuvyrkov https://www.linaro.org > On 19 Dec 2021, at 16:35, ci_notify@linaro.org wrote: >=20 > [TCWG CI] Regression caused by newlib: Cygwin: pty: Fix input = switching failure.: > commit 80f4b7d5456ea17d64998805fb3d64db091201fc > Author: Takashi Yano >=20 > Cygwin: pty: Fix input switching failure. >=20 > Results regressed to > # reset_artifacts: > -10 > # build_abe binutils: > -9 > # build_abe stage1 -- --set = gcc_override_configure=3D--disable-libsanitizer --set = gcc_override_configure=3D--disable-multilib --set = gcc_override_configure=3D--with-cpu=3Dcortex-m4 --set = gcc_override_configure=3D--with-mode=3Dthumb --set = gcc_override_configure=3D--with-float=3Dhard: > -8 > # build_abe newlib: > -6 > # build_abe stage2 -- --set = gcc_override_configure=3D--disable-libsanitizer --set = gcc_override_configure=3D--disable-multilib --set = gcc_override_configure=3D--with-cpu=3Dcortex-m4 --set = gcc_override_configure=3D--with-mode=3Dthumb --set = gcc_override_configure=3D--with-float=3Dhard: > -5 > # benchmark -- -O2_LTO_mthumb = artifacts/build-80f4b7d5456ea17d64998805fb3d64db091201fc/results_id: > 1 >=20 > from > # reset_artifacts: > -10 > # build_abe binutils: > -9 > # build_abe stage1 -- --set = gcc_override_configure=3D--disable-libsanitizer --set = gcc_override_configure=3D--disable-multilib --set = gcc_override_configure=3D--with-cpu=3Dcortex-m4 --set = gcc_override_configure=3D--with-mode=3Dthumb --set = gcc_override_configure=3D--with-float=3Dhard: > -8 > # build_abe newlib: > -6 > # build_abe stage2 -- --set = gcc_override_configure=3D--disable-libsanitizer --set = gcc_override_configure=3D--disable-multilib --set = gcc_override_configure=3D--with-cpu=3Dcortex-m4 --set = gcc_override_configure=3D--with-mode=3Dthumb --set = gcc_override_configure=3D--with-float=3Dhard: > -5 > # benchmark -- -O2_LTO_mthumb artifacts/build-baseline/results_id: > 1 >=20 > THIS IS THE END OF INTERESTING STUFF. BELOW ARE LINKS TO BUILDS, = REPRODUCTION INSTRUCTIONS, AND THE RAW COMMIT. >=20 > This commit has regressed these CI configurations: > - tcwg_bmk_gnu_eabi_stm32/gnu_eabi-master-arm_eabi-coremark-O2_LTO >=20 > First_bad build: = https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_e= abi-master-arm_eabi-coremark-O2_LTO/14/artifact/artifacts/build-80f4b7d545= 6ea17d64998805fb3d64db091201fc/ > Last_good build: = https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_e= abi-master-arm_eabi-coremark-O2_LTO/14/artifact/artifacts/build-0795f704f7= 50e4b441aa256b1b849e4ebe3af684/ > Baseline build: = https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_e= abi-master-arm_eabi-coremark-O2_LTO/14/artifact/artifacts/build-baseline/ > Even more details: = https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_e= abi-master-arm_eabi-coremark-O2_LTO/14/artifact/artifacts/ >=20 > Reproduce builds: > > mkdir investigate-newlib-80f4b7d5456ea17d64998805fb3d64db091201fc > cd investigate-newlib-80f4b7d5456ea17d64998805fb3d64db091201fc >=20 > # Fetch scripts > git clone https://git.linaro.org/toolchain/jenkins-scripts >=20 > # Fetch manifests and test.sh script > mkdir -p artifacts/manifests > curl -o artifacts/manifests/build-baseline.sh = https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_e= abi-master-arm_eabi-coremark-O2_LTO/14/artifact/artifacts/manifests/build-= baseline.sh --fail > curl -o artifacts/manifests/build-parameters.sh = https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_e= abi-master-arm_eabi-coremark-O2_LTO/14/artifact/artifacts/manifests/build-= parameters.sh --fail > curl -o artifacts/test.sh = https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_e= abi-master-arm_eabi-coremark-O2_LTO/14/artifact/artifacts/test.sh --fail > chmod +x artifacts/test.sh >=20 > # Reproduce the baseline build (build all pre-requisites) > ./jenkins-scripts/tcwg_bmk-build.sh @@ = artifacts/manifests/build-baseline.sh >=20 > # Save baseline build state (which is then restored in = artifacts/test.sh) > mkdir -p ./bisect > rsync -a --del --delete-excluded --exclude /bisect/ --exclude = /artifacts/ --exclude /newlib/ ./ ./bisect/baseline/ >=20 > cd newlib >=20 > # Reproduce first_bad build > git checkout --detach 80f4b7d5456ea17d64998805fb3d64db091201fc > ../artifacts/test.sh >=20 > # Reproduce last_good build > git checkout --detach 0795f704f750e4b441aa256b1b849e4ebe3af684 > ../artifacts/test.sh >=20 > cd .. > >=20 > Full commit (up to 1000 lines): > > commit 80f4b7d5456ea17d64998805fb3d64db091201fc > Author: Takashi Yano > Date: Wed Dec 15 12:25:58 2021 +0900 >=20 > Cygwin: pty: Fix input switching failure. >=20 > - This patch fixes the failure of input switching between io_handle > and io_handle_nat. This very rarely happens, however, input is > wrongly switched to io_handle_nat even though the non-cygwin app > is in the background. > --- > winsup/cygwin/fhandler_tty.cc | 3 +++ > winsup/cygwin/tty.cc | 3 ++- > 2 files changed, 5 insertions(+), 1 deletion(-) >=20 > diff --git a/winsup/cygwin/fhandler_tty.cc = b/winsup/cygwin/fhandler_tty.cc > index ee687d9adf..c8ad53cb78 100644 > --- a/winsup/cygwin/fhandler_tty.cc > +++ b/winsup/cygwin/fhandler_tty.cc > @@ -1056,6 +1056,7 @@ fhandler_pty_slave::set_switch_to_pcon (void) > isHybrid =3D true; > setup_locale (); > myself->exec_dwProcessId =3D myself->dwProcessId; > + myself->process_state |=3D PID_NEW_PG; /* Marker for pcon_fg */ > bool nopcon =3D (disable_pcon || !term_has_pcon_cap (NULL)); > WaitForSingleObject (pcon_mutex, INFINITE); > bool pcon_enabled =3D setup_pseudoconsole (nopcon); > @@ -1168,6 +1169,7 @@ fhandler_pty_slave::reset_switch_to_pcon (void) > } > } > myself->exec_dwProcessId =3D 0; > + myself->process_state &=3D ~PID_NEW_PG; > isHybrid =3D false; > } > } > @@ -2272,6 +2274,7 @@ fhandler_pty_master::write (const void *ptr, = size_t len) > _pinfo *p =3D pids[i]; > if (p->ctty =3D=3D get_ttyp ()->ntty > && p->pgid =3D=3D get_ttyp ()->getpgid () > + && (p->process_state & PID_NOTCYGWIN) > && (p->process_state & PID_NEW_PG)) > { > wpid =3D p->dwProcessId; > diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc > index 2566f4c457..11ad3ec51f 100644 > --- a/winsup/cygwin/tty.cc > +++ b/winsup/cygwin/tty.cc > @@ -392,7 +392,8 @@ tty::pcon_fg (pid_t pgid) > for (unsigned i =3D 0; i < pids.npids; i++) > { > _pinfo *p =3D pids[i]; > - if (p->ctty =3D=3D ntty && p->pgid =3D=3D pgid && = p->exec_dwProcessId) > + if (p->ctty =3D=3D ntty && p->pgid =3D=3D pgid > + && (p->process_state & (PID_NOTCYGWIN | PID_NEW_PG))) > return true; > } > if (pgid > MAX_PID) >