[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-11 Thread Vinay Sajip
Changes by Vinay Sajip : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4651bf40af8d by Senthil Kumaran in branch 'default': issue12039 - update the documentation of send_response method in http.server.rst. http://hg.python.org/cpython/rev/4651bf40af8d -- ___ Python tracker

[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-11 Thread Senthil Kumaran
Senthil Kumaran added the comment: Hi Vinay, Normally, when one uses send_response() call, it is most often followed with (multiple) send_header() calls and I updated the documentation keeping that in mind. Just calling of send_response() without any send_header and end_headers was an interes

[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-10 Thread Vinay Sajip
Vinay Sajip added the comment: Senthil: Almost, but not quite. end_headers() needs to be called even if send_header() isn't called (though it may be being called behind the scenes, that's not necessarily obvious to a user). In my original unit-testing code, I had only request.send_response(2

[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset d59ec3aa442e by Senthil Kumaran in branch 'default': Issue #12039 - Update the http.server.rst with the requirement to call `end_headers` after calling `send_header`. http://hg.python.org/cpython/rev/d59ec3aa442e -- __

[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-10 Thread Senthil Kumaran
Senthil Kumaran added the comment: On Tue, May 10, 2011 at 02:06:48PM +, Vinay Sajip wrote: > @Senthil - are you planning to make the documentation change, or should I? I shall do it, Vinay. Thanks! -- ___ Python tracker

[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-10 Thread Vinay Sajip
Vinay Sajip added the comment: @Senthil - are you planning to make the documentation change, or should I? -- ___ Python tracker ___ _

[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-10 Thread Senthil Kumaran
Senthil Kumaran added the comment: On Tue, May 10, 2011 at 09:12:58AM +, Vinay Sajip wrote: > Either omitting the end_headers() call was always an error but > previously undetected, or the requirement to always call > end_headers() is new and this should be documented. I'm not sure > which o

[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-10 Thread Vinay Sajip
Vinay Sajip added the comment: The errors seem to have gone away now, but there is still apparently a behaviour change - previously there was no error when a end_headers() call was omitted when handling a request, but now apparently an end_headers() call is needed to avoid the error. Either

[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 204e027dfa98 by Vinay Sajip in branch 'default': Issue #12039: Add end_headers() call to avoid BadStatusLine. http://hg.python.org/cpython/rev/204e027dfa98 -- ___ Python tracker

[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-10 Thread Vinay Sajip
Vinay Sajip added the comment: Additional information point for Senthil: In the case where the BadStatusLine is raised, the server is sending a 200 OK status response but there is no actual response data - only headers. -- ___ Python tracker

[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-09 Thread Vinay Sajip
Vinay Sajip added the comment: I've done a bit more investigating, and the select.error is raised in the server thread when the main thread closes the SMTP server (asyncore.dispatcher). I've modified the server code to swallow the error if the server has been closed. This closes the issue as

[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset b365036b17c2 by Vinay Sajip in branch 'default': Issue #12039: Now suppress spurious select.error raised on FreeBSD when the server (an asyncore.dispatcher) is closed. http://hg.python.org/cpython/rev/b365036b17c2 -- nosy: +python-dev ___

[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-09 Thread Vinay Sajip
Vinay Sajip added the comment: Ok, I'll leave the BadStatusLine problem for Senthil to investigate. I have reproduced the problem with the SMTP server on FreeBSD, but this problem does not occur on Linux and I'm not sure why it would fail on FreeBSD. I've attached a script, smtp_test.py, whic

[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-09 Thread Senthil Kumaran
Senthil Kumaran added the comment: I could reproduce the BadStatusLine exception using Vinay's server_test.py. I see that the exception is triggered by logging package when it is trying to http.client's getresponse() before it is ready. The previous commit 25298224cb25 was on http.server (cli

[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-09 Thread Stefan Krah
Stefan Krah added the comment: Maybe this link to the revision works: 2ab07776510c -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-09 Thread Stefan Krah
Stefan Krah added the comment: We might have two issues here. On FreeBSD the select.error occurs reliably starting with r69723 (when the tests were added): [buildbot@freebsd-amd64 /usr/home/buildbot/cpython]$ ./python -m test -uall test_logging [1/1] test_logging /usr/home/buildbot/cpython/Lib

[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-09 Thread Vinay Sajip
Vinay Sajip added the comment: The change which causes the apparently spurious messages is one made by Senthil: 25298224cb25 - with the earlier revision 1ac03e071d65 the messages don't occur, as you can see here: vinay@eta-jaunty:~/projects/python/default$ hg update -r 69980 merging Lib/test/

[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-09 Thread Vinay Sajip
Vinay Sajip added the comment: The rest isn't actually failing - it's just that a spurious BadStatusLine exception appears to be being raised. -- ___ Python tracker ___ ___

[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-09 Thread Vinay Sajip
Vinay Sajip added the comment: I've attached a smaller script which shows up the error. It's not tiny, but tests the SMTP and HTTP handler tests which show the failures mentioned in Stefan's post. -- Added file: http://bugs.python.org/file21947/server_test.py

[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-09 Thread Vinay Sajip
Vinay Sajip added the comment: I've made recent changes in test_logging to improve coverage, but these errors were not being raised on my local development machine (Ubuntu Jaunty). They have recently started occurring on my machine, too, so at the moment I'm suspecting some other change which

[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-09 Thread Stefan Krah
Changes by Stefan Krah : -- keywords: +buildbot ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-09 Thread Stefan Krah
New submission from Stefan Krah : The FreeBSD-AMD64 bot shows an error in test_logging: http://www.python.org/dev/buildbot/all/builders/AMD64%20FreeBSD%208.2%203.x/builds/243/steps/test/logs/stdio Exception in thread Thread-281: Traceback (most recent call last): File "/usr/home/buildbot/buil