bloomberg / memray

Memray is a memory profiler for Python
https://bloomberg.github.io/memray/
Apache License 2.0
13.17k stars 392 forks source link

Core dumped with couchbase==4.1.4 #451

Closed ptitpoulpe closed 1 year ago

ptitpoulpe commented 1 year ago

Is there an existing issue for this?

Current Behavior

Got a core dumped with couchbase library, only importing it.

Expected Behavior

No response

Steps To Reproduce

$ docker run -it --platform "linux/amd64" --entrypoint bash python:3.8-slim-bullseye
root@01e39ff280b8:/# pip install couchbase==4.1.4 memray==1.9.1 
root@01e39ff280b8:/# echo "import couchbase" > test.py
root@01e39ff280b8:/# memray run test.py
Writing profile results into memray-test.py.25.bin
Memray WARNING: Correcting symbol for aligned_alloc from 0x40024d0220 to 0x4001bde9e0
terminate called after throwing an instance of 'std::bad_cast'
  what():  std::bad_cast
qemu: uncaught target signal 6 (Aborted) - core dumped
Aborted

Memray Version

1.9.1

Python Version

3.8

Operating System

Linux

Anything else?

No response

pablogsal commented 1 year ago

Thanks for opening an issue, @ptitpoulpe .This is not a memray problem, but a couchbase problem. I can get the same crash if I just import couchbase after any extension that uses C++:

$ python -m venv venv && source venv/bin/activate && pip install couchbase==4.1.4 pyarrow
$ echo "import pyarrow; import couchbase" > test.py
$ python test.py
terminate called after throwing an instance of 'std::bad_cast'
  what():  std::bad_cast
[1]    3092 abort      python test.py

You should open an issue in the https://github.com/couchbase/docs-sdk-python repo

godlygeek commented 1 year ago

I think https://issues.couchbase.com/projects/PYCBC/issues/ is the right place to report the issue, not that docs-sdk-python repo. I think the PyPI couchbase package corresponds to https://github.com/couchbase/couchbase-python-client/ instead, which has GitHub Issues disabled but https://github.com/couchbase/couchbase-python-client/#support--additional-resources points to that JIRA board.

ptitpoulpe commented 1 year ago

Thanks a lot, sorry for the disruption