<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Sprechblasentext Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.E-MailFormatvorlage17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.SprechblasentextZchn
        {mso-style-name:"Sprechblasentext Zchn";
        mso-style-priority:99;
        mso-style-link:Sprechblasentext;
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Ok, I've prepared<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://twistedmatrix.com/trac/attachment/ticket/1918/kqueue.patch">http://twistedmatrix.com/trac/attachment/ticket/1918/kqueue.patch</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>which passes all tests (FreeBSD 8.3 p3 i386 / Python 2.7.1) but the ones related to open FDs (which are unrelated to the reactor stuff).<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>This works for me for FreeBSD .. I've tried on MacOSX .. there seem to be PTY issues there. Well.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I've also updated the <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://pypi.python.org/pypi/txkqreactor/0.2">http://pypi.python.org/pypi/txkqreactor/0.2</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>for anyone who wants to try before this gets eventually merged into Twisted.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Von:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> twisted-python-bounces@twistedmatrix.com [mailto:twisted-python-bounces@twistedmatrix.com] <b>Im Auftrag von </b>Glyph Lefkowitz<br><b>Gesendet:</b> Sonntag, 6. November 2011 22:13<br><b>An:</b> Twisted general discussion<br><b>Betreff:</b> Re: [Twisted-Python] kqueue reactor / ticket #1918<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Nov 5, 2011, at 1:46 PM, Tobias Oberstein wrote:<o:p></o:p></p></div><p class=MsoNormal><br><br><o:p></o:p></p><div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>Then, baseline. I've run the trial using select reactor in the<o:p></o:p></p></blockquote></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>expectation of finding all tests passed.<o:p></o:p></p></blockquote></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><o:p> </o:p></p></blockquote></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>This is not the case, there are a couple of failed ones. Those are<o:p></o:p></p></blockquote></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>also failed with the kqueue reactor, so I need to know whether I need<o:p></o:p></p></blockquote></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>to inspect those or those are problems unrelated to the reactor, but of<o:p></o:p></p></blockquote></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>general (platform?) nature.<o:p></o:p></p></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><o:p> </o:p></p></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>Are you using Twisted 11? Many of these issues are, if I'm not mistaken,<o:p></o:p></p></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>fixed in trunk (though perhaps not all). So trunk is probably a better baseline<o:p></o:p></p></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>to work off of.<o:p></o:p></p></blockquote><p class=MsoNormal><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> FileDescriptorTests<br> test_expectedFDs ... [FAIL]<br><br>twisted.internet.test.test_process<br> PTYProcessTestsBuilder_KQueueReactor<br> test_openFileDescriptors ... [ERROR]<br> PTYProcessTestsBuilder_PollReactor<br> test_openFileDescriptors ... [ERROR]<br> PTYProcessTestsBuilder_SelectReactor<br> test_openFileDescriptors ... [ERROR]<br>ProcessTestsBuilder_SelectReactor<br> test_openFileDescriptors ... [ERROR]<br><br>This might more a FreeBSD related thing. ?<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Yes.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>These tests <i>should</i> pass; I am guessing this has something to do with the still-open ticket <<a href="http://tm.tl/4747">http://tm.tl/4747</a>>. Maybe have a look at fixing that?<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>You might be able to work around it on your system this by mounting fdescfs at /dev/fd. (This really ought to be the default, please bother someone in FreeBSD-land to make it so. :)).<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>It would be useful to include tracebacks with the errors. "trial --rterrors" is useful, as it includes the tracebacks especially if you are experiencing hanging with the tests.<o:p></o:p></p></div><p class=MsoNormal><br><br><o:p></o:p></p><div><p class=MsoNormal>3)<br>I think I've nailed down the Half-Close stuff.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Awesome. Do you have a link to a changeset for that? (Did I miss it earlier in the thread?)<o:p></o:p></p></div><p class=MsoNormal><br><br><o:p></o:p></p><div><p class=MsoNormal>4)<br>These are kqueue specific. Need to investigate further.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>These are the ones to focus on for <<a href="http://tm.tl/1918">http://tm.tl/1918</a>>, then :).<o:p></o:p></p></div><p class=MsoNormal><br><br><o:p></o:p></p><div><p class=MsoNormal>twisted.internet.test.test_fdset<br> ReactorFDSetTestsBuilder_KQueueReactor<br> test_lostFileDescriptor ... [ERROR]<br> test_removedFromReactor ... [FAIL]<br><br>The first one comes up, since<br><br>removeReader()<br><br>is called for a FD which is gone, and leads to a socket exception from fd = reader.fileno()<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>It sounds like you've narrowed this down pretty far! Good work.<o:p></o:p></p></div><p class=MsoNormal><br><br><o:p></o:p></p><div><p class=MsoNormal>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?<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I would suggest fixing the issues you outlined in point 4 first. It's really unfortunate that reactor issues are being caught by conch tests. The reactor tests should be comprehensive enough to catch everything in the reactor.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>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. If they disappear, then great. 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.<o:p></o:p></p></div></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Thanks again for working on this!<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>-glyph<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div></div></div></body></html>