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

Vmprof: "Undefined" in flamegraph, and "No stack trace has been recorded (profile is empty)!" #220

Open
shhovhan opened this issue Apr 2, 2020 · 1 comment

Comments

@shhovhan
Copy link

shhovhan commented Apr 2, 2020

Hello all,
Its seems that last changes and udpates on vmprof were in 2019, but I hope someone will help me to setup vmprof for my project. Here are the problems:
I have installed vmprof client and server and when I run vmprof

  1. by API like this:
             with open('logs/vmprof.log', 'w+b') as fd:
                vmprof.enable(fd.fileno())
                ..... some code here.....
                ..... some code here.....
                ..... some code here.....
                vmprof.disable()

it creates vmprof.log file as expected. then I upload it to my local server and as a result I see lot of "undefined" in flamegraph.
undefined

QUESTION: What to do with this undefineds. How to solve this problem?
2. I want to enable and disable profiling by a signal. For that I use SIGUSR signal custom handler: here is the code:

    gevent.signal(signal.SIGUSR1, self.sigusr1_handler)
    def sigusr1_handler(self):
        if not vmprof.is_enabled():
            with open('logs/vmprof.log', 'w+b') as fd:
                vmprof.enable(fd.fileno())
        else:
            vmprof.disable()

it creates vmprof log, but when I try to open on server there were nothing, infinite loading and preloader. I have tried to see if it works with vmprofshow but I got this message:

WARNING: The profiling completed in less than 1 seconds. Please run your programs longer!
No stack trace has been recorded (profile is empty)!

QUESTION: How to solve this problem? Is it possible to enable or disable vmprof by signal?

@shhovhan shhovhan changed the title Vmprof "No stack trace has been recorded (profile is empty)!" Vmprof: "Undefined" in flamegraph, and "No stack trace has been recorded (profile is empty)!" Apr 2, 2020
@shhovhan
Copy link
Author

shhovhan commented Apr 2, 2020

UPDATES:
In 2nd case vmprof.log is not empty. Logging information written in file. I can find there all known function names that you can see in flamegraph above.
I use Python 2.7, pypy 6.0, vmprof 0.4.15, 0.4.13, 0.4.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant