Repository navigation
Conversation
RuleEngine.load() prepends NSE's trace table, but nft -f appends to a chain that already exists: every load duplicated 'meta nftrace set 1', and a load without trace_output kept an earlier output chain. The trace block now starts with 'table inet nse_trace' + 'delete table inet nse_trace' in the same transaction. A readiness proof that fails now says whether nse_trace or one of its chains is missing, e.g. after a ruleset starting with 'flush ruleset'. The process-test fixture describes any leftover (state, parent, group, command) before killing it, to diagnose the intermittent failure of test_cancelling_the_start_leaves_nothing_running. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.com>
…E 2.5.2 The child exists before asyncio.create_subprocess_exec() returns. A cancel in that window reached asyncio, which killed only the group leader: what the launch chain had already forked survived, adopted by init. On Ubuntu, where /bin/sh is dash, this made test_cancelling_the_start_leaves_nothing_running fail about once in 200 runs (7 of 1200 on GitHub runners, each leftover a 'sleep 30' with ppid=1 in the leader's group). Creation now runs shielded; on a cancel it is allowed to finish, and the whole process group is killed before the cancel is re-raised. A new test holds creation open after the fork and reproduces the leak every time without the fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed
RuleEngine.load()no longer accumulates NSE's trace rules.nft -fappends to existing chains, so every load added anothermeta nftrace set 1, and a load withouttrace_outputkept an earlier output chain. The trace block now starts withtable inet nse_trace+delete table inet nse_tracein the same transaction.spawn_process()mid-creation no longer leaks part of the launch chain. A cancel beforecreate_subprocess_exec()returned reached asyncio, which kills only the group leader. This was the intermittenttest_cancelling_the_start_leaves_nothing_runningfailure: 7/1200 on GitHub runners (dash as/bin/sh), each leftover asleep 30withppid=1in the leader's group. Creation is now shielded, and on a cancel the whole group is killed.Added
TraceReadiness.problemssays whetherinet nse_traceis missing (e.g. afterflush ruleset) or lacks its prerouting/output chain.Verification
trace_outputload followed by a plain one leaves only prerouting; after several loads each packet is traced by NSE once; aflush rulesetruleset is not ready and says why. Against the oldload(), two of them fail (3 NSE events per packet).process.py, passes with the fix.mkdocs --strict; 89 integration tests in the privileged Debian container, no residual resources.🤖 Generated with Claude Code