On 9/19/21 5:56 AM, Pavel Begunkov wrote: > On 9/18/21 11:21 PM, Jens Axboe wrote: >> On 9/18/21 3:55 PM, Victor Stewart wrote: >>>> BTW, this could be incorporated into io_uring_register_files and >>>> io_uring_register_files_tags(), might not be a bad idea in general. Just >>>> have it check rlim.rlim_cur for RLIMIT_NOFILE, and if it's smaller than >>>> 'nr_files', then bump it. That'd hide it nicely, instead of throwing a >>>> failure. >>> >>> the implicit bump sounds like a good idea (at least in theory?). >> >> Can you try current liburing -git? Remove your own RLIMIT_NOFILE and >> just verify that it works. I pushed a change for it. > > Sounds like it pretty easy can be a very unexpected behaviour. Do many > libraries / etc. implicitly tinker with it? Don't know if they do, but as long as we simply increase probably not a huge problem, even if not the prettiest. I just wish we had done this for the 2.1 release, to avoid people running into this for stable backports. At least it's a fairly well known (and specific) error code for this case. -- Jens Axboe