Re: What's going on with vnets and epairs w/ addresses?

From: Kristof Provost <kp_at_freebsd.org>
Date: Wed, 14 Dec 2022 18:42:55 UTC

> On 14 Dec 2022, at 20:28, Alexander Leidinger <Alexander@leidinger.net> wrote:
> 
> 
> Quoting "Bjoern A. Zeeb" <bz@freebsd.org> (from Tue, 13 Dec 2022 23:03:42 +0000 (UTC)):
> 
>> Hi,
>> 
>> I have used scripts like the below for almost a decade and a half
>> (obviously doing more than that in the middle).  I haven't used them
>> much lately but given other questions I just wanted to fire up a test.
>> 
>> I have an end-November kernel doing the below my eapirs do not come back
>> to be destroyed (immediately).
>> I have to start polling for the jid to be no longer alive and not in
>> dying state (hence added the jls/ifconfig -l lines and removed the
>> error checking from ifconfig destroy).  That seems sometimes rather
>> unreasonably long (to the point I give up).
>> 
>> If I don't configure the addresses below this isn't a problem.
>> 
>> Sorry I am confused by too many incarnations of the code; I know I once
>> had a version with an async shutdown path but I believe that never made
>> it into mainline, so why are we holding onto the epairs now and not
>> nuking the addresses and returning them and are clean?
> 
> Kristof, isn't this (epair destruction in jails) one of the issues you looked at? Sorry if I remember incorrectly.
> 
I looked at panics around destroying interfaces and vnets. 

My speculative guess here is that the jail is hanging around for some reason, and that’s causing the epair and address to stick around too. 

jls -na might confirm or deny that. 

Br,
Kristof