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

Importing rubicon.objs hangs on pypy #406

Open
almarklein opened this issue Feb 1, 2024 · 1 comment
Open

Importing rubicon.objs hangs on pypy #406

almarklein opened this issue Feb 1, 2024 · 1 comment
Labels
bug A crash or error in behavior.

Comments

@almarklein
Copy link

Describe the bug

When I try to import rubicon.objc using Pypy, the process hangs while it allocates more and more memory. I traced this down to this line, and it seems to be related to the PyDictObject:

class StgDictObject(ctypes.Structure):
_fields_ = [
("dict", PyDictObject),
("size", ctypes.c_ssize_t),
("align", ctypes.c_ssize_t),
("length", ctypes.c_ssize_t),
("ffi_type_pointer", ffi_type),
("proto", ctypes.py_object),
("setfunc", SETFUNC),
("getfunc", GETFUNC),
# There are a few more fields, but we leave them out again because we don't need them.
]

With "traced it down" I mean that I put 1/0 in the code to make it raise an exception. If the it hung instead of raising the exception, then the hangup occurred bedore it. The code above is where it hangs. And if I comment the field with the PyDictObject, then it does not hang, so it looks like it's related to that.

I tried with pypy3.8-7.3.11 and pypy3.9-7.3.11, both installed via pyenv.

Steps to reproduce

Run import ubicon.objc in a pypy interpreter. The process hangs, does not respond to ctrl-c.

Expected behavior

I would expect the import to work :)

Screenshots

No response

Environment

MacOS M1 pro Sonoma 14.3

Logs


Additional context

No response

@almarklein almarklein added the bug A crash or error in behavior. label Feb 1, 2024
@freakboy3742
Copy link
Member

Thanks for the report; we don't include PyPy in our testing, and I can't claim any particular expertise with PyPy, so I can't comment on what is going on here. If anyone is able to provide a patch, I'm happy to apply it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A crash or error in behavior.
Projects
None yet
Development

No branches or pull requests

2 participants