From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (mail.openvz.org [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id 43B678045D for ; Mon, 2 Nov 2026 17:40:09 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6A2HcqJV027686; Mon, 2 Nov 2026 20:38:53 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6A2HcqJV027686 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=default; t=1793641134; bh=h/Lfb8jiG0N4rxrkFdXVPizLzE61RVwnn241UJphYdE=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe; b=Q0n7Hqtub2VzrXAwVWUavrqZKilPLs99NRi3+obQcy+uY2qwLsBSAMarPwAupKlyp lFSqG2Xs5/O7zamt2apdlNVjynoUdTga1LTRBB1LYSg868/Flsv+/Yp/qTBsiOo0gF L8tFNjoHLa78LQr0gII9xZkEXm9Jwt862XvNnx8YVt02ZO11Ug+b8jd481ep7UWhn0 Twf+OOD8tXGytgHQCZYnikxDhDfTE15a0Xb/ILaS2xKDBtyKkfG4/CESaIPt9ltOhP YuC+jS/g9CCfHfCD2R25d4XHFP9WkRysk4CvsGxHsaoXR+k6FYt6R2oTUWmLA7WsNr r0kgSeR7H0KCw== Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6A2HcpAp027682 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Mon, 2 Nov 2026 20:38:51 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6A2HcpAp027682 Authentication-Results: mail.openvz.org; dkim=pass (2048-bit key) header.d=openvz.org header.i=@openvz.org header.b="B2bNTPrC" Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-5be3e17e9ddso1313647e87.2 for ; Mon, 02 Nov 2026 09:38:51 -0800 (PST) X-Gm-Message-State: APuU4Z9PYT//+WSUfL8dcwL/Fal/hPijfaGePntKOsSs8BWWB/T/RwL7 pgj9y03IpSbxVIElDxY8LHJsPUwV6aVURqhWDL46KvWeGR1PwywjzbJVuVNEytCpwmtAWP0IkT4 zE3FYwpdGW7ACPA427VWg67Flyc/jNMwE6uSLsUc+sE8hDJ3iFDB4Wg== X-Gm-Gg: AYBFou2pOeXM6PdvjdbfQ/cnOQ0sWW1bx6KmLPkevrRY/1aqpDD91BZv/xymoUh4obO kHXReYJ+gPlufDZtOxA+H5beyrCy383XEsrrBL2pmWKYxh1TTs0yOKMRhW5O2UFGhbCcg9IgYAz 77HqGMOcBcor/P6/rvDqc9wupkPktDftqf7if6DRZfhQDrNttY5ISWL/SgmoLQUBQf90OeUZ7KR IfEyH1M30U0IQOySNSFNwP+oCPcQfwOChK0kUkJ3njl2/U33UY4l7EBbHhfJkqDvyJtCquinKHI CYBBEWe9cw== X-Received: by 2002:a05:600c:a41:b0:4a0:1c0e:b057 with SMTP id 5b1f17b1804b1-4ac150b2136mr231661085e9.4.1793639708560; Mon, 02 Nov 2026 09:15:08 -0800 (PST) X-Received: by 2002:a05:600c:a41:b0:4a0:1c0e:b057 with SMTP id 5b1f17b1804b1-4ac150b2136mr231660215e9.4.1793639707925; Mon, 02 Nov 2026 09:15:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1793639707; cv=none; d=google.com; s=arc-20260327; b=FjzWCJPoZQ+XIOOMSqM9enYvTcdeM03o//6Q6OZyXsZxrqzEzXVxUlh9xmLAiP8OTr 6ME8+tDgL9Tj4acIwbG5G6s4/kU2Y8sha2gA3G67wMK3zQ9GL/ZVXZPO7alQuIUqbVe5 k4/W0sL+2Ci/x3j0S8EvshFB201IL1fvT+J23oZt0fWE0h9N5UBzxzAmKSFtIzElnswC px9esTr6jPs7NllO2izpnxtk0qJghGZBP4VsMhREN9Aub6s5dzVAbuvbPWBv2FyaDJRP C2QaYMJXn3BLG14RrsQQZd0PeFuJ/7C+TKTMeyrsvoY20ucgSGkPGwY2Spy8y6jvXSU9 e6Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=48/3nBqoWK2qdW2rnTLVPDUC7/wpz6vx8HTydQbk8Io=; fh=ozrYJQ1t3QIP6s65KBq5xgJxiFM2qf+5wwn3ABTusyU=; b=Dy0SJfcmBvmvv5vuoudUiwuBJJYO/7L0aCOh7XHKZxO4DhgEWCItzbTLYJZHK3t/qD eg7xJPsQGopVvH5ShmYnoVjb5MO5Uk/UXZkiXJICYC+GKG/FMwEXQEhQaPL+X2FZXZVw VTnE8LLjSLeiD22R0J+hDKfUX7on3IMNnhMKVWE4bCbQVtsAf+6i8o+xE7ryCZd8C628 svQzvFPDEvLBuU2x4CRxPdcjtCV6uUuFgZ01nlOLcBRb7zw2ztWy2veqqWTsgfF8D8Po r8ZpvsT0gAgpOzOspmUAAOcjiHF6eI9cgzu1J/vb1Yl5jqY58zuMFzdbz4DiqMNbiE07 IX7w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=B2bNTPrC; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:91db:48d7:7451:652a as permitted sender) smtp.mailfrom=den@openvz.org; dara=neutral header.i=@openvz.org Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id ffacd0b85a97d-48e6ebab5c2sor1345085f8f.10.2026.11.02.09.15.07 for (Google Transport Security); Mon, 02 Nov 2026 09:15:07 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:91db:48d7:7451:652a as permitted sender) client-ip=2a06:5b06:b600:300:91db:48d7:7451:652a; Authentication-Results: mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=B2bNTPrC; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:91db:48d7:7451:652a as permitted sender) smtp.mailfrom=den@openvz.org; dara=neutral header.i=@openvz.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=google; t=1793639707; x=1794244507; darn=openvz.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=48/3nBqoWK2qdW2rnTLVPDUC7/wpz6vx8HTydQbk8Io=; b=B2bNTPrCGV0KKIuarOTAUgn75JwROz1hfCKPxgW/V/MxTH6Ku9Kb0nimNlp6ID+Eah EYXROR/x7V+UQ8K8A1GwETtGixsYtT4zHVyyrUzTgTvgkZt79ihjheRYNfQjN2Eta2gl ay9wGyGfjqpRZG9I5DluKSQa8uvfUd762wAvRxMy5LvvnNzxnVw4kfpwvyi6q+Gph7F3 UXhpjYHC9XO69yvIzihQayP06qQR8vFpuEEnIegGHnLYVlGdODMXJJhgagsQt944AVF9 RMjVSKdwdNMHe6GKFWh0QoHjnCnFVn3xLrv7DBWrtKbfYIPMPlo5Fm3FLpg2VI/+3EZ/ 75PA== X-Received: by 2002:a05:6000:468f:b0:48e:5444:a1d3 with SMTP id ffacd0b85a97d-48e6e2fa548mr14754974f8f.11.1793639707231; Mon, 02 Nov 2026 09:15:07 -0800 (PST) Received: from athena.sw.ru ([2a06:5b06:b600:300:91db:48d7:7451:652a]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e88876946sm2127084f8f.5.2026.11.02.09.15.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2026 09:15:06 -0800 (PST) From: "Denis V. Lunev" To: khorenko@virtuozzo.com Date: Mon, 2 Nov 2026 18:15:02 +0100 Message-ID: <20261102171504.3809155-1-den@openvz.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 0/2] ve/vtty: wait for a closing CT tty in the kernel, drop the EAGAIN return X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org Konstantin pointed out that the applied "ve/vtty: fix console attach failing with EBUSY while the CT closes the tty" fixes the race only for a vzctl which retries on EAGAIN, and every vzctl in the field does not. Following his suggestion, this series replaces it with a wait inside vtty_open_master(), as tty_open() does since 7f22f6c935cd. Patch 1 reverts the EAGAIN return, patch 2 waits for the closing pair. The vzctl change "vzctl console: retry opening a CT tty the CT is still closing" is no longer needed. A signal ends the wait with -ERESTARTSYS rather than -EAGAIN: the ioctl restarts under SA_RESTART and fails with EINTR otherwise, and EAGAIN does not leak back to userspace. Tested on dev-cl04, .22.15 with both patches, installed vzctl-10.0.147 which does not retry: - "vzctl console" in a loop while a loop in the CT opens and closes the same tty: 63 of 300 attaches fail with EBUSY on stock .22.11, all 300 attach with the series; - a second VE_CONFIGURE_OPEN_TTY while a console is attached still fails with EBUSY at once; - the same race under a 50 us SIGALRM storm does not hang: the interrupted opens fail with EINTR, and with SA_RESTART none fail; - ve_vtty_stress, without its EAGAIN allowance, passes; - nothing in dmesg. Denis V. Lunev (2): Revert "ve/vtty: fix console attach failing with EBUSY while the CT closes the tty" ve/vtty: wait for a closing CT tty instead of failing the console attach drivers/tty/pty.c | 16 ++++++++++++---- tools/testing/selftests/ve/ve_vtty_stress.c | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) -- 2.53.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel