run-llama / llama_index

LlamaIndex is a data framework for your LLM applications
https://docs.llamaindex.ai
MIT License
33.42k stars 4.69k forks source link

[Bug]: #13834

Open Banjomaestro opened 1 month ago

Banjomaestro commented 1 month ago

Bug Description

The vector_store = TimescaleVectorStore.from_params( service_url=TIMESCALE_SERVICE_URL, table_name=namespace, ) function from llama-index-time-scale-vector package doesnt work anymore and returns

Python(50484,0x7ff845a3d7c0) malloc: error for object 0x16: pointer being freed was not allocated Python(50484,0x7ff845a3d7c0) malloc: set a breakpoint in malloc_error_break to debug Abort trap: 6

Version

llama-index==0.10.40

Steps to Reproduce

just use the function, I am on mac intel.

Relevant Logs/Tracbacks

Python(50484,0x7ff845a3d7c0) malloc: *** error for object 0x16: pointer being freed was not allocated
Python(50484,0x7ff845a3d7c0) malloc: *** set a breakpoint in malloc_error_break to debug
Abort trap: 6
dosubot[bot] commented 1 month ago

The error you're encountering is likely related to memory management issues within the underlying C extensions or libraries used by the timescale_vector client. Here are some steps to help resolve this issue:

  1. Update Dependencies: Ensure you have the latest versions of llama-index, timescale_vector, and other dependencies.

  2. Check for Known Issues: Look for any reported issues on the GitHub repositories of llama-index and timescale_vector.

  3. Isolate the Problem: Create a minimal reproducible example to identify whether the issue is with the TimescaleVectorStore class or the timescale_vector client.

  4. Debugging: Use debugging tools to set breakpoints and inspect memory allocation. The error message suggests setting a breakpoint in malloc_error_break.

  5. Contact Support: If the issue persists, consider reaching out to the maintainers of the llama-index or timescale_vector packages.

Here's a minimal example to help isolate the problem:

from llama_index.legacy.vector_stores.timescalevector import TimescaleVectorStore

# Set up the Timescale service URL
TIMESCALE_SERVICE_URL = "postgres://tsdbadmin:<password>@<id>.tsdb.cloud.timescale.com:<port>/tsdb?sslmode=require"

# Create a TimescaleVectorStore instance
try:
    vector_store = TimescaleVectorStore.from_params(
        service_url=TIMESCALE_SERVICE_URL,
        table_name="your_table_name_here",
    )
    print("Vector store created successfully.")
except Exception as e:
    print(f"An error occurred: {e}")

Ensure that the timescale-vector package is correctly installed and imported:

pip install timescale-vector

If the issue persists, you might need to provide more detailed logs or context for further assistance [1][2].

To continue talking to Dosu, mention @dosu.

logan-markewich commented 1 month ago

@Banjomaestro this seems like an issue with either your env or the timescale vector store package. Maybe you are missing some core libraries (i.e. not python libraries, but system libraries) on the machine you are running on?

It works fine on google colab https://colab.research.google.com/drive/1krUnNZ6q47B0KoCkTAIWdE9t-oVaIUd5?usp=sharing