On 9/25/20 10:21 AM, Josef wrote: > Hi, > > I implemented SQPOLL in netty for 5.8/5.9, to close a fd I need to > delete the entry first, it seems to fail with error -EADDRINUSE when I > remove the fd entry, close(2) it and the same socket(with the same > address) is created again,, is that known? > I assume that io_uring still has some reference to this, however > io_uring_unregister_files works fine but the drawback would be that I > need to wait until the ring is idle If you have a file registered, that holds a reference to it. So when you then otherwise close it in the app, it's similar to having done a dup() on it and just closing the original. So yes, this is known and expected, I'm afraid. -- Jens Axboe