From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (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 C52933C07A for ; Thu, 20 Aug 2026 15:12:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787238725; cv=none; b=nhBLe5I5hq+2oSl4TDVX2mCOeNWkRVaLOUkDWOiv2KPo5GpW6xpVa8W1Ho6UiVF6ETm9M3w3W6itW9GjUJSCVLBtSRqF8VXT/iTXvaQ9jSz5DITjYLANZ7e3cGp05lH4JqVpnD/8IVjnFpQUBXCj2QO9GuoNTsZg2vb60/l6iwI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787238725; c=relaxed/simple; bh=8a+KoKXYK/XT+p7eiS+WSNre4xuPpzkKUk6DZsU0AL4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=I1LHqtwygs8GN+0kOhcK+2OF77ZydP9dfVXCJqsPsumwh6pxz/B+MHuPnn1JLIFqHzYrMqKfhkDc0AI0tfYeOHixiHkcHTsspyoN/3BGfw78/4Vr5jLqCpLTFdUujOLIuYAi9HyDwiI6chFgd2z3+AZvynUxwl/L2qIaBdDIiEU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=cloudflare.com; spf=pass smtp.mailfrom=cloudflare.com; dkim=pass (2048-bit key) header.d=cloudflare.com header.i=@cloudflare.com header.b=eBP22FT1; arc=none smtp.client-ip=209.85.218.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=cloudflare.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cloudflare.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cloudflare.com header.i=@cloudflare.com header.b="eBP22FT1" Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-c1c26d7e951so381720966b.0 for ; Thu, 20 Aug 2026 08:12:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google09082023; t=1787238722; x=1787843522; darn=vger.kernel.org; h=content-type:mime-version:message-id:date:user-agent:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=8a+KoKXYK/XT+p7eiS+WSNre4xuPpzkKUk6DZsU0AL4=; b=eBP22FT1LldfC8dfsiLboWVTnPNTFpWPCuZrzpUuJ55MCh1taYTpcoQShS0u7Xu5+k KLoKMKlNqi40WNgYBhGnp4gjo+WJeomg+NAbVD9RHVtvDgRX5FIOWlI/bSdaukAgKTyp G+cYKJl7e+xhIw/+VftOmDCaWMAWgKspDlUEJAkbA6qZNjtuWdnESFK31R6QfZBR6crZ HCk2tZeEkuW/uyLM+G+sAzSQoa2WuCcpKwfvh6EuLvNX9hBsNCacfnD+CND7GzBA5iNo yZeoZz6BoKPFY+NlUcqvcsJE/PIOSvMqz8EmemAxNe3qBK2lHiVAQZH1WnGEYK6DNxK0 y4HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787238722; x=1787843522; h=content-type:mime-version:message-id:date:user-agent:references :in-reply-to:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=8a+KoKXYK/XT+p7eiS+WSNre4xuPpzkKUk6DZsU0AL4=; b=CcwsuJGEdIdxvXQ3ygeXaLY6fvqvHjlXgNPxZtXDFht0apZ76gx24dB1u4moqlMzTo CHkctktmS5TCvjoODMHkPiNHmhIXNNBG2OuRXGAm2SuK/0N1ir1K3AVsmOnPal26nfFA 2Y2p+2o3do5M2WsP89g0C/qd5090peY/5DWdGW7Pqm2Aux4eI5dOftvckEPlSAemZTpC Rv0aNIhROzx2Ng7evKzlP9n6sasHuW7UEdCGY7yhciRpV07bQ5gY2Egw0/jME0BTeGHl /cEm6WdMfhdDZzMM+Qtm52ug+5jdcsVUWHp6etVhJf235EwISCG+7tLhGTMH78VkN9b7 +QIw== X-Forwarded-Encrypted: i=1; AHgh+RqBRlybx+iuA2D62whzyjj7vv8oRVoQ+lGoy4BorWRfw+0DDxs0zP+xfiT2memtfWjM5cbHO005kNHXm50=@vger.kernel.org X-Gm-Message-State: AOJu0YwQr16SHaIHgFe+j4ZiQU3EFrTor7zxhnXT6T8N3rcRf/RdAkeb GRBarAfFwyxmnbgUV5IDznKJfHvXSxbepBj8CJ2KX6eWk3RW3ociL+gC+sxbv7B3ErY= X-Gm-Gg: AR+sD10jE4GRirC0mVxN76cebPaWOZIPGj1nV6exf79PQJPGqs32veN2tPo5t78MmL4 nGeLAtPYj8KmmMpFOQdVIYOGOVEJxDbNfs570GUOhqaRWpbpimGIHMS2unCmB7UZyJhw/oxvRPv iOEK9Ka0EcqA9SvvKm9x2DNnMkPgwPv/NkRXWo0uP2FvcGl/+33/+OcdpirPBuQcVfiTYN7GWMS wKfjwBEndGkjP7tx7kv39CBuwzjyZ80ji/IHEYtfWWRjzE1Ucn3mnm8FMl9jSsnTaib4dzh5LGl Sf3ggGevk7l64plTBpyt70SNB2ql78KaTXjMpDyIjZfZ86aYDeJG9UEvOdH+5kepVfj/OjsRulI OshoAlocwFBYd8yw9vSGjpCSeF/S2c0BXj9jiMR9oF+QP8OTZj206Keoew3mqLiCvAWn1w+HNj2 pw0jeKUPJv7yy1UTqALzWHN/PbeTTGnBmDRY8lnXP7SnnIJpUltj9e1hNocB6q+pI+7NxvJk4xE w== X-Received: by 2002:a17:906:9f8e:b0:c1c:64d4:5ba3 with SMTP id a640c23a62f3a-c242e20b758mr1100820366b.20.1787238722009; Thu, 20 Aug 2026 08:12:02 -0700 (PDT) Received: from cloudflare.com ([104.28.21.182]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c24589e1b0csm90698766b.8.2026.08.20.08.12.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Aug 2026 08:12:01 -0700 (PDT) From: Jakub Sitnicki To: Kenneth Lee Cc: andrii@kernel.org, ast@kernel.org, bpf@vger.kernel.org, daniel@iogearbox.net, eddyz87@gmail.com, john.fastabend@gmail.com, jolsa@kernel.org, linux-kernel@vger.kernel.org, martin.lau@linux.dev, memxor@gmail.com, rhkrqnwk98@gmail.com, sdf@fomichev.me, song@kernel.org, yonghong.song@linux.dev Subject: Re: BUG: bpf: task hung in lock_sock_nested during sockmap free In-Reply-To: <20260820022848.1408056-1-kennethbwlee@snu.ac.kr> (Kenneth Lee's message of "Thu, 20 Aug 2026 11:28:48 +0900") References: <20260812050758.813489-1-kennethbwlee@snu.ac.kr> <20260820022848.1408056-1-kennethbwlee@snu.ac.kr> User-Agent: mu4e 1.14.1; emacs 30.2 Date: Thu, 20 Aug 2026 17:12:00 +0200 Message-ID: <87ecfsvnb3.fsf@cloudflare.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Thu, Aug 20, 2026 at 11:28 AM +09, Kenneth Lee wrote: > After further analysis, we found that this report is triggered by an > SK_MSG BPF program repeatedly calling bpf_msg_apply_bytes(msg, 1). > > For a message of about 557 KiB, this results in approximately 557,000 > one-byte verdict and push iterations. The TCP BPF send path keeps the > socket lock while processing these iterations, so deferred > sock_map_free() waits for the same socket lock. > > This appears to be a long lock-held processing path triggered by a valid > but very unrealistic msg_apply_bytes(1) workload. We believe this behavior > is benign, but let us know if other behavior is expected. Thanks for the follow up. Perhaps that is a convoluted scenario but what caught my attention is that if you got the hung task notification after ~120 seconds, and it took ~500k prog runs to trigger it, then something seems quite slow because we're talking ~240 usec/prog run. If you have the repro still at hand, it might be worth to take a look at the CPU trace [1] or a Flamegraph [2] to see where the CPU time goes. -jkbs [1] https://perfetto.dev/docs/getting-started/system-tracing [2] https://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html