https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291610
--- Comment #1 from Kristofer Peterson <[email protected]> --- Further to this issue, I did apply the ten year old patch from github.com/bsdjhb/freebsd.git (branch stdio_file) to a checkout of git.freebsd.org/src.git (tag: release/14.3.0-p6), built and installed world into a jail, and was then able to run a simple test program that fopen()'d over 0xffff files successfully. I did have to change the K&R style function declarations to ANSI (i.e. type immediately before identifier) but otherwise the diffs applied fairly cleanly. I also bumped the new fopen and friends symbol versions from @FBSD_1.4 to @FBSD_1.6 (I'm not sure what the symbol versioning convention is - perhaps it should have been FBSD_1.7 so the "7" corresponds to libc.so.7; what mattered for my testing is that it was different from @FBSD_1.0.) I then rebuilt the application (which is a rust application) and all of its dependencies from ports against the modified libc, world. The initial EMFILE error came from a fdopen() call in rocksdb but when run with the rebuilt application it worked successfully and continued running with procstat -f showing over 35k open files. -- You are receiving this mail because: You are the assignee for the bug.
