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

[Windows] Multiple Calls to psutil.users() Deallocates None #1965

Closed
blackadar opened this issue Jul 14, 2021 · 1 comment
Closed

[Windows] Multiple Calls to psutil.users() Deallocates None #1965

blackadar opened this issue Jul 14, 2021 · 1 comment

Comments

@blackadar
Copy link

Summary

  • OS: Windows 10
  • Architecture: 64-bit
  • Psutil version: 5.8.0
  • Python version: 3.8.5
  • Type: core

Description

Calling psutil.users() approximately 4,850 times will end in:

Fatal Python error: deallocating None
Python runtime state: initialized

This can be shown by aggressively calling the function, for example:

import psutil

def main():
    i = 0

    while True:
        print(i)
        psutil.users()
        i += 1


if __name__ == '__main__':
    main()

I'm assuming this could be similar to this issue using Py_DECREF(Py_None).

@blackadar
Copy link
Author

Thank you! :)

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