Giter Club home page Giter Club logo

Comments (5)

mewim avatar mewim commented on July 17, 2024 1

I can reproduce this on Ubuntu 22.04 locally. It seems to cause a Segmentation fault. I will look into it.

from kuzu.

min-mwei avatar min-mwei commented on July 17, 2024 1

@prrao87 the use case is to run kuzu on the "server side", assume closing the connection is one way to reuse resources especially there are "close API" for both Connection and Database

from kuzu.

mewim avatar mewim commented on July 17, 2024 1

I think the issue is related to the query result deletion. QueryResult is stored in a factorizedTable whose memory is managed by the bufferManager(database component). If we destroy the database before deleting the query result, Segmentation fault. occurs when python deletes the queryResult. The simplest work around is to always delete queryResults before deleting conneciton and database. simply add del ret before the

conn.close()
db.close()

call

@min-mwei, we also have a QueryResult.close() method: https://kuzudb.com/api-docs/python/kuzu.html#QueryResult.close

Calling ret.close() before closing the connection and database should fix it. It is a bit safer than deleting ret.

from kuzu.

prrao87 avatar prrao87 commented on July 17, 2024

@min-mwei I've seen this same issue come up elsewhere too - may I know the use case for closing the connection explicitly as you did here? The current approach in the Python client is to follow DuckDB's approach, where explicitly closing the connection is not necessary.

from kuzu.

acquamarin avatar acquamarin commented on July 17, 2024

I think the issue is related to the query result deletion.
QueryResult is stored in a factorizedTable whose memory is managed by the bufferManager(database component).
If we destroy the database before deleting the query result, Segmentation fault. occurs when python deletes the queryResult.
The simplest work around is to always delete queryResults before deleting conneciton and database.
simply add del ret before the

conn.close()
db.close()

call

from kuzu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.