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
When running a mininet without a cli (net.disableCli()) and hitting Ctrl-C, I get the following trace:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/psutil/_pslinux.py", line 1653, in wrapper
return fun(self, *args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/psutil/_common.py", line 480, in wrapper
raise raise_from(err, None)
File "<string>", line 3, in raise_from
File "/usr/local/lib/python3.8/dist-packages/psutil/_common.py", line 478, in wrapper
return fun(self)
File "/usr/local/lib/python3.8/dist-packages/psutil/_pslinux.py", line 1695, in _parse_stat_file
data = bcat("%s/%s/stat" % (self._procfs_path, self.pid))
File "/usr/local/lib/python3.8/dist-packages/psutil/_common.py", line 813, in bcat
return cat(fname, fallback=fallback, _open=open_binary)
File "/usr/local/lib/python3.8/dist-packages/psutil/_common.py", line 801, in cat
with _open(fname) as f:
File "/usr/local/lib/python3.8/dist-packages/psutil/_common.py", line 765, in open_binary
return open(fname, "rb", buffering=FILE_READ_BUFFER_SIZE)
FileNotFoundError: [Errno 2] No such file or directory: '/proc/2442/stat'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/psutil/__init__.py", line 361, in _init
self.create_time()
File "/usr/local/lib/python3.8/dist-packages/psutil/__init__.py", line 719, in create_time
self._create_time = self._proc.create_time()
File "/usr/local/lib/python3.8/dist-packages/psutil/_pslinux.py", line 1653, in wrapper
return fun(self, *args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/psutil/_pslinux.py", line 1863, in create_time
ctime = float(self._parse_stat_file()['create_time'])
File "/usr/local/lib/python3.8/dist-packages/psutil/_pslinux.py", line 1660, in wrapper
raise NoSuchProcess(self.pid, self._name)
psutil.NoSuchProcess: process no longer exists (pid=2442)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "network.py", line 187, in <module>
net.stopNetwork()
File "/home/p4/p4-tools/p4-utils/p4utils/mininetlib/network_API.py", line 1160, in stopNetwork
self.stop_exec_scripts()
File "/home/p4/p4-tools/p4-utils/p4utils/mininetlib/network_API.py", line 1154, in stop_exec_scripts
kill_proc_tree(pid)
File "/home/p4/p4-tools/p4-utils/p4utils/utils/helper.py", line 481, in kill_proc_tree
parent = psutil.Process(pid)
File "/usr/local/lib/python3.8/dist-packages/psutil/__init__.py", line 332, in __init__
self._init(pid)
File "/usr/local/lib/python3.8/dist-packages/psutil/__init__.py", line 373, in _init
raise NoSuchProcess(pid, msg='process PID not found')
psutil.NoSuchProcess: process PID not found (pid=2442)
When running a mininet without a cli (
net.disableCli()
) and hitting Ctrl-C, I get the following trace:The error comes from the following lines:
p4-utils/p4utils/utils/helper.py
Lines 466 to 483 in e02f06f
An approach to fix this problem is to check whether the process actually exists:
However, I'm not sure what should be returned in case that there is no process; returning
(None, None)
is most probably not the best way to do it.The text was updated successfully, but these errors were encountered: