Closed romange closed 10 months ago
Before I look into this, the report seems to indicate that this is a change/regression, but doesn't mention what the working version was?
I guess looking at the reproducer, this is a registered vs normal file descriptor thing?
yes, the normal behavior can be achieved by commenting out the registering/unregistering lines. so both versions work with regular file descriptors, the behavior change is caused by registering a file descriptor with iouring.
I'll take a look, but my guess would be that it's because there's a reference left on it, which will get dropped eventually. At least that's the only reason why I could see this making a difference.
Doesn't reproduce for me on 6.4-stable, 6.5-stable, or current -git...
Tried 6.2-stable and it does fail there. But 6.2-stable has been dead since May this year, so no more releases of that will get made. For anything current, I don't see the issue. I'm surprised you then see it on 6.5, which is some ubuntu variant I suppose?
Thanks, I will double check it again on 6.5 (ubuntu 23.10)
My suspicion is that this got fixed with the resource rework that Pavel did for 6.4, so anything earlier than 6.4 would likely not pass your test case. Which does mean that 6.5 really should work, however...
Yep I think that's what it is. It'll likely work if you have a 2 second delay in there after the unregister. Not that this is super useful information in terms of making it work generically, but you could confirm that with adding a sleep(2);
after the io_uring_register_files_update()
call.
Yes, it's my mistake - it's working well on 6.5.
the minimal reproducible example is below. I verified this bug/behavior change exist on kernels 6.2 and 6.5 (ubuntu 23.10).