Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 826 [details]
Code to shot the bug.
Trying to handle more that 1024 handle file an exception is raised even if the max number of file limit is increase using "setrlimit".
Of course mono have the right pcap permission.
Using "strace" on the mono code I have this syscalls:
open("file1021.out", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 1024
close(1024) = 0
so seems that mono close the file because open return value is 1024.
On mailing list Robert Jordan say:
<<This is a bug in Mono's io-layer:
getdtablesize() is returning the max count of possible open
file descriptors *at start-up*, so any later setrlimit has
Source code example is included.
The arch where I have this behviour is linux 32bit.
This is a limitation of mono, can't you workaround it by setting the rlimit before forking mono?
I'll change the rlimit before starting mono so I'll remove the code that try to change it from C# code.
This is a mono limitation, rlimit must be increased for it to work.