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

Error encountered by using awadb_client.Search #35

Open
taozhiwang opened this issue Sep 4, 2023 · 0 comments
Open

Error encountered by using awadb_client.Search #35

taozhiwang opened this issue Sep 4, 2023 · 0 comments

Comments

@taozhiwang
Copy link

Hi!

I am having the following problem with awadb_client.Search. When I include the meta_filter in the call to search, it will report the error. Errors are reported at irregular intervals and there may be an underlying parallelism issue. Here is the code I am using to test.

import awadb
# 1. Initialize awadb client!
awadb_client = awadb.Client()

# 2. Create table!
awadb_client.Create("testdb")

# 3. Add docs to the table. Can also update and delete the doc!
awadb_client.Add([{'name':'jim'}, {'age':39}, {'desc':'hello'}, {'vec':[1, 3.5, 3]}])
awadb_client.Add([{'name':'vincent'}, {'age':28}, {'desc':'world'}, {'vec':[1, 3.4, 2]}])
awadb_client.Add([{'name':'david'}, {'age':45}, {'desc':'hi'},  {'vec':[1, 2.4, 4]}])
awadb_client.Add([{'name':'tom'}, {'age':25}, {'desc':'dolly'}, {'vec':[1.3, 2.9, 8.9]}])

# 4. Search by specified vector query and the most TopK similar result
results = awadb_client.Search("hello", 3, meta_filter={"max_age" : 30})

# Output the results
print(results)

Here are a few typical error messages I get. (It might have race conditions resulting from unsafe access to critical sections)

  1. malloc error
Python(52184,0x1e12fe080) malloc: *** error for object 0x200000003: pointer being freed was not allocated
Python(52184,0x1e12fe080) malloc: *** set a breakpoint in malloc_error_break to debug
[1]    52184 abort      /opt/homebrew/bin/python3 
/opt/homebrew/Cellar/python@3.11/3.11.4/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '
  1. Segmentation fault (noticed that it actually printed the correct output)
[{'ResultSize': 2, 'ResultItems': [{'vec': [1.0, 3.4000000953674316, 2.0], 'name': 'vincent', 'age': 28, 'desc': 'world'}, {'vec': [1.2999999523162842, 2.9000000953674316, 8.899999618530273], 'name': 'tom', 'age': 25, 'desc': 'dolly'}]}]
[1]    52496 segmentation fault  /opt/homebrew/bin/python3 
  1. bus error
/opt/homebrew/Cellar/python@3.11/3.11.4/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '
[1]    52640 bus error  /opt/homebrew/bin/python3 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant