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

Profiler already started after write file failed #830

Closed
Jungzhang opened this issue Oct 27, 2023 · 4 comments
Closed

Profiler already started after write file failed #830

Jungzhang opened this issue Oct 27, 2023 · 4 comments

Comments

@Jungzhang
Copy link

  1. Start proflier task, specific -f to output file, but write file failed
  2. Start new proflier task, Report an error "[ERROR] Profiler already started"
@apangin
Copy link
Collaborator

apangin commented Oct 27, 2023

I'm not sure I fully understand the question - what does "write file failed" exactly means? Does profiler print any error?
Could you share the exact commands you type and all profiler messages?

@apangin
Copy link
Collaborator

apangin commented Oct 27, 2023

[ERROR] Profiler already started message means the profiler is still running. You can stop it with the stop command along with -f option to dump results in the given file.

@Jungzhang
Copy link
Author

Jungzhang commented Oct 28, 2023

Thank you for your reply.

I use ./profiler.sh -d 3 -f /root/profil.html [pid] start a profiler task, write failed because the process does not have write permission to the /root directory. I restart ./profiler.sh -d 3 -f /tmp/profil.html [pid] print [ERROR] Profiler already started.

The stop command could solve my problem. But can I terminate automatically when executing the ./profiler.sh -d 3 -f /root/profil.html [pid] command.

@apangin
Copy link
Collaborator

apangin commented Oct 28, 2023

This is the intended behavior, I don't see an issue here.

If stopping fails (because of permissions or something), profiler keeps running to allow a user to stop it correctly and dump results to a different file.

I'm closing the issue as a duplicate of #699.

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

2 participants