From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2419431618C for ; Fri, 24 Jul 2026 17:49:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784915343; cv=none; b=k19P0hk69PL76dGt9/p2cxLxuX8Dnt1Ni94eIGq/yvjsPX3PDDK4M8w7wiwr59ALH0EusS76MJp7Sgze/0aZVFh0/6wVB73+c+rQfwZDQTvcsttUKgoGqLQQ55AF6IteRcPa9d8ZZ8VZDUifvuv1D4eRgP8Jf0CHl7feXmtRn54= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784915343; c=relaxed/simple; bh=56ibPZILETfHThBDfKbmus1vKcZ8DorsFStksKP13ps=; h=Mime-Version:Content-Type:Date:Message-Id:To:Cc:Subject:From: References:In-Reply-To; b=XvikX50yOQT9Y0MmIhLuw8nC6uJcMDqcRyhOXsObaFgM93IiEfx8aMsvBuixNQYJiHvWaVa2YVEdzrj9uTxQ2PNXSNCawjeAF5xF0eQPXVpo2bP4AR47sO/OI5PxnxvWAWXxmE1IeWclA8QgpUFjUPnSk6FeS8VY2IZRROkuwXc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=etsalapatis.com; spf=pass smtp.mailfrom=etsalapatis.com; dkim=pass (2048-bit key) header.d=etsalapatis-com.20251104.gappssmtp.com header.i=@etsalapatis-com.20251104.gappssmtp.com header.b=e89bBeIB; arc=none smtp.client-ip=209.85.214.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=etsalapatis.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=etsalapatis.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=etsalapatis-com.20251104.gappssmtp.com header.i=@etsalapatis-com.20251104.gappssmtp.com header.b="e89bBeIB" Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-2cca0c5799eso7969815ad.0 for ; Fri, 24 Jul 2026 10:49:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=etsalapatis-com.20251104.gappssmtp.com; s=20251104; t=1784915341; x=1785520141; darn=vger.kernel.org; h=in-reply-to:references:from:subject:cc:to:message-id:date :content-type:content-transfer-encoding:mime-version:from:to:cc :subject:date:message-id:reply-to:content-type; bh=8nT0uL29XlQVyhgfVPiRJ/FmnyaYBwM55XjwIgPxDPM=; b=e89bBeIBXChRV32h/rN3zDtAfFNNueE0HAY+/4didJzxZnfPiCo0SNO1z1Gy4vEspN m144MIKhQ1bXTCXVLNqJCmkSDH9JzPuhZ/gPR7c6YHbdeR6xewkaugXASYEBPQXWE0nG KzmZLQ/f7g6c/Z0chJ//iBjRDxCu+J9pH88/ba8Nzn9z3rNA9LcXSfH3R5FT78/H98WR JMmULLPFsvhzynT6WvrN6QQbXdGyViYZAjczEwhN7ISHeRO37CidWs/JumGHjPhkH6QT v0Rdu6ixjab8GYKNDjpFZw66ouiAKkh6umJm3RrtXUHX4zPw3C1PkzwXM/SdSQzzsRGM ge2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784915341; x=1785520141; h=in-reply-to:references:from:subject:cc:to:message-id:date :content-type:content-transfer-encoding:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=8nT0uL29XlQVyhgfVPiRJ/FmnyaYBwM55XjwIgPxDPM=; b=Fx+xEaAE/LbR6sdfWpm1QU7nP3bVFVMDo9lBD838Fq4c2jdjwToMJEmGoBKu1O2cwc MwWv0CXtrMwo6wJSruSj1vrmF0+/e6RzwFPLh2Djrq87pQwdO8l4I/DNPIkrziX18lDX OWMIc7rIv3mhvPt2UYL26oRgunXDjMQSmsUo/H4gDPUkhNHY1eeCdI6Tt2x96+5vupAm HyKMTiVM9lGYS8RfIS6zcg+VVnatBmZ1tOIzJB1qf9aKwrRvaiS4+MO1qtR+95nDbH7R LD62c4fBHdF6QCzTt1xE65mUcvv3gubL7YuNUB3ErWg3ufVlsLnRJN/3MopGxc59I6RV m1KA== X-Forwarded-Encrypted: i=1; AHgh+Rr6osAJAj1JiP4Aaf/wPRw2fPklTBfCUVNm/yzSjwJHR7861S+TMPAq3ra7EtRSJd3I6+nBegoqSgffSNg=@vger.kernel.org X-Gm-Message-State: AOJu0YyCO+f6Zyrb8WhwazWHmhmiy1W03/b0nozuDcUYHis4xasq9XZP Kl1zan/LGKKliZ+HxTA/gM7oqJPpYCyuqmkAXiPFqrkvD86EfkODo1YjS5FCwWeJCzE= X-Gm-Gg: AR+sD113fPja544wQcjEn8ehx1/rbclqjq0quR6HJyUuYp17TTS/biXXtXRHS+ujphj 1QgF/hVIQB9/w2cZLieNu1szTAomrp20dR6HoM/Nd/8dPjTx5qholFRXMloJhOuKU/03iiQLAtc XzpChg9qifzKR6bc49LVtsAaJKk/jQ1AcrZYNr9dA/Gi51QZCkUmGW9MEzq56585X3FCHpYFR+F bnc2HVEDNWNXvNiqsHwaYR1akR9Hi5+bz5R0UmwOzDrTIxVIwBig9iHirbvC6lfD+sXf3wk/rm0 5UXvTa3oy6JP33MzsBhLC5UgwiBURudcvE9YtgSazN9txpEkBz0ry055kxgykBUzHRzbWhY6mxQ UQmexiULm4k7KQxYbAQsdrWpzRKp4a0DXykNN+Hb33+eQ3i1l4F7ZrBXdTG20h+bOJ9gEYSIV X-Received: by 2002:a17:90a:dfc5:b0:38e:3a8:2374 with SMTP id 98e67ed59e1d1-38ec6631d0emr7873518a91.30.1784915341289; Fri, 24 Jul 2026 10:49:01 -0700 (PDT) Received: from localhost ([2620:10d:c090:600::1:5d77]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-13d6ba579c3sm889647c88.8.2026.07.24.10.48.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 Jul 2026 10:49:00 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 24 Jul 2026 13:48:58 -0400 Message-Id: To: "Jiayuan Chen" , Cc: "Andrii Nakryiko" , "Eduard Zingerman" , "Alexei Starovoitov" , "Daniel Borkmann" , "Kumar Kartikeya Dwivedi" , "Martin KaFai Lau" , "Song Liu" , "Yonghong Song" , "Jiri Olsa" , "Emil Tsalapatis" , "Shuah Khan" , "Ihor Solodrai" , , Subject: Re: [PATCH bpf-next v2] selftests/bpf: Report the real error from libarena parallel workers From: "Emil Tsalapatis" X-Mailer: aerc 0.21.0-0-g5549850facc2 References: <20260723061347.398591-1-jiayuan.chen@linux.dev> In-Reply-To: <20260723061347.398591-1-jiayuan.chen@linux.dev> On Thu Jul 23, 2026 at 2:13 AM EDT, Jiayuan Chen wrote: > Several CI runs failed in the libarena parallel tests with -4 (-EINTR) [1= ], > which says nothing about what actually went wrong. > > Two workers can fail like this: > > worker 1: gives up, e.g. the rendezvous times out, sets test_abort and > returns its own error (-ETIMEDOUT) > worker 2: sees test_abort and returns -EINTR > > -EINTR only means "someone else already gave up", so it carries no > information. Which of the two gets reported depends on the order > pthread_join() collects them, because > > err =3D err ?: (long)thread_ret; > > keeps the first non-zero value and drops the rest. When the -EINTR worker > comes first, the error describing the actual failure is lost. > > Skip -EINTR entirely: a worker only returns it once another worker has > already reported the real error, so report and log only the real errors. > > It is still unclear whether the timeouts come from CI load or from a > problem in the test itself. Report the error accurately first, so the nex= t > failure can be diagnosed. > > [1]: > https://github.com/kernel-patches/bpf/actions/runs/29867905253/job/887644= 63566 > https://github.com/kernel-patches/bpf/actions/runs/29878191901/job/887948= 45824 > > Signed-off-by: Jiayuan Chen Reviewed-by: Emil Tsalapatis > > --- > v1 -> v2: > - hoist the worker_err declaration to the top of the function > - skip -EINTR workers entirely: do not aggregate and do not log them > - comment/commit message wording fixes > > v1: https://lore.kernel.org/bpf/20260722064713.357277-1-jiayuan.chen@linu= x.dev/ > --- > .../selftests/bpf/prog_tests/libarena.c | 18 +++++++++++++++++- > 1 file changed, 17 insertions(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/bpf/prog_tests/libarena.c b/tools/te= sting/selftests/bpf/prog_tests/libarena.c > index df7e4b8dc394..daade4150af6 100644 > --- a/tools/testing/selftests/bpf/prog_tests/libarena.c > +++ b/tools/testing/selftests/bpf/prog_tests/libarena.c > @@ -73,6 +73,7 @@ static int run_libarena_parallel_test_workers(struct li= barena *skel, > uint32_t nthreads; > void *thread_ret; > int ret, err =3D 0; > + int worker_err; > int i; > =20 > for (nthreads =3D 0; nthreads < UINT_MAX; nthreads++) { > @@ -118,7 +119,22 @@ static int run_libarena_parallel_test_workers(struct= libarena *skel, > continue; > } > =20 > - err =3D err ?: (long)thread_ret; > + worker_err =3D (long)thread_ret; > + > + /* > + * A worker that bails out because another one already gave up > + * reports -EINTR. It is collateral damage that carries no > + * information, so skip it entirely: never let it become the > + * reported error, and don't log it either. > + */ > + if (!worker_err || worker_err =3D=3D -EINTR) > + continue; > + > + if (!err) > + err =3D worker_err; > + > + fprintf(stdout, "%.*s__%d returned %d\n", (int)prefixlen, name, > + i, worker_err); > } > =20 > free(threads);