From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (unknown [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id 6879380024 for ; Thu, 27 Aug 2026 12:30:18 +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 67RCSusG000339; Thu, 27 Aug 2026 15:28:57 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 67RCSusG000339 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="Se5usvaf" Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 67RCStwd000335 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Thu, 27 Aug 2026 15:28:55 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 67RCStwd000335 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-495569acf8dso9564075e9.1 for ; Thu, 27 Aug 2026 05:28:55 -0700 (PDT) X-Gm-Message-State: AFuF++n4xMoxOAw9/OLcQ9W3H9duWw7RpJjQDusp9dOsSkXMLX4cIRm5 cYGzo/mUW2uo/YwfYQH4goK6QXUsBMrjHgf0nMAD6JyW5GscLh+JyNaXIzWiVNDxQV4ThWC1va+ PXHBcxYsJE6z+9D/E2Lj9kKVzKvfnRXgwlfkyjklTbuecCp0p+8r/Dw== X-Gm-Gg: AR+sD12mWhH+96WwsOlOlOBc/DmPxE1/GqZv3sj8CMaSvr3EHpgC+x9z30XY/YfK53h ib+l/cOXOWysTJiHUULkFzmlH72oqLEfZiFjSp3D22v7OgxHf4NfXDf3rwzBLwXQloIzh2PblDc 2XEMxX4ing+NEUrpZYPmFNZU/ji5/IPlQ5EqP+/m3vm3cLXPU7qauyXmu3jAup/GHvSe8QVRj41 1Hbibbvqo4BKXsU73cQOpn83qUhAso4Zo30q4Z9yQhTn2ybLMKTzabV4AoOlax5CVNI0HWiUPZw N6y7/9mThmfY/LAWy2ZlQLHtq1MCEGQiAwV4tkXZ9gvI3N6m4XL92eKvWR2o7apHHJZetLRpTD6 7AWUrG7Dtz4Bag/OPYA== X-Received: by 2002:a05:600c:6291:b0:49b:9105:cdaf with SMTP id 5b1f17b1804b1-49b9105cde3mr3024095e9.8.1787833734819; Thu, 27 Aug 2026 05:28:54 -0700 (PDT) X-Received: by 2002:a05:600c:6291:b0:49b:9105:cdaf with SMTP id 5b1f17b1804b1-49b9105cde3mr3023025e9.8.1787833734362; Thu, 27 Aug 2026 05:28:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1787833734; cv=none; d=google.com; s=arc-20260327; b=duggM82It/8Y+3fd5bj/bZnZ+GN9RhRXYW/TL4eGEe3xWo/sLBst+obfXEUcI8lQQB LGQVerAAl+113Qjk6d7Gz9TZIGBWAE+8l0wLP/65iMA6/aT/Y171BYIe+vJCJiGj7kFs WLUODpDDG3Kp8gi+Dec/pHFA6iPTEbF785Ct3clth980nZYJV8Phx5MuZQQcUdVskKRm rSDha55o5wtzR+od8Ge39GtOLpaqGolPRjv9qF4a87Ks2qXT3mgQN8T/89PbePwVpJil mPcekCYL7p7+N7SS5w+OdC5umqTvy3o0m1Gec7PhH1IOyFTdYx2hLiJsv8Ao9a3cKNAy EhRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=subject:in-reply-to:cc:to:from:message-id:date:dkim-signature; bh=BIpGqcAU7D/pPejsj3duKah3dvtBu8jLmiUCNRSATRw=; fh=gr+FFHtvKVyTIN5omGVcFyfskuXuAZIM+cPvUcxlT6U=; b=dnBlAXuJ1QYx8NQDlC6uSZbfLPodFPKmmRNe9VqaBbLOku1fb5Njc/KHSb8Nub1ovj o8bQBLL/aPEwXNUkZPZWNvmT2cYSdn6fjmHoho+POZGBq3sbbovpNxp0xxSbSVgFZAgO yKs8eNG7fZqRP9pFDV5hvKXruFPldOiBZUYuI+V7DvCjsGsQZFTCTwADSrCXPPbtxpLV yC+X6fjK1exGs7SzqAYES5TXcHsHk46vrgnLt6APHtEjzCm7UvOdHymjS3SEgWXTRnXH CE9wgVhr+2dSznBzjng7Gy9N/2PCPlBIbFHzsoaPcb/pU62bQfSKpoJpyx6nsJuKJs+T StKg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=Se5usvaf; spf=pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=khorenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id ffacd0b85a97d-482e28dc542si7606206f8f.145.2026.08.27.05.28.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Aug 2026 05:28:54 -0700 (PDT) Received-SPF: pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=Se5usvaf; spf=pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=khorenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=Subject:From:Message-Id:Date:Content-Type: MIME-Version; bh=BIpGqcAU7D/pPejsj3duKah3dvtBu8jLmiUCNRSATRw=; b=Se5usvafwqZq pHHzelmqFPPR/hg7yxE98qqLo9T+MSIbdBK7wI8fRS5HX2XmdfT+6hjLBvmDnM8gMldDi/9umD0Jf tmeSspY5OGYBN34HIfEbiwzolGLXEw4xJWmbYA8NyKN2qgw17oRgnYde4f5t9bSp/OtFJVHJCtoLQ R9x9JFQxobk1CDhzkYHWiyopS6mMNHarToP+ir5QA7e138ubegU3o8mZvyZ2E6rhDKpjdgUjDAhXS 5hCRO44komCltKa3fHrjEaEdkkFosa3NL2rvjuBi6xy/AvqriiOyUMYeLGO4prujT4aOyU8AlxGam FzKE41JlEjw73IfT9n9dTA==; Received: from ch-demo-asa.virtuozzo.com ([130.117.225.8] helo=f0.sw.ru) by relay.virtuozzo.com with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wzZBh-00B2zQ-2n; Thu, 27 Aug 2026 14:28:51 +0200 Received: from f0.sw.ru (localhost [127.0.0.1]) by f0.sw.ru (8.18.1/8.18.1/Debian-2) with ESMTP id 67RCSr8d947373; Thu, 27 Aug 2026 14:28:53 +0200 Received: (from kostja@localhost) by f0.sw.ru (8.18.1/8.18.1/Submit) id 67RCSqGF947372; Thu, 27 Aug 2026 14:28:52 +0200 Date: Thu, 27 Aug 2026 14:28:52 +0200 Message-Id: <202608271228.67RCSqGF947372@f0.sw.ru> X-Authentication-Warning: f0.sw.ru: kostja set sender to khorenko@virtuozzo.com using -f From: Konstantin Khorenko To: Konstantin Khorenko In-Reply-to: <20260824130922.444331-1-khorenko@virtuozzo.com> X-OZ-Fwd: true Cc: OpenVZ devel Subject: Re: [Devel] [PATCH RHEL10 COMMIT] selftests/uevent: do not fail on a netlink receive buffer overrun 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: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org The commit is pushed to "branch-rh10-6.12.0-211.39.1.16.x.vz10-ovz" and will appear at git@bitbucket.org:openvz/vzkernel.git after rh10-6.12.0-211.39.1.16.11.vz10 ------> commit dd27dfa9341d66afa10abd7e082b2c32dfd160d0 Author: Konstantin Khorenko Date: Mon Aug 24 15:09:22 2026 +0200 selftests/uevent: do not fail on a netlink receive buffer overrun SO_RCVBUF is set to __UEVENT_BUFFER_SIZE, 4KB, which a busy machine overruns while the test is listening: No buffer space available - Failed to receive uevent Two things are wrong here. The socket queue is sized after a single message, while do_test() deliberately triggers ten uevents "to account for the case where the kernel might drop some", so the queue has to hold more than one. Give it its own size and leave the message buffer alone: the kernel caps a single uevent at UEVENT_BUFFER_SIZE, 2048 bytes, so 4KB per message is already generous. The receive loop then treats every error as fatal, ENOBUFS included, which defeats those ten uevents. Netlink clears the error after reporting it once, so the copies still queued, or still on their way, are perfectly receivable. Retry instead. do_test() bounds the listener with a two second sigtimedwait(), so a retry cannot hang the test. https://virtuozzo.atlassian.net/browse/VSTOR-139674 Feature: fix selftests Reported-by: Eva Kurchatova Signed-off-by: Konstantin Khorenko Reviewed-by: Eva Kurchatova --- tools/testing/selftests/uevent/uevent_filtering.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/uevent/uevent_filtering.c b/tools/testing/selftests/uevent/uevent_filtering.c index 8062804ff759a..735eb8138c448 100644 --- a/tools/testing/selftests/uevent/uevent_filtering.c +++ b/tools/testing/selftests/uevent/uevent_filtering.c @@ -23,6 +23,11 @@ #define __DEV_FULL "/sys/devices/virtual/mem/full/uevent" #define __UEVENT_BUFFER_SIZE (2048 * 2) +/* + * The socket queue has to hold more than a single message: the test + * triggers ten uevents and a busy machine overruns a small buffer. + */ +#define __UEVENT_RCVBUF_SIZE (2048 * 64) #define __UEVENT_HEADER "add@/devices/virtual/mem/full" #define __UEVENT_HEADER_LEN sizeof("add@/devices/virtual/mem/full") #define __UEVENT_LISTEN_ALL -1 @@ -78,7 +83,7 @@ static int uevent_listener(unsigned long post_flags, bool expect_uevent, { int sk_fd, ret; socklen_t sk_addr_len; - int rcv_buf_sz = __UEVENT_BUFFER_SIZE; + int rcv_buf_sz = __UEVENT_RCVBUF_SIZE; uint64_t sync_add = 1; struct sockaddr_nl sk_addr = { 0 }, rcv_addr = { 0 }; char buf[__UEVENT_BUFFER_SIZE] = { 0 }; @@ -158,6 +163,12 @@ static int uevent_listener(unsigned long post_flags, bool expect_uevent, ssize_t r; r = recvmsg(sk_fd, &hdr, 0); + /* + * The queue overran. The kernel clears the error after + * reporting it once and more uevents are on their way. + */ + if (r < 0 && errno == ENOBUFS) + continue; if (r <= 0) { fprintf(stderr, "%s - Failed to receive uevent\n", strerror(errno)); ret = -1; _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel