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: master 64f2c96 2/2: Make a process test faster. Date: Sat, 9 Jan 2021 22:00:45 +0100 Message-ID: References: <20210102125533.3832.43853@vcs0.savannah.gnu.org> <20210102125536.C3FED2094D@vcs0.savannah.gnu.org> 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="1644"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Philipp Stephani , Emacs developers To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 09 22:02:08 2021 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 1kyLNA-0000H0-Qe for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Jan 2021 22:02:08 +0100 Original-Received: from localhost ([::1]:46622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kyLN9-0000Vi-LM for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Jan 2021 16:02:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyLM4-0008RE-BH for emacs-devel@gnu.org; Sat, 09 Jan 2021 16:01:00 -0500 Original-Received: from mail-oi1-x22e.google.com ([2607:f8b0:4864:20::22e]:37333) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kyLM2-0000qj-FR; Sat, 09 Jan 2021 16:01:00 -0500 Original-Received: by mail-oi1-x22e.google.com with SMTP id l207so15729696oib.4; Sat, 09 Jan 2021 13:00:57 -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=SIvQImvnFT4p9+ddEAnEdowV56dgT+DMf0zykVZmOT8=; b=Km6dXgmZO/EcfOCO+a/DvlbBAqn2laZibqhx7xTg21H9TUD0nBlLb2JcN3qRFLxim8 2qr012e0fghRiPQYehphZs9HLRiC33iupEi+J4jVS+ysnyxKiL56zldrJExccER1vUsA Y5Sua2yQaj37AkXWu9kw6u/sTJDB1CKp/hd3LvEs6tAXm3KICS6BZMmyZZBljBGIO71g 5ptNAu4q4+gI8fThavjnYatkfFOZ44R4h9HzW9Yq8Ybww7HI7o5JeLCSspGHbvL7SEy6 7BS+mdxkk305rbAB8sPgKlDkSSQZ6hpQpauQcnrcY3aeoNcxnO9wCFA18AV+lWheGVbe NEyw== 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=SIvQImvnFT4p9+ddEAnEdowV56dgT+DMf0zykVZmOT8=; b=dgW8nhQvo4WPINYuoxkvUVbQCs2p+UtBcg5XeB7VKqZkmLPE11Ft3kdfPkFt/Cqo8w BAgwkTb4AUF6avpI6gncZNttLVYDF2vKgdxz9gEYB8uRC6ZusMKO3Knvz7n8mnqFfCj/ 0kArmGazrfDbm+lvkcAwVZ9BN2QsHNxs00JTgs8ShNZgrk+TOKhpVvoZCGhqsZCixRgf EavKbK+CI/0mmvEy0FNtPMGLesSszyFT8tl+8iaDgTLJDOTda32jJgwW9DvV8FhnzJ9q oN6r/6oDh8lpHvciUvm90ImAIAZgbWh3nVQ9113S1VDn+wRmwEjsgwHMy9XOnsFkEGeJ 3V9A== X-Gm-Message-State: AOAM530CN8nC3fdAJxjkt6aWKPgST7gAENaqH1DK1WJ83BxJFEsXAZ1w r/COAHLS0ZPMOGtlj3ygZFzcK1UPk178Powbu7ZGyIFshEg= X-Google-Smtp-Source: ABdhPJzBOorprhbjIbfMNXfGcdkcPpCmOsUTRaqtEJw7nHq14bg7GGblSz027cAPJBjf2i16Hn+OHaKj+SqZk9xECOM= X-Received: by 2002:a54:4881:: with SMTP id r1mr5976540oic.9.1610226056639; Sat, 09 Jan 2021 13:00:56 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::22e; envelope-from=p.stephani2@gmail.com; helo=mail-oi1-x22e.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:262817 Archived-At: Am Sa., 9. Jan. 2021 um 19:12 Uhr schrieb Philipp Stephani : > > Am Fr., 8. Jan. 2021 um 02:38 Uhr schrieb Glenn Morris : > > > > > > It is now unstable, ie mostly passes but sometimes fails. > > > > Ref eg > > https://hydra.nixos.org/build/134561612 > > https://hydra.nixos.org/build/134556213 > > Interesting. I can't see why it would deadlock. OK, I think I've found 2 bugs. 1. I've introduced one myself when writing emacs_spawn - we need to mark processes as live before unblocking SIGCHLD, otherwise the SIGCHLD handler would never call waitpid for them. 2. The other one happens if SIGCHLD is signaled during wait_reading_process_output. Then wait_reading_process_output will wait forever, since the stdout FD never gets closed and it doesn't see the process status update in time. Not sure how to fix this - the most elegant way would be pidfd/pdfork, but that's not available on all systems.