Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in logs - gprofiler.exceptions.CalledProcessError: Command '['/app/gprofiler/resources/python/py-spy', 'record', '-r', '11', '-d', '60', '--nonblocking', '--format', 'raw', '-F', '--gil', '--output', '/tmp/gprofiler_tmp/tmp_1t1et36/pyspy.aekVXeImeDEKoAPi.15616.col', '-p', '15616', '--full-filenames']' returned non-zero exit status 1. #153

Closed
rdar-lab opened this issue Jul 30, 2021 · 6 comments

Comments

@rdar-lab
Copy link

Issue recorded in the k8s monitoring system:

Traceback (most recent call last):
File "/app/gprofiler/profiler_base.py", line 111, in snapshot
result = future.result()
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 437, in result
return self.__get_result()
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/app/gprofiler/python.py", line 64, in _profile_process
run_process(self._make_command(process.pid, local_output_path), stop_event=self._stop_event)
File "/app/gprofiler/utils.py", line 178, in run_process
raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr)
gprofiler.exceptions.CalledProcessError: Command '['/app/gprofiler/resources/python/py-spy', 'record', '-r', '11', '-d', '60', '--nonblocking', '--format', 'raw', '-F', '--gil', '--output', '/tmp/gprofiler_tmp/tmp_1t1et36/pyspy.aekVXeImeDEKoAPi.15616.col', '-p', '15616', '--full-filenames']' returned non-zero exit status 1.

@rdar-lab
Copy link
Author

I investigated the logs and found this before the error was recorded:
Failed to get process executable name. Check that the process is running.\nReason: No such file or directory (os error 2)

@Jongy
Copy link
Contributor

Jongy commented Jul 30, 2021

I investigated the logs and found this before the error was recorded:
Failed to get process executable name. Check that the process is running.\nReason: No such file or directory (os error 2)

This error occurs, normally, because the profiled process is not running. Is PID 15616 running? It might be a race condition between gProfiler seeing this process and deciding to profile it; and py-spy failing to profile because the process has meanwhile exited.
If this PID is still running - this is an issue in py-spy and we'll debug it.

@rdar-lab
Copy link
Author

rdar-lab commented Aug 1, 2021

If this is the case, I suggest having this fault somehow reduced from the logs. I have a log monitoring set up and this is triggering some false alarms

@Jongy
Copy link
Contributor

Jongy commented Aug 2, 2021

If this is the case, I suggest having this fault somehow reduced from the logs. I have a log monitoring set up and this is triggering some false alarms

You're absolutely right, we have it written and it will be included in the next release.

@Jongy
Copy link
Contributor

Jongy commented Aug 2, 2021

#155 will avoid the spamming message :)

@Jongy
Copy link
Contributor

Jongy commented Sep 30, 2022

This was implemented in #155, closing.

@Jongy Jongy closed this as completed Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants