From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36915 invoked by alias); 12 Aug 2019 13:44:00 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 36908 invoked by uid 89); 12 Aug 2019 13:44:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=falls, tab, 100000, screen X-HELO: conssluserg-06.nifty.com Received: from conssluserg-06.nifty.com (HELO conssluserg-06.nifty.com) (210.131.2.91) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Aug 2019 13:43:58 +0000 Received: from Express5800-S70 (ntsitm268057.sitm.nt.ngn.ppp.infoweb.ne.jp [125.1.110.57]) (authenticated) by conssluserg-06.nifty.com with ESMTP id x7CDhrWw025815 for ; Mon, 12 Aug 2019 22:43:54 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com x7CDhrWw025815 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1565617434; bh=Er4c/90CuwQur1lk9vsTkxwpdG00gWKK5JOKi1lWYP0=; h=Date:From:To:Subject:In-Reply-To:References:From; b=VzmD7rXXcQw4IJKcpiE6HC7tT84bs8x77j+yNbvrw8/TShm7wZkKf6ytN+Flk0/oY B5/zi2L06x7s7ZArdKXN5uECpa9H6RvvzjYcvaYHTcKLOH6qGXH8c+9Os3xQtRPVYJ sLhHCHFRu1XzXhfXcJ+yAumP3+A2Y7hEX0sZ/DcJ68fNsJ/QevDUPERhnn9RhfICza KNIF6HrG9544FPFAQdpLstixyQUTf87FfkMoA20mb1etXDeG8+kD4LLNL31uPZxg5v M0SkR7TOnjacuOm89HKSMka2Go+Ei5b7+AdXWpbt9tHB49oVZZZFT+Df1UHAef9pkI aUMLm8z25+PhQ== Date: Mon, 12 Aug 2019 13:44:00 -0000 From: Takashi Yano To: cygwin@cygwin.com Subject: Re: [ANNOUNCEMENT] TEST: Cygwin 3.1.0-0.1 Message-Id: <20190812224403.37e4ccfdcfb7046ed70fef16@nifty.ne.jp> In-Reply-To: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Mon__12_Aug_2019_22_44_03_+0900_R+4i2CLduQOKXFZV" X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg00148.txt.bz2 --Multipart=_Mon__12_Aug_2019_22_44_03_+0900_R+4i2CLduQOKXFZV Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-length: 1343 Hi Corinna, On Fri, 9 Aug 2019 20:53:38 +0200 Corinna Vinschen wrote: > Hi folks, > > > I uploaded a new Cygwin test release 3.1.0-0.1 > > This release comes with a couple of new features and quite a few > bug fixes. > > The most interesting change, courtesy Ken Brown, is a revamp of the > old FIFO code. It should now be possible to open FIFOs multiple times > for writing, something the old code failed on. > > > Please test. I tested this test release, and found a few problems. (1) The cursor position is not restored correctly after screen alternation in the case of xterm compatible mode is enabled. (2) fork() on console ocasionally falls into deadlock. (3) Horizontal tab setting on console is broken after resizing console window if xterm compatible mode is enabled. (4) Segmentation fault occurs in some cases regarding signalfd. I will propose patches for (1),(2) and (3) in the other posts. However, I can not find out the cause of problem (4). This seems to affect only 32bit version of cygwin. To reproduce (4), use a simple test case attached (signalfd-chk.c). Compile it and execute, then type 'q' or '^C' to stop it. This causes segmentation fault. I am not sure why, but, the patch attached (signalfd-segfault.diff) resolves the problem (4). Could you please have a look? --Multipart=_Mon__12_Aug_2019_22_44_03_+0900_R+4i2CLduQOKXFZV Content-Type: text/x-csrc; name="signalfd-chk.c" Content-Disposition: attachment; filename="signalfd-chk.c" Content-Transfer-Encoding: 7bit Content-length: 1298 #include #include #include #include #include #include int run() { struct termios tt; sigset_t sigset; pid_t pid; struct pollfd pfd[2]; int running = 1; tcgetattr(STDIN_FILENO, &tt); tt.c_lflag &= ~(ECHO|ICANON|ISIG); tcsetattr(STDIN_FILENO, TCSANOW, &tt); pid = fork(); if (pid == 0) { /* Child */ usleep(100000); return 0; } printf("Start: %d\n", pid); sigemptyset(&sigset); sigaddset(&sigset, SIGCHLD); sigprocmask(SIG_BLOCK, &sigset, NULL); pfd[0].fd = STDIN_FILENO; pfd[0].events = POLLIN; pfd[1].fd = signalfd(-1, &sigset, 0); pfd[1].events = POLLIN; do { poll(pfd, 2, -1); if (pfd[0].revents & POLLIN) { char c; int ret = read(pfd[0].fd, &c, 1); if (ret == 0 || c == 'q' || c == '\003') { running = 0; break; } } if (pfd[1].revents & POLLIN) { struct signalfd_siginfo info; int ret = read(pfd[1].fd, &info, sizeof(info)); if (ret) printf("Signal: %d\r\n", info.ssi_signo); if (info.ssi_signo == SIGCHLD) break; } } while (1); waitpid(pid, NULL, 0); printf("End: %d\n", pid); tcgetattr(STDIN_FILENO, &tt); tt.c_lflag |= ECHO|ICANON|ISIG; tcsetattr(STDIN_FILENO, TCSANOW, &tt); return running; } int main() { while (run()); return 0; } --Multipart=_Mon__12_Aug_2019_22_44_03_+0900_R+4i2CLduQOKXFZV Content-Type: text/plain; name="signalfd-segfault.diff" Content-Disposition: attachment; filename="signalfd-segfault.diff" Content-Transfer-Encoding: 7bit Content-length: 408 diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 1bb143a23..91c0bcc53 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -1887,7 +1887,7 @@ thread_signalfd (void *arg) switch (WaitForSingleObject (si->evt, INFINITE)) { case WAIT_OBJECT_0: - tls->signalfd_select_wait = NULL; + //tls->signalfd_select_wait = NULL; event = true; break; default: --Multipart=_Mon__12_Aug_2019_22_44_03_+0900_R+4i2CLduQOKXFZV Content-Type: text/plain; charset=us-ascii Content-length: 219 -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple --Multipart=_Mon__12_Aug_2019_22_44_03_+0900_R+4i2CLduQOKXFZV--