kuzudb / explorer

Browser-based user interface for Kùzu graph database
https://hub.docker.com/r/kuzudb/explorer
MIT License
29 stars 5 forks source link

Error: std::bad_alloc #137

Closed fils closed 4 months ago

fils commented 4 months ago

Curious if there is a known reason I might be getting the following errors trying on on Fedora and Ubuntu.

Has this been seen before, a quick search of issues didn't seem to show any.

Thanks

podman on Fedora

(base) ~/src/Projects/NIAID/domainAssessment/sof git:[master]
podman run --privileged --group-add keep-groups -e GRANT_SUDO=yes --user root -p 8000:8000  -e MODE=READ_ONLY -v /home/fils/src/Projects/NIAID/domainAssessment/sof/kuzu:/database --rm kuzudb/explorer:latest

[16:56:12.057] INFO (1): Access mode: READ_ONLY
node:internal/process/promises:289
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[Error: std::bad_alloc]

Node.js v20.12.2

same for Docker on Ubuntu

docker run -p 8000:8000 -v ./kuzu:/database --rm kuzudb/explorer:latest
[17:28:35.509] INFO (1): Access mode: READ_WRITE
node:internal/process/promises:289
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[Error: std::bad_alloc]

Node.js v20.12.2

same issue on podman with the recommended

podman run -p 8000:8000 \
           -v  /home/fils/src/Projects/NIAID/domainAssessment/sof/kuzu:/database \
           --userns=keep-id \
           --rm kuzudb/explorer:latest
mewim commented 4 months ago

Hi @fils, the error seems to suggest that the database file is corrupted / not compatible with this version of Explorer. Does launching Explorer without mounting a local database works for you?

fils commented 4 months ago

@mewim good catch, and that does run

[12:14:12.341] INFO (1): Access mode: READ_WRITE
[12:14:12.404] INFO (1): Version of Kùzu: 0.3.2
[12:14:12.404] INFO (1): Storage version of Kùzu: 26
[12:14:12.406] INFO (1): Deployed server started on port: 8000

What is the difference between "version of Kuzu" and "storage version of kuzu"

Also, it might be nice if that could be caught and reported as a error vs the "bad_alloc"

I'll try and align my kuzu versions between my code and explorer and report back.

mewim commented 4 months ago

@fils Did you create your dataset with a dev build of kuzu? For stable releases, each of them has a storage version which is also stored in the database catalog, so that we can check whether a database file is compatible with the version of kuzu and report an error. However, for dev builds, since it is built automatically by a CI job, the storage version is not maintained, so even if the file indicates it is the same storage version, the actual format maybe incompatible.

fils commented 4 months ago

@mewim I bet this one was, was playing with some of the early RDF approaches and I know a fix got put in a dev build I wanted. I suspect this run environment still has it.

So, if it wasn't a dev build the check would have occurred? Good to know, and looks like it was all on me (go figure) ;)

Thanks for the help, I'll make the changes, re-run and report back.

mewim commented 4 months ago

@fils If you are using a dev build, you can also try to use the dev version of explorer by replacing kuzudb/explorer:latest with kuzudb/explorer:dev. For dev builds, it maybe a bit tricky to align the version of explorer and the version of dev build since we do not check automatically and only keep one latest dev build for the explorer app.

fils commented 4 months ago

@mewim So it works now in docker via an Ubuntu VM running on my Fedora WS. However, I am still seeing an permission issue with the lock file on podman in Fedora itself. I can't work on this here now, but I will investigate and report back.

Thanks for your help! Have it working in docker at least. The people I want to share with will be using docker, not podman, so hopefully all is good now that the db versions are aligned.

Will update with what I find out re: podman

mewim commented 4 months ago

@fils Glad to hear it works for you in Docker. For podman, it seems that --userns=keep-id did the trick for me when I tested it a few months ago. If it does not work now, I'll look into it again.

mewim commented 4 months ago

I am closing this for now. If you encounter another issue while using Explorer, feel free to reopen this or file a new issue.