From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iN93JT2+82IEXAAAbAwnHQ (envelope-from ) for ; Wed, 10 Aug 2022 16:18:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id +PhNJT2+82I3+wAA9RJhRA (envelope-from ) for ; Wed, 10 Aug 2022 16:18:37 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 499543C673 for ; Wed, 10 Aug 2022 16:18:37 +0200 (CEST) Received: from localhost ([::1]:51724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLmXc-0005u5-Bw for larch@yhetil.org; Wed, 10 Aug 2022 10:18:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLm0A-0003nt-I5 for bug-guix@gnu.org; Wed, 10 Aug 2022 09:44:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57209) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLm0A-0000Ac-7Q for bug-guix@gnu.org; Wed, 10 Aug 2022 09:44:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oLm0A-0005sw-1u for bug-guix@gnu.org; Wed, 10 Aug 2022 09:44:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#57095: another "inappropriate ioctl" bug :) Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 10 Aug 2022 13:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57095 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Csepp , 57095@debbugs.gnu.org Received: via spool by 57095-submit@debbugs.gnu.org id=B57095.166013901222579 (code B ref 57095); Wed, 10 Aug 2022 13:44:02 +0000 Received: (at 57095) by debbugs.gnu.org; 10 Aug 2022 13:43:32 +0000 Received: from localhost ([127.0.0.1]:46958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLlzg-0005s7-6r for submit@debbugs.gnu.org; Wed, 10 Aug 2022 09:43:32 -0400 Received: from jpoiret.xyz ([206.189.101.64]:41836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLlzV-0005ro-K4 for 57095@debbugs.gnu.org; Wed, 10 Aug 2022 09:43:31 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id A93F5184F2C; Wed, 10 Aug 2022 13:43:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1660139000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=esvlO3QoUIJTDhuQjFlJx7ghQb7/btOOknAxZ+lJHHg=; b=P2xj+Wm7yrWNvWpP0Zi6x6D4Rzrs+90H3KS0+v9BLiRrcXBJXQ86wqCLwr/d1Dv9Lxr+36 ElQywRNRjYtLR6EEVNUEhNKAbn43NfLsW04zTE+Z2hiZ+C9kY8XwxJFwOWBFDjppDsMKPF RevJAObF0NGhA1R5eJ2eR4oZ4YxSWeI06uLV0Y0GtOiIBmap8hw7AhGnHB8SGKn8m6dym2 m2bQf4+Q9COsEque4vMXO2+yOhnjvGfYVangVxMuagX5732vCqGIzhOlGP1udGi/qV69tA yowTyIs63/CskSRHjGEJAzj20svML1NRe6EZASsg9QQh/7C2bPEPOcTl1J7rCQ== In-Reply-To: <874jylf1v8.fsf@riseup.net> References: <874jylf1v8.fsf@riseup.net> Date: Wed, 10 Aug 2022 15:43:18 +0200 Message-ID: <87bkssjjt5.fsf@jpoiret.xyz> MIME-Version: 1.0 Content-Type: text/plain X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" Reply-to: Josselin Poiret From: Josselin Poiret via Bug reports for GNU Guix X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1660141117; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=esvlO3QoUIJTDhuQjFlJx7ghQb7/btOOknAxZ+lJHHg=; b=dtN5P16xfXIHBhi63icRuzMRl5HKIMkY7U4ZcevwWB/xyZGNZmTxiyKCDEPNwA0sojzZI+ s1XVSPDVP+FTjKeoGz7vCppcxRE4Bz/GhcoEu/uGn5CXpz2rqFlwTF6xeDOCrzlujXThhf Y/ca5GB4kMbWewlRPNIKezxOLuIecigZioBoCDojjxz7KPmE7e7ebb22+5VWM9xZ+18igG RApXJdbfTqd9DwsLOLpl1rL+XUv9YEietPvy+Kar4ZUdBxE5bs8ZZwhYSu1z1M3GzroCNe O6BCt+s/RlM71KsGQWWp7jzMT3C5jJmraQK2VQ6XNJ87hzNs65glCJdFiZ8phQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660141117; a=rsa-sha256; cv=none; b=FdNRqq7pQ86LCjQP4G23Slda76R6bW/fmGlDs0d76gzw+6VsPyljUoQPzedxXuT2OZh9OT 8Rxdda5NMac/V1zbw1vS7DwYkyC/vaOJP/zXPMwdE8HRhg2d/j+8ai4ZmcXI1a4goifYU3 5k1E9i3hFBmOQ+MhhBoM2qm3pCu7+ybWnvH3F6Gh9vMb1+vsJtkZwvl6yImk8EbuAtNfsX 5lUGev+Zm5jZQa0si7MXHYsGFfGjqbfBi1xHze3tiCNmlHnSnbWrJdCG1NUnXXk6GUp0GR 6FGoxpoSzxRPYadn8EqyTS6bJxdoCAmvmnVU7KVaPnCih2Up7GeyoTZqIjEmwQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b=P2xj+Wm7; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.89 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b=P2xj+Wm7; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 499543C673 X-Spam-Score: -1.89 X-Migadu-Scanner: scn1.migadu.com X-TUID: zfr2pL7yzINb Hi! Csepp writes: > ``` > ./pre-inst-env guix import pypi -r linode-cli | tee -a gnu/packages/python-xyz.scm > > ... > In guix/build/syscalls.scm: > 2284:35 1 (_) > 2273:8 0 (terminal-window-size _) > > guix/build/syscalls.scm:2273:8: In procedure terminal-window-size: > In procedure terminal-window-size: Inappropriate ioctl for device > ``` > > I assume the progress bar code does not gracefully handle the very > common case when stdout is not a terminal. There is some code in place to handle this issue, and it works most of the time, but not here. The issue is that we handle any error coming from ioctl by first throwing a `'system-error`, and handling it with a `catch` that checks whether the errno is ENOTTY (and deprecated equivalents) and in that case falls back to a good default. In the case where the error is not of that type, it is rethrown. This works well in most cases, but here comes the Guile shenanigans: We also use a big wrapping `with-error-handling` to display errors properly in the case when they are not caught. The difference is that `with-error-handling` adds a non-unwinding handler, while catch is unwinding. My first thought was that non-unwinding handlers, even outer ones would get priority over unwinding ones, since once the stack's unwound you can't really go back (I have no idea if that last part is actually true). In practice this is actually false, I tested with a very simple example, but that lead me to test by setting `#:unwind? #t` for the `guard*` definition in guix/ui.scm and the issue went away, so I'm clueless as to why this happens. What seems weird is that the error is not caught at all! Does anyone have a clue? Best, -- Josselin Poiret