You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Jiri Daněk (Jira)" <ji...@apache.org> on 2021/07/22 14:53:00 UTC
[jira] [Commented] (DISPATCH-2119) [macOS] OSError: [Errno 24] Too
many open files in system_tests_qdstat and system_tests_qdmanage
[ https://issues.apache.org/jira/browse/DISPATCH-2119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17385572#comment-17385572 ]
Jiri Daněk commented on DISPATCH-2119:
--------------------------------------
The fix for DISPATCH-2033 added {{cls.router_2.wait_router_connected('R1')}}. This wait never succeeds, because the test framework tries to then send a management query on inter-router listener (that is the exception below). Therefore the test loops for 60 seconds, or whatever the time limit for the retry is, and then proceeds with the test. Doing a {{sleep(60)}} instead would work better.
The reason why this exhausts file descriptors is that creating a Node instance creates a BlockingConnection, which is never closed on this exception path. MacOS either has a low fd limit, or is able to run through the loop quickly, (or both).
This is the danger of bare {{except:}} in Python. You never know what exception you actually end up catching. I think that this particular exception is highly unexpected and it should not be caught at all; it should bubble to the top level and crash the test.
{noformat}
File "/home/jdanek/.local/share/JetBrains/Toolbox/apps/CLion/ch-0/212.4746.15/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_exec2.py", line 3, in Exec
exec(exp, global_vars, local_vars)
File "<input>", line 1, in <module>
File "/home/jdanek/repos/qpid/qpid-dispatch/tests/system_test.py", line 474, in management
self._management = Node.connect(self.addresses[0], timeout=TIMEOUT)
File "/home/jdanek/repos/qpid/qpid-dispatch/python/qpid_dispatch/management/client.py", line 125, in connect
return Node(Node.connection(url, router, timeout, ssl_domain, sasl,
File "/home/jdanek/repos/qpid/qpid-dispatch/python/qpid_dispatch/management/client.py", line 141, in __init__
self.client = SyncRequestResponse(connection, self.url.path)
File "/home/jdanek/.local/share/virtualenvs/qpid-dispatch-Wxq-GF1B/lib/python3.9/site-packages/proton/_utils.py", line 577, in __init__
self.sender = self.connection.create_sender(self.address)
File "/home/jdanek/.local/share/virtualenvs/qpid-dispatch-Wxq-GF1B/lib/python3.9/site-packages/proton/_utils.py", line 395, in create_sender
return BlockingSender(self, self.container.create_sender(self.conn, address, name=name, handler=handler,
File "/home/jdanek/.local/share/virtualenvs/qpid-dispatch-Wxq-GF1B/lib/python3.9/site-packages/proton/_utils.py", line 95, in __init__
super(BlockingSender, self).__init__(connection, sender)
File "/home/jdanek/.local/share/virtualenvs/qpid-dispatch-Wxq-GF1B/lib/python3.9/site-packages/proton/_utils.py", line 40, in __init__
self.connection.wait(lambda: not (self.link.state & Endpoint.REMOTE_UNINIT),
File "/home/jdanek/.local/share/virtualenvs/qpid-dispatch-Wxq-GF1B/lib/python3.9/site-packages/proton/_utils.py", line 501, in wait
self.container.process()
File "/home/jdanek/.local/share/virtualenvs/qpid-dispatch-Wxq-GF1B/lib/python3.9/site-packages/proton/_reactor.py", line 240, in process
event.dispatch(handler)
File "/home/jdanek/.local/share/virtualenvs/qpid-dispatch-Wxq-GF1B/lib/python3.9/site-packages/proton/_events.py", line 162, in dispatch
_dispatch(handler, type.method, self)
File "/home/jdanek/.local/share/virtualenvs/qpid-dispatch-Wxq-GF1B/lib/python3.9/site-packages/proton/_events.py", line 123, in _dispatch
m(*args)
File "/home/jdanek/.local/share/virtualenvs/qpid-dispatch-Wxq-GF1B/lib/python3.9/site-packages/proton/_utils.py", line 520, in on_link_remote_close
raise LinkDetached(event.link)
proton._utils.LinkDetached: sender 49c1e199-a37c-4f58-bc6d-2dfc2d4dfbc5-$management to $management closed due to: Condition('qd:connection-role', 'Link attach forbidden on inter-router connection')
{noformat}
> [macOS] OSError: [Errno 24] Too many open files in system_tests_qdstat and system_tests_qdmanage
> ------------------------------------------------------------------------------------------------
>
> Key: DISPATCH-2119
> URL: https://issues.apache.org/jira/browse/DISPATCH-2119
> Project: Qpid Dispatch
> Issue Type: Test
> Affects Versions: 1.17.0
> Reporter: Jiri Daněk
> Assignee: Jiri Daněk
> Priority: Major
>
> https://travis-ci.com/github/apache/qpid-dispatch/jobs/503204162#L3163
> This issue appeared after https://github.com/apache/qpid-dispatch/commit/68c08365628360ace9b9a32f02357eea3eda4adc was merged. Since it is touching precisely the two failing test classes, it looks likely it is the culprit.
> The test is probably using too many file descriptors, and the added check simply brought it over the limit. That is my guess without actually looking deep into it.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org