<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Nov 5, 2011, at 1:46 PM, Tobias Oberstein wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><blockquote type="cite"><blockquote type="cite">Then, baseline. I've run the trial using select reactor in the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">expectation of finding all tests passed.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">This is not the case, there are a couple of failed ones. Those are<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">also failed with the kqueue reactor, so I need to know whether I need<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">to inspect those or those are problems unrelated to the reactor, but of<br></blockquote></blockquote><blockquote type="cite">general (platform?) nature.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Are you using Twisted 11? Many of these issues are, if I'm not mistaken,<br></blockquote><blockquote type="cite">fixed in trunk (though perhaps not all). So trunk is probably a better baseline<br></blockquote><blockquote type="cite">to work off of.<br></blockquote><br>Ok, I'm using trunk now.<br><br>1)<br>The errors in<br><br>twisted.python.test.test_components<br><br>are gone.<br><br>2)<br>The errors in<br><br>twisted.internet.test.test_posixprocess<br>twisted.internet.test.test_process<br><br>are still there ... and they show up for select, poll and kqueue reactors.<br><br>They all somehow relate to "open FDs":<br><br>twisted.internet.test.test_posixprocess<br> &nbsp;FileDescriptorTests<br> &nbsp;&nbsp;&nbsp;test_expectedFDs ... &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[FAIL]<br><br>twisted.internet.test.test_process<br> &nbsp;PTYProcessTestsBuilder_KQueueReactor<br> &nbsp;&nbsp;&nbsp;test_openFileDescriptors ... &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ERROR]<br> &nbsp;PTYProcessTestsBuilder_PollReactor<br> &nbsp;&nbsp;&nbsp;test_openFileDescriptors ... &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ERROR]<br> &nbsp;PTYProcessTestsBuilder_SelectReactor<br> &nbsp;&nbsp;&nbsp;test_openFileDescriptors ... &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ERROR]<br>ProcessTestsBuilder_SelectReactor<br> &nbsp;&nbsp;&nbsp;test_openFileDescriptors ... &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ERROR]<br><br>This might more a FreeBSD related thing. ?<br></div></blockquote><div><br></div><div>Yes.</div><div><br></div><div>These tests <i>should</i>&nbsp;pass; I am guessing this has something to do with the still-open ticket &lt;<a href="http://tm.tl/4747">http://tm.tl/4747</a>&gt;. &nbsp;Maybe have a look at fixing that?</div><div><br></div><div>You might be able to work around it on your system this by mounting fdescfs at /dev/fd. &nbsp;(This really ought to be the default, please bother someone in FreeBSD-land to make it so. :)).</div><div><br></div><div>It would be useful to include tracebacks with the errors. &nbsp;"trial --rterrors" is useful, as it includes the tracebacks &nbsp;especially if you are experiencing hanging with the tests.</div><br><blockquote type="cite"><div>3)<br>I think I've nailed down the Half-Close stuff.<br></div></blockquote><div><br></div><div>Awesome. &nbsp;Do you have a link to a changeset for that? &nbsp;(Did I miss it earlier in the thread?)</div><br><blockquote type="cite"><div>4)<br>These are kqueue specific. Need to investigate further.<br></div></blockquote><div><br></div><div>These are the ones to focus on for &lt;<a href="http://tm.tl/1918">http://tm.tl/1918</a>&gt;, then :).</div><br><blockquote type="cite"><div>twisted.internet.test.test_fdset<br> &nbsp;ReactorFDSetTestsBuilder_KQueueReactor<br> &nbsp;&nbsp;&nbsp;test_lostFileDescriptor ... &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ERROR]<br> &nbsp;&nbsp;&nbsp;test_removedFromReactor ... &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[FAIL]<br><br>The first one comes up, since<br><br>removeReader()<br><br>is called for a FD which is gone, &nbsp;and leads to a socket exception from fd = reader.fileno()<br></div></blockquote><div><br></div><div>It sounds like you've narrowed this down pretty far! &nbsp;Good work.</div><br><blockquote type="cite"><div>5)<br>These are kqueue specific. Need to investigate further.<br><br>twisted.conch.test.test_conch<br><br>The fail on the kqeue control call .. see below.<br><br>Any ideas what could be the reason?<br></div></blockquote><div><br></div><div>I would suggest fixing the issues you outlined in point 4 first. &nbsp;It's really unfortunate that reactor issues are being caught by conch tests. &nbsp;The reactor tests should be comprehensive enough to catch everything in the reactor.</div><div><br></div><div>This may just be a side-effect of the other errors you're tracking down, so see if you can fix those, and then loop back to these. &nbsp;If they disappear, then great. &nbsp;If not, then we should have a test that specifically tests this functionality and doesn't rely on weird and difficult to diagnose errors in conch to find them.</div></div><div><br></div><div>Thanks again for working on this!</div><br><div>-glyph</div><div><br></div></body></html>