You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug description
Running psutil.net_connections() a few thousand times while monitoring the machine leads to this error message. It looks like there is an issue in the _psosx.py file that is trying to run cext.proc_connections() on a socket
traceback message (
File "macos_agent.py", line 86, in ip_receive
connections = psutil.net_connections()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/psutil/__init__.py", line 2248, in net_connections
return _psplatform.net_connections(kind)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/psutil/_psosx.py", line 252, in net_connections
cons = Process(pid).connections(kind)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/psutil/_psosx.py", line 339, in wrapper
return fun(self, *args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/psutil/_psosx.py", line 528, in connections
rawlist = cext.proc_connections(self.pid, families, types)
OSError: [Errno 102] Operation not supported on socket
)
connections=psutil.net_connections()
Test results
# No failures
The text was updated successfully, but these errors were encountered:
I confirm the behavior still exists with ps_util 5.7.0 and macOS 10.15.3 when looping a thousand times over this: for proc in psutil.process_iter(): info = proc.as_dict(attrs=['pid', 'name', 'username', 'connections'])
Platform
Bug description
Running psutil.net_connections() a few thousand times while monitoring the machine leads to this error message. It looks like there is an issue in the _psosx.py file that is trying to run cext.proc_connections() on a socket
Test results
The text was updated successfully, but these errors were encountered: