This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Warning -- asyncore.socket_map was modified by test_ssl
Type: resource usage Stage: resolved
Components: Tests Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: vstinner
Priority: normal Keywords:

Created on 2017-04-28 13:38 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 1381 merged vstinner, 2017-05-02 10:18
PR 1389 merged vstinner, 2017-05-02 14:30
PR 1390 merged vstinner, 2017-05-02 14:30
PR 1408 merged vstinner, 2017-05-03 01:31
Messages (6)
msg292532 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-04-28 13:38
It seems like test_asyncore_server() of test_ssl doesn't cleanup properly asyncore on FreeBSD, and so following unit tests can be impacted (and fail).

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Debug%203.x/builds/210/steps/test/logs/stdio

test_asyncore_server (test.test_ssl.ThreadedTests)
Check the example asyncore integration. ... 
 server:  new connection from 127.0.0.1:48985
 client:  sending b'FOO\n'...
 server:  read b'FOO\n' from client
 client:  read b'foo\n'
 client:  closing connection.
 server:  read b'over\n' from client
 client:  connection closed.
 cleanup: stopping server.
 cleanup: joining server thread.
 cleanup: successfully joined.
ok
...
Warning -- asyncore.socket_map was modified by test_ssl
  Before: {}
  After:  {6: <test.test_ssl.AsyncoreEchoServer.EchoServer.ConnectionHandler 127.0.0.1:48985 at 0x80664c468>}

Maybe AsyncoreEchoServer.__exit__() should just ends with "asyncore.close_all(ignore_all=True)"?
msg292746 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-02 11:12
New changeset 1dae7450c68bad498e57800387b24cb103c461fa by Victor Stinner in branch 'master':
bpo-30199: test_ssl closes all asyncore channels (#1381)
https://github.com/python/cpython/commit/1dae7450c68bad498e57800387b24cb103c461fa
msg292770 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-02 14:48
New changeset 89a54c73746417bae003a9985668fa665040d5d9 by Victor Stinner in branch '3.5':
bpo-30199: test_ssl closes all asyncore channels (#1381) (#1389)
https://github.com/python/cpython/commit/89a54c73746417bae003a9985668fa665040d5d9
msg292771 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-02 14:49
New changeset 3c422b92653df05c7034136b77f76376aa5aec4f by Victor Stinner in branch '3.6':
bpo-30199: test_ssl closes all asyncore channels (#1381) (#1390)
https://github.com/python/cpython/commit/3c422b92653df05c7034136b77f76376aa5aec4f
msg292830 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-03 01:47
New changeset d1c862ffa73b222746035155817d2516c4f5b71e by Victor Stinner in branch '2.7':
bpo-30199: test_ssl closes all asyncore channels (#1381) (#1408)
https://github.com/python/cpython/commit/d1c862ffa73b222746035155817d2516c4f5b71e
msg292883 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-03 10:34
Fix applied to 2.7, 3.5, 3.6 and master (3.7).
History
Date User Action Args
2022-04-11 14:58:45adminsetgithub: 74385
2017-05-03 10:34:25vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg292883

stage: resolved
2017-05-03 01:47:36vstinnersetmessages: + msg292830
2017-05-03 01:31:44vstinnersetpull_requests: + pull_request1514
2017-05-02 14:49:12vstinnersetmessages: + msg292771
2017-05-02 14:48:39vstinnersetmessages: + msg292770
2017-05-02 14:30:27vstinnersetpull_requests: + pull_request1497
2017-05-02 14:30:08vstinnersetpull_requests: + pull_request1496
2017-05-02 11:12:04vstinnersetmessages: + msg292746
2017-05-02 10:18:05vstinnersetpull_requests: + pull_request1489
2017-04-28 13:38:20vstinnercreate