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
calling psutil.process_iter fails. It only fails when run by my CI process (gitlab-runner), and with 5.6.1, I have no error. It seems that it fails to handle permission error correctly, if I understand the code well
Traceback (most recent call last):
File "C:\Users\jenkins\AppData\Local\Tanker\dmenv\venv\dev\3.6.7\sdk-js\lib\site-packages\psutil\_pswindows.py", line 716, in wrapper
return fun(self, *args, **kwargs)
File "C:\Users\jenkins\AppData\Local\Tanker\dmenv\venv\dev\3.6.7\sdk-js\lib\site-packages\psutil\_pswindows.py", line 774, in exe
exe = cext.proc_exe(self.pid)
PermissionError: [WinError 31] A device attached to the system is not functioning: '(originated from QueryFullProcessImageNameW)'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\jenkins\AppData\Local\Tanker\dmenv\venv\dev\3.6.7\sdk-js\lib\site-packages\psutil\__init__.py", line 773, in exe
exe = self._proc.exe()
File "C:\Users\jenkins\AppData\Local\Tanker\dmenv\venv\dev\3.6.7\sdk-js\lib\site-packages\psutil\_pswindows.py", line 718, in wrapper
raise convert_oserror(err, pid=self.pid, name=self._name)
psutil.AccessDenied: psutil.AccessDenied (pid=120, name='Registry')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\jenkins\AppData\Local\Tanker\dmenv\venv\dev\3.6.7\sdk-js\lib\site-packages\psutil\_pswindows.py", line 790, in cmdline
ret = cext.proc_cmdline(self.pid, use_peb=True)
PermissionError: [WinError 5] Access is denied
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\jenkins\appdata\local\tanker\dmenv\venv\dev\3.6.7\sdk-js\src\ci\ci\js.py", line 71, in find_procs_by_name
for p in psutil.process_iter(attrs=["name", "exe", "cmdline"]):
File "C:\Users\jenkins\AppData\Local\Tanker\dmenv\venv\dev\3.6.7\sdk-js\lib\site-packages\psutil\__init__.py", line 1566, in process_iter
yield add(pid)
File "C:\Users\jenkins\AppData\Local\Tanker\dmenv\venv\dev\3.6.7\sdk-js\lib\site-packages\psutil\__init__.py", line 1543, in add
proc.info = proc.as_dict(attrs=attrs, ad_value=ad_value)
File "C:\Users\jenkins\AppData\Local\Tanker\dmenv\venv\dev\3.6.7\sdk-js\lib\site-packages\psutil\__init__.py", line 638, in as_dict
ret = meth()
File "C:\Users\jenkins\AppData\Local\Tanker\dmenv\venv\dev\3.6.7\sdk-js\lib\site-packages\psutil\__init__.py", line 775, in exe
return guess_it(fallback=err)
File "C:\Users\jenkins\AppData\Local\Tanker\dmenv\venv\dev\3.6.7\sdk-js\lib\site-packages\psutil\__init__.py", line 757, in guess_it
cmdline = self.cmdline()
File "C:\Users\jenkins\AppData\Local\Tanker\dmenv\venv\dev\3.6.7\sdk-js\lib\site-packages\psutil\__init__.py", line 790, in cmdline
return self._proc.cmdline()
File "C:\Users\jenkins\AppData\Local\Tanker\dmenv\venv\dev\3.6.7\sdk-js\lib\site-packages\psutil\_pswindows.py", line 718, in wrapper
raise convert_oserror(err, pid=self.pid, name=self._name)
File "C:\Users\jenkins\AppData\Local\Tanker\dmenv\venv\dev\3.6.7\sdk-js\lib\site-packages\psutil\_pswindows.py", line 708, in convert_oserror
raise exc
File "C:\Users\jenkins\AppData\Local\Tanker\dmenv\venv\dev\3.6.7\sdk-js\lib\site-packages\psutil\_pswindows.py", line 716, in wrapper
return fun(self, *args, **kwargs)
File "C:\Users\jenkins\AppData\Local\Tanker\dmenv\venv\dev\3.6.7\sdk-js\lib\site-packages\psutil\_pswindows.py", line 793, in cmdline
ret = cext.proc_cmdline(self.pid, use_peb=False)
OSError: [WinError 1168] Element not found: '(originated from NtQueryInformationProcess(ProcessBasicInformation))'
Platform
Bug description
calling
psutil.process_iter
fails. It only fails when run by my CI process (gitlab-runner), and with 5.6.1, I have no error. It seems that it fails to handle permission error correctly, if I understand the code wellThe text was updated successfully, but these errors were encountered: