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

SystemError: NULL object passed to Py_BuildValue #71

Closed
aantn opened this issue Dec 3, 2020 · 3 comments · Fixed by #72
Closed

SystemError: NULL object passed to Py_BuildValue #71

aantn opened this issue Dec 3, 2020 · 3 comments · Fixed by #72
Assignees
Labels

Comments

@aantn
Copy link

aantn commented Dec 3, 2020

On Python 2.7 when constantly calling start/stop/get_func_stats I repeatedly see the following error:

SystemError: NULL object passed to Py_BuildValue

Any idea what could be causing this?

@sumerc sumerc self-assigned this Dec 4, 2020
@sumerc sumerc added the bug label Dec 4, 2020
@sumerc
Copy link
Owner

sumerc commented Dec 4, 2020

Hi,

What OS/Python version are you using? (with minor version info)

Could you provide a simple test script to reproduce the issue. E.x: I am running following script and could not see any issue on Python 2.7.16 on Ubuntu 64-bit:

import yappi
import time


def foo():
    time.sleep(0.1)


n = 0
while (n < 5):
    yappi.start()
    foo()
    yappi.stop()
    yappi.get_func_stats().print_all()

    n += 1

@aantn
Copy link
Author

aantn commented Dec 4, 2020

Your example doesn't reproduce the issue for me either. This example with multithreading does:

import yappi
import time
import thread


def foo():
    while 1:
        time.sleep(0.1)


n = 0
thread.start_new(foo, ())

while True:
    yappi.start()
    time.sleep(0.15)
    yappi.stop()
    yappi.get_func_stats().print_all()

@sumerc
Copy link
Owner

sumerc commented Dec 7, 2020

I have fixed the issue in #72 .

Thanks for reporting!

@sumerc sumerc closed this as completed in #72 Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants