Thanks Ilya. Sorry about this! I thought this bug existed upstream but it turns out it was actually introduced in our downstream code.
-Tim ________________________________ From: Ilya Maximets <[email protected]> Sent: Tuesday, September 15, 2026 5:35 PM To: Tim Rozet <[email protected]>; [email protected] <[email protected]> Cc: Ilya Maximets <[email protected]> Subject: Re: [ovs-dev] [PATCH] tunnel: Avoid abort when tunnel port disappears. External email: Use caution opening links or attachments On 9/11/26 3:59 PM, Tim Rozet via dev wrote: > Native tunnel translation calls tnl_port_send() and later > tnl_port_build_header(). Each function independently holds the tunnel > module lock. If the port is removed after tnl_port_send() releases the > lock, tnl_port_build_header() no longer finds it and aborts the entire > ovs-vswitchd process. > > This was observed during tunnel port reconfiguration in both PMD and > revalidator threads. Hmm. Do you have more details on this? The assert is there because it should not be possible to have a reference to a port that is removed since port destruction is waiting for the xlate_txn_commit that is waiting for the full RCU synchronization. And the reconfiguration of the tunnel port is happening under the write lock. > > Return ENODEV instead. The caller already converts build failures into > XLATE_TUNNEL_HEADER_BUILD_FAILED, dropping the affected output while > allowing ovs-vswitchd to continue. > > Fixes: a36de779d739 ("openvswitch: Userspace tunneling.") > nit: There should be no empty lines between tags. > Assisted-by: GPT-5, OpenAI Codex > Signed-off-by: Tim Rozet <[email protected]> > --- > ofproto/tunnel.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/ofproto/tunnel.c b/ofproto/tunnel.c > index d8a289548..97c1a4b70 100644 > --- a/ofproto/tunnel.c > +++ b/ofproto/tunnel.c > @@ -753,7 +753,10 @@ tnl_port_build_header(const struct ofport_dpif *ofport, > > fat_rwlock_rdlock(&rwlock); > tnl_port = tnl_find_ofport(ofport); > - ovs_assert(tnl_port); > + if (!tnl_port) { > + fat_rwlock_unlock(&rwlock); > + return ENODEV; > + } > res = netdev_build_header(tnl_port->netdev, data, params); > fat_rwlock_unlock(&rwlock); > _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
