All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
	pabeni@redhat.com, andrew+netdev@lunn.ch, shuah@kernel.org,
	marcelo.leitner@gmail.com, jhs@mojatatu.com, dcaratti@redhat.com,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net] selftests: tc_actions: don't dump 2MB of \0 to stdout
Date: Mon, 16 Feb 2026 12:11:40 +0000	[thread overview]
Message-ID: <aZMJfBldbj20FrUx@horms.kernel.org> (raw)
In-Reply-To: <20260214035159.2119699-1-kuba@kernel.org>

On Fri, Feb 13, 2026 at 07:51:59PM -0800, Jakub Kicinski wrote:
> Since we started running selftests in NIPA we have been seeing
> tc_actions.sh generate a soft lockup warning on ~20% of the runs.
> On the pre-netdev foundation setup it was actually a missed irq
> splat from the console. Now it's either that or a lockup.
> 
> I initially suspected a socket locking issue since the test
> is exercising local loopback with act_mirred.
> After hours of staring at this I noticed in strace that ncat

Ouch!

> when -o $file is specified _both_ saves the output to the file
> and still prints it to stdout. Because the file being sent
> is constructed with:
> 
>   dd conv=sparse status=none if=/dev/zero bs=1M count=2 of=$mirred
>                                 ^^^^^^^^^
> 
> the data printed is all \0. Most terminals don't display nul
> characters (and neither does vng output capture save them).
> But QEMU's serial console still has to poke them thru which
> is very slow and causes the lockup (if the file is >600kB).
> 
> Replace the '-o $file' with '> $file'. This speeds the test up
> from 2m20s to 18s on debug kernels, and prevents the warnings.
> 
> Fixes: ca22da2fbd69 ("act_mirred: use the backlog for nested calls to mirred ingress")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>

I exercise this by running ncat locally on Fedora 43.

$ ncat --version
Ncat: Version 7.92 ( https://nmap.org/ncat )

And confirmed the behaviour you describe.

Reviewed-by: Simon Horman <horms@kernel.org>

  reply	other threads:[~2026-02-16 12:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-14  3:51 [PATCH net] selftests: tc_actions: don't dump 2MB of \0 to stdout Jakub Kicinski
2026-02-16 12:11 ` Simon Horman [this message]
2026-02-18  1:20 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aZMJfBldbj20FrUx@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dcaratti@redhat.com \
    --cc=edumazet@google.com \
    --cc=jhs@mojatatu.com \
    --cc=kuba@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=marcelo.leitner@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.