From: Florian Westphal <fw@strlen.de>
To: Florian Westphal <fw@strlen.de>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
Thomas Haller <thaller@redhat.com>,
NetFilter <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH nft v3 2/6] tests/shell: check and generate JSON dump files
Date: Fri, 17 Nov 2023 00:02:44 +0100 [thread overview]
Message-ID: <20231116230244.GB1206@breakpoint.cc> (raw)
In-Reply-To: <20231116230024.GA1206@breakpoint.cc>
Florian Westphal <fw@strlen.de> wrote:
> Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > Hi Thomas,
> >
> > On Wed, Nov 15, 2023 at 01:36:40PM +0100, Thomas Haller wrote:
> > > On Wed, 2023-11-15 at 13:30 +0100, Pablo Neira Ayuso wrote:
> > [...]
> > > > I see _lots_ of DUMP FAIL with kernel 5.4
> > >
> > > Hi,
> > >
> > > Could you provide more details?
> > >
> > > For example,
> > >
> > > make -j && ./tests/shell/run-tests.sh tests/shell/testcases/include/0007glob_double_0 -x
> > > grep ^ -a -R /tmp/nft-test.latest.*/
> >
> > # cat [...]/ruleset-diff.json
> > --- testcases/include/dumps/0007glob_double_0.json-nft 2023-11-15 13:27:20.272084254 +0100
> > +++ /tmp/nft-test.20231116-170617.584.lrZzMy/test-testcases-include-0007glob_double_0.1/ruleset-after.json 2023-11-16 17:06:18.332535411 +0100
> > @@ -1 +1 @@
> > -{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "x", "handle": 1}}, {"table": {"family": "ip", "name": "y", "handle": 2}}]}
> > +{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "x", "handle": 158}}, {"table": {"family": "ip", "name": "y", "handle": 159}}]}
> >
> > It seems that handles are a problem in this diff.
>
> Are you running tests with -s option?
>
> In that case, modules are removed after each test.
>
> I suspect its because we can then hit -EAGAIN mid-transaction
> because module is missing (again), then replay logic does its
> thing.
>
> But the handle generator isn't transaction aware,
> so it has advanced vs. the aborted partial transaction.
>
> I'm not sure what to do here.
>
> One the one hand those rmmods are plain stupid, but on the other
> hand this adds partial coverage for the rmmod path.
>
> We could make the handle counter transaction aware to
> "fix" this on kernel side; it should not be too much code.
>
> What do you think?
Oh, wait, on older kernels the entire handle counter is global,
so "unshare -n" has no effect on it.
But the rmmod scenario explained above happens as well, this
"breaks" json dumps on centos stream 9, which does have the
pernet handle generator fix backported.
next prev parent reply other threads:[~2023-11-16 23:02 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-14 15:29 [PATCH nft v3 0/6] add and check dump files for JSON in tests/shell Thomas Haller
2023-11-14 15:29 ` [PATCH nft v3 1/6] json: fix use after free in table_flags_json() Thomas Haller
2023-11-15 9:58 ` Pablo Neira Ayuso
2023-11-14 16:08 ` [PATCH nft v3 2/6] tests/shell: check and generate JSON dump files Thomas Haller
2023-11-14 16:08 ` [PATCH nft v3 4/6] tools: simplify error handling in "check-tree.sh" by adding msg_err()/msg_warn() Thomas Haller
2023-11-14 16:08 ` [PATCH nft v3 5/6] tools: check more strictly for bash shebang in "check-tree.sh" Thomas Haller
2023-11-14 16:08 ` [PATCH nft v3 6/6] tools: check for consistency of .json-nft dumps " Thomas Haller
2023-11-15 8:24 ` [PATCH nft v3 2/6] tests/shell: check and generate JSON dump files Florian Westphal
2023-11-15 9:54 ` Pablo Neira Ayuso
2023-11-15 10:01 ` Florian Westphal
2023-11-15 10:05 ` Pablo Neira Ayuso
2023-11-15 10:10 ` Florian Westphal
2023-11-15 10:26 ` Pablo Neira Ayuso
2023-11-15 10:31 ` Florian Westphal
2023-11-15 10:35 ` Pablo Neira Ayuso
2023-11-15 10:43 ` Pablo Neira Ayuso
2023-11-15 12:21 ` Florian Westphal
2023-11-15 12:30 ` Pablo Neira Ayuso
2023-11-15 12:36 ` Thomas Haller
2023-11-16 16:10 ` Pablo Neira Ayuso
2023-11-16 16:49 ` Thomas Haller
2023-11-16 16:55 ` Thomas Haller
2023-11-16 23:00 ` Florian Westphal
2023-11-16 23:02 ` Florian Westphal [this message]
2023-11-17 8:27 ` Pablo Neira Ayuso
2023-11-17 16:16 ` Thomas Haller
2023-11-17 16:36 ` Pablo Neira Ayuso
2023-11-17 16:56 ` Thomas Haller
2023-11-17 16:57 ` Phil Sutter
2023-11-17 17:06 ` Thomas Haller
2023-11-17 17:11 ` Phil Sutter
2023-11-17 17:23 ` Thomas Haller
2023-11-17 22:30 ` Phil Sutter
2023-11-15 10:11 ` Thomas Haller
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=20231116230244.GB1206@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=thaller@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).