<html>
<head>
<base href="https://bugzilla.netfilter.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Deleting a nft chain immediately after flushing references to it does not always work"
href="https://bugzilla.netfilter.org/show_bug.cgi?id=1712">1712</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Deleting a nft chain immediately after flushing references to it does not always work
</td>
</tr>
<tr>
<th>Product</th>
<td>nftables
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86_64
</td>
</tr>
<tr>
<th>OS</th>
<td>Ubuntu
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P5
</td>
</tr>
<tr>
<th>Component</th>
<td>nft
</td>
</tr>
<tr>
<th>Assignee</th>
<td>pablo@netfilter.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>cwm@epust.dk
</td>
</tr></table>
<p>
<div>
<pre>Consider this script:
#!/bin/bash
nft flush ruleset
nft table inet filter
nft add chain inet filter mychain1
nft add chain inet filter mychain2
nft add rule inet filter mychain2 ip daddr vmap { 1.1.1.1 : goto mychain1 }
nft flush chain inet filter mychain2
# sleep 1
nft delete chain inet filter mychain1
Most of the times when I run this script, the last call to nft fails with:
Error: Could not process rule: Device or resource busy
delete chain inet filter mychain1
If I uncomment the "sleep 1", it always seems to work.
If I put the flush and delete commands in a file to be executed atomically
(which is what I really want), it does not work either.
I have tried to run it in two different environments with the same result:
* Kernel 5.15.75 nft version 1.0.2 (Windows WSL)
* Kernel 5.15.0 nft version 0.9.3 (Ubuntu)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are watching all bug changes.</li>
</ul>
</body>
</html>