public inbox for gcc-regression@sourceware.org
help / color / mirror / Atom feed
* [TCWG CI] Regression caused by newlib: Cygwin: pty: Fix conditions for input transfer.
@ 2021-12-17 17:30 ci_notify
  0 siblings, 0 replies; only message in thread
From: ci_notify @ 2021-12-17 17:30 UTC (permalink / raw)
  To: Takashi Yano; +Cc: gcc-regression

[TCWG CI] Regression caused by newlib: Cygwin: pty: Fix conditions for input transfer.:
commit 720234b78afb4a972c3cea4ae22d181ea83568cc
Author: Takashi Yano <takashi.yano@nifty.ne.jp>

    Cygwin: pty: Fix conditions for input transfer.

Results regressed to
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_abe stage1 -- --set gcc_override_configure=--disable-libsanitizer --set gcc_override_configure=--disable-multilib --set gcc_override_configure=--with-cpu=cortex-m4 --set gcc_override_configure=--with-mode=thumb --set gcc_override_configure=--with-float=hard:
-8
# build_abe newlib:
-6
# build_abe stage2 -- --set gcc_override_configure=--disable-libsanitizer --set gcc_override_configure=--disable-multilib --set gcc_override_configure=--with-cpu=cortex-m4 --set gcc_override_configure=--with-mode=thumb --set gcc_override_configure=--with-float=hard:
-5
# benchmark -- -O3_LTO_mthumb artifacts/build-720234b78afb4a972c3cea4ae22d181ea83568cc/results_id:
1

from
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_abe stage1 -- --set gcc_override_configure=--disable-libsanitizer --set gcc_override_configure=--disable-multilib --set gcc_override_configure=--with-cpu=cortex-m4 --set gcc_override_configure=--with-mode=thumb --set gcc_override_configure=--with-float=hard:
-8
# build_abe newlib:
-6
# build_abe stage2 -- --set gcc_override_configure=--disable-libsanitizer --set gcc_override_configure=--disable-multilib --set gcc_override_configure=--with-cpu=cortex-m4 --set gcc_override_configure=--with-mode=thumb --set gcc_override_configure=--with-float=hard:
-5
# benchmark -- -O3_LTO_mthumb artifacts/build-baseline/results_id:
1

THIS IS THE END OF INTERESTING STUFF.  BELOW ARE LINKS TO BUILDS, REPRODUCTION INSTRUCTIONS, AND THE RAW COMMIT.

This commit has regressed these CI configurations:
 - tcwg_bmk_gnu_eabi_stm32/gnu_eabi-master-arm_eabi-coremark-O3_LTO

First_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_eabi-master-arm_eabi-coremark-O3_LTO/12/artifact/artifacts/build-720234b78afb4a972c3cea4ae22d181ea83568cc/
Last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_eabi-master-arm_eabi-coremark-O3_LTO/12/artifact/artifacts/build-ff71c3fcdb9807fee8d9e5f898694ba56a02a013/
Baseline build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_eabi-master-arm_eabi-coremark-O3_LTO/12/artifact/artifacts/build-baseline/
Even more details: https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_eabi-master-arm_eabi-coremark-O3_LTO/12/artifact/artifacts/

Reproduce builds:
<cut>
mkdir investigate-newlib-720234b78afb4a972c3cea4ae22d181ea83568cc
cd investigate-newlib-720234b78afb4a972c3cea4ae22d181ea83568cc

# Fetch scripts
git clone https://git.linaro.org/toolchain/jenkins-scripts

# 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_eabi-master-arm_eabi-coremark-O3_LTO/12/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_eabi-master-arm_eabi-coremark-O3_LTO/12/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_eabi-master-arm_eabi-coremark-O3_LTO/12/artifact/artifacts/test.sh --fail
chmod +x artifacts/test.sh

# Reproduce the baseline build (build all pre-requisites)
./jenkins-scripts/tcwg_bmk-build.sh @@ artifacts/manifests/build-baseline.sh

# 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/

cd newlib

# Reproduce first_bad build
git checkout --detach 720234b78afb4a972c3cea4ae22d181ea83568cc
../artifacts/test.sh

# Reproduce last_good build
git checkout --detach ff71c3fcdb9807fee8d9e5f898694ba56a02a013
../artifacts/test.sh

cd ..
</cut>

Full commit (up to 1000 lines):
<cut>
commit 720234b78afb4a972c3cea4ae22d181ea83568cc
Author: Takashi Yano <takashi.yano@nifty.ne.jp>
Date:   Tue Dec 14 11:58:26 2021 +0900

    Cygwin: pty: Fix conditions for input transfer.
    
    - The recent commit "Cygwin: pty: Add missing input transfer when
      switch_to_pcon_in state." causes regression that rlwrap cannot
      work with cmd.exe. This patch fixes the issue.
---
 winsup/cygwin/fhandler.h      |  2 +-
 winsup/cygwin/fhandler_tty.cc | 30 +++++++++++++++---------------
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index c838d15a23..4f70c4c0b6 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -2279,6 +2279,7 @@ class fhandler_pty_common: public fhandler_termios
   static DWORD get_console_process_id (DWORD pid, bool match,
 				       bool cygwin = false,
 				       bool stub_only = false);
+  bool to_be_read_from_pcon (void);
 
  protected:
   static BOOL process_opost_output (HANDLE h, const void *ptr, ssize_t& len,
@@ -2445,7 +2446,6 @@ public:
     fh->copy_from (this);
     return fh;
   }
-  bool to_be_read_from_pcon (void);
   void get_master_thread_param (master_thread_param_t *p);
   void get_master_fwd_thread_param (master_fwd_thread_param_t *p);
   void set_mask_flusho (bool m) { get_ttyp ()->mask_flusho = m; }
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 5ec5b235d1..5e76b51c51 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -1176,21 +1176,12 @@ fhandler_pty_slave::reset_switch_to_pcon (void)
     return;
   if (get_ttyp ()->pcon_start)
     return;
-  /* This input transfer is needed if non-cygwin app is terminated
-     by Ctrl-C or killed. */
-  WaitForSingleObject (input_mutex, INFINITE);
-  if (!get_ttyp ()->pcon_fg (get_ttyp ()->getpgid ())
-      && get_ttyp ()->switch_to_pcon_in && !get_ttyp ()->pcon_activated
-      && get_ttyp ()->pcon_input_state_eq (tty::to_nat))
-    transfer_input (tty::to_cyg, get_handle_nat (), get_ttyp (),
-		    input_available_event);
-  ReleaseMutex (input_mutex);
   WaitForSingleObject (pcon_mutex, INFINITE);
   if (!pcon_pid_self (get_ttyp ()->pcon_pid)
       && pcon_pid_alive (get_ttyp ()->pcon_pid))
     {
       /* There is a process which is grabbing pseudo console. */
-      if (get_ttyp ()->pcon_activated
+      if (!to_be_read_from_pcon () && get_ttyp ()->pcon_activated
 	  && get_ttyp ()->pcon_input_state_eq (tty::to_nat))
 	{
 	  HANDLE pcon_owner =
@@ -1226,6 +1217,14 @@ fhandler_pty_slave::reset_switch_to_pcon (void)
       ReleaseMutex (pcon_mutex);
       return;
     }
+  /* This input transfer is needed if non-cygwin app is terminated
+     by Ctrl-C or killed. */
+  WaitForSingleObject (input_mutex, INFINITE);
+  if (get_ttyp ()->switch_to_pcon_in && !get_ttyp ()->pcon_activated
+      && get_ttyp ()->pcon_input_state_eq (tty::to_nat))
+    transfer_input (tty::to_cyg, get_handle_nat (), get_ttyp (),
+		    input_available_event);
+  ReleaseMutex (input_mutex);
   get_ttyp ()->pcon_input_state = tty::to_cyg;
   get_ttyp ()->pcon_pid = 0;
   get_ttyp ()->switch_to_pcon_in = false;
@@ -1288,14 +1287,15 @@ fhandler_pty_slave::mask_switch_to_pcon_in (bool mask, bool xfer)
 
   /* This is needed when cygwin-app is started from non-cygwin app if
      pseudo console is disabled. */
-  bool need_xfer = get_ttyp ()->pcon_fg (get_ttyp ()->getpgid ()) && mask
-    && get_ttyp ()->switch_to_pcon_in && !get_ttyp ()->pcon_activated;
+  bool need_xfer =
+    get_ttyp ()->switch_to_pcon_in && !get_ttyp ()->pcon_activated;
 
   /* In GDB, transfer input based on setpgid() does not work because
      GDB may not set terminal process group properly. Therefore,
      transfer input here if isHybrid is set. */
-  if ((isHybrid || need_xfer) && !!masked != mask && xfer
-      && GetStdHandle (STD_INPUT_HANDLE) == get_handle ())
+  bool need_gdb_xfer =
+    isHybrid && GetStdHandle (STD_INPUT_HANDLE) == get_handle ();
+  if (!!masked != mask && xfer && (need_gdb_xfer || need_xfer))
     {
       if (mask && get_ttyp ()->pcon_input_state_eq (tty::to_nat))
 	transfer_input (tty::to_cyg, get_handle_nat (), get_ttyp (),
@@ -1308,7 +1308,7 @@ fhandler_pty_slave::mask_switch_to_pcon_in (bool mask, bool xfer)
 }
 
 bool
-fhandler_pty_master::to_be_read_from_pcon (void)
+fhandler_pty_common::to_be_read_from_pcon (void)
 {
   if (!get_ttyp ()->switch_to_pcon_in)
     return false;
</cut>
>From hjl@sc.intel.com  Fri Dec 17 18:46:43 2021
Return-Path: <hjl@sc.intel.com>
X-Original-To: gcc-regression@gcc.gnu.org
Delivered-To: gcc-regression@gcc.gnu.org
Received: from mga06.intel.com (mga06.intel.com [134.134.136.31])
 by sourceware.org (Postfix) with ESMTPS id 878FA3858014
 for <gcc-regression@gcc.gnu.org>; Fri, 17 Dec 2021 18:46:41 +0000 (GMT)
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 878FA3858014
X-IronPort-AV: E=McAfee;i="6200,9189,10201"; a="300584867"
X-IronPort-AV: E=Sophos;i="5.88,214,1635231600"; d="scan'208";a="300584867"
Received: from orsmga007.jf.intel.com ([10.7.209.58])
 by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 17 Dec 2021 10:46:40 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.88,214,1635231600"; d="scan'208";a="506870053"
Received: from scymds02.sc.intel.com ([10.82.73.244])
 by orsmga007.jf.intel.com with ESMTP; 17 Dec 2021 10:46:40 -0800
Received: from gnu-ivb-1.sc.intel.com (gnu-ivb-1.sc.intel.com [172.25.70.227])
 by scymds02.sc.intel.com with ESMTP id 1BHIkeGI002620;
 Fri, 17 Dec 2021 10:46:40 -0800
Received: by gnu-ivb-1.sc.intel.com (Postfix, from userid 1000)
 id 388E112004D; Fri, 17 Dec 2021 10:46:40 -0800 (PST)
Date: Fri, 17 Dec 2021 10:46:40 -0800
To: skpgkp2@gmail.com, hjl.tools@gmail.com, gcc-regression@gcc.gnu.org
Subject: Regressions on master at commit r12-6041 vs commit r12-6022 on
 Linux/i686
User-Agent: Heirloom mailx 12.5 7/5/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <20211217184640.388E112004D@gnu-ivb-1.sc.intel.com>
From: "H.J. Lu" <hjl@sc.intel.com>
X-Spam-Status: No, score=-3468.2 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
 KAM_LAZY_DOMAIN_SECURITY, KAM_NUMSUBJECT, SPF_HELO_NONE, SPF_NONE,
 TXREP autolearn=no 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 <gcc-regression.gcc.gnu.org>
List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-regression>,
 <mailto:gcc-regression-request@gcc.gnu.org?subject=unsubscribe>
List-Archive: <https://gcc.gnu.org/pipermail/gcc-regression/>
List-Post: <mailto:gcc-regression@gcc.gnu.org>
List-Help: <mailto:gcc-regression-request@gcc.gnu.org?subject=help>
List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-regression>,
 <mailto:gcc-regression-request@gcc.gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 17 Dec 2021 18:46:43 -0000

New failures:
FAIL: gcc.c-torture/execute/builtins/memcpy-chk.c execution,  -O1 
FAIL: gcc.c-torture/execute/builtins/memcpy-chk.c execution,  -O2 
FAIL: gcc.c-torture/execute/builtins/memcpy-chk.c execution,  -O2 -flto -fno-use-linker-plugin -flto-partition=none 
FAIL: gcc.c-torture/execute/builtins/memcpy-chk.c execution,  -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects 
FAIL: gcc.c-torture/execute/builtins/memcpy-chk.c execution,  -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions 
FAIL: gcc.c-torture/execute/builtins/memcpy-chk.c execution,  -O3 -g 
FAIL: gcc.c-torture/execute/builtins/memcpy-chk.c execution,  -Og -g 
FAIL: gcc.c-torture/execute/builtins/memcpy-chk.c execution,  -Os 
FAIL: gcc.c-torture/execute/builtins/memmove-chk.c execution,  -O1 
FAIL: gcc.c-torture/execute/builtins/memmove-chk.c execution,  -O2 
FAIL: gcc.c-torture/execute/builtins/memmove-chk.c execution,  -O2 -flto -fno-use-linker-plugin -flto-partition=none 
FAIL: gcc.c-torture/execute/builtins/memmove-chk.c execution,  -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects 
FAIL: gcc.c-torture/execute/builtins/memmove-chk.c execution,  -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions 
FAIL: gcc.c-torture/execute/builtins/memmove-chk.c execution,  -O3 -g 
FAIL: gcc.c-torture/execute/builtins/memmove-chk.c execution,  -Og -g 
FAIL: gcc.c-torture/execute/builtins/memmove-chk.c execution,  -Os 
FAIL: gcc.c-torture/execute/builtins/mempcpy-chk.c execution,  -O1 
FAIL: gcc.c-torture/execute/builtins/mempcpy-chk.c execution,  -O2 
FAIL: gcc.c-torture/execute/builtins/mempcpy-chk.c execution,  -O2 -flto -fno-use-linker-plugin -flto-partition=none 
FAIL: gcc.c-torture/execute/builtins/mempcpy-chk.c execution,  -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects 
FAIL: gcc.c-torture/execute/builtins/mempcpy-chk.c execution,  -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions 
FAIL: gcc.c-torture/execute/builtins/mempcpy-chk.c execution,  -O3 -g 
FAIL: gcc.c-torture/execute/builtins/mempcpy-chk.c execution,  -Og -g 
FAIL: gcc.c-torture/execute/builtins/mempcpy-chk.c execution,  -Os 
FAIL: gcc.c-torture/execute/builtins/memset-chk.c execution,  -O1 
FAIL: gcc.c-torture/execute/builtins/memset-chk.c execution,  -O2 
FAIL: gcc.c-torture/execute/builtins/memset-chk.c execution,  -O2 -flto -fno-use-linker-plugin -flto-partition=none 
FAIL: gcc.c-torture/execute/builtins/memset-chk.c execution,  -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects 
FAIL: gcc.c-torture/execute/builtins/memset-chk.c execution,  -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions 
FAIL: gcc.c-torture/execute/builtins/memset-chk.c execution,  -O3 -g 
FAIL: gcc.c-torture/execute/builtins/memset-chk.c execution,  -Og -g 
FAIL: gcc.c-torture/execute/builtins/memset-chk.c execution,  -Os 
FAIL: gcc.c-torture/execute/builtins/stpcpy-chk.c execution,  -O1 
FAIL: gcc.c-torture/execute/builtins/stpcpy-chk.c execution,  -O2 
FAIL: gcc.c-torture/execute/builtins/stpcpy-chk.c execution,  -O2 -flto -fno-use-linker-plugin -flto-partition=none 
FAIL: gcc.c-torture/execute/builtins/stpcpy-chk.c execution,  -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects 
FAIL: gcc.c-torture/execute/builtins/stpcpy-chk.c execution,  -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions 
FAIL: gcc.c-torture/execute/builtins/stpcpy-chk.c execution,  -O3 -g 
FAIL: gcc.c-torture/execute/builtins/stpcpy-chk.c execution,  -Og -g 
FAIL: gcc.c-torture/execute/builtins/stpcpy-chk.c execution,  -Os 
FAIL: gcc.dg/builtin-dynamic-object-size-1.c execution test
FAIL: gcc.dg/builtin-dynamic-object-size-2.c execution test
FAIL: gcc.dg/builtin-object-size-1.c execution test
FAIL: gcc.dg/builtin-object-size-2.c execution test

New passes:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-17 17:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-17 17:30 [TCWG CI] Regression caused by newlib: Cygwin: pty: Fix conditions for input transfer ci_notify

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).