<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div>Hey everyone,<br><br></div>I've run into another issue while stress testing mir. The stress test tool I'm writing currently lives here:<br>
<br>lp:~thomir/+junk/mir-stress<br><br>With the mir_demo_server running I can run the stress test with a single thread just fine:<br><br></div>./mir-stress -t 1 -n 10<br><br></div>But as soon as I try and run with multiple threads:<br>
<br></div>./mir-stress -t 2 -n 10<br><br></div>roughly 50% of the calls to mir_connect_sync fail, with one of the following error messages:<br><br>"connect: Too many open files"<br>"eventfd_select_interrupter: Too many open files"<br>
<br></div>The stress test never opens more connections than it has threads running (in the above example, two simultaneous connections), so I'm pretty sure this error state is in fact a bug. I've tried several things to narrow down the problem, so far without much luck. I'm not even sure if this is en error state on the client side, or the client api is simply reporting an error message from the mir_demo_server.<br>
<br></div>I have tried:<br><br></div> * Using "strace -e trace=open,close mir_demo_server" and "strace -e trace=open,close ./mir-stress -t 2 -n 10". The trace log from the demo server doesn't show any open() calls while the client is trying to connect, and the client trace log shows balanced open()/close() calls.<br>
<br></div> * Running the server and client under valgrind. Valgrind finds a few leaks on the server side, which all seem to be innocuous (memory leaks, that is, not file handle leaks), and no leaks in mir-stress.<br><br></div>
* Inspecting the output of lsof for both the mir_demo_server and mir-stress while the stress test is running. The server output looks pretty sane, but I notice that the mir-stress application has /dev/dri/card0 open a total of 1018 times - which, plus a few more file handles, approaches 1024, which may be the default limit for the number of open file handles in a single process... maybe? I'm not sure why these wouldn't show up in my valgrind/strace adventures earlier however.<br>
<br></div>Is someone else here able to replicate my results? Has anyone got any ideas how I can move forwards from here?<br><br></div>Cheers!<br><div class="gmail_extra"><br>-- <br><div dir="ltr"><div>Thomi Richards<br></div>
<a href="mailto:thomi.richards@canonical.com" target="_blank">thomi.richards@canonical.com</a><br></div>
</div></div>