-
Notifications
You must be signed in to change notification settings - Fork 268
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
v1.34.0 Segfault on ReadRelationships before WriteSchema when using memstore #1985
Comments
@theronic Are you using an in-memory datastore? |
Please reopen if you can reproduce. If you're using an in-memory datastore and resuming the container, it likely won't function. |
Another segfault on ReadRelationships when running SpiceDB v1.31.0 on CircleCI, when no schema exists:
|
@josephschorr using in-memory container for tests, but no container resumption in the latest segfault case. |
Bumped SpiceDB version to 1.35.2 and same Have you guys considered using Sqlite as a backing store? |
@theronic can you explain the use case further? Are you using I agree that a segfault isn't the best behavior. What behavior are you expecting in this case? Should it be erroring or are you expecting that the schema should be present at this point in your workflow? |
@theronic We've tried to reproduce to no avail and, unless we're missing something, a At this point, we need exact reproduction instructions if possible. |
@tstirrat15 running
The behaviour I expect is that ReadSchema or ReadRelationships should never crash, even if no schema exists. Should return empty string for schema or empty set of relationships on ReadRelationships when blank schema. Segfault concerning for us because it implies under certain conditions if we Read from Spice, it will bring down Spice in prod, but hopefully that won't happen when using Postgres (only memstore). @josephschorr I am attempting to reproduce a minimal example for you. It seems to be related to
Note I am calling this via Clojure using gRPC libraries, but SpiceDB actually crashes in my Docker, so I don't believe this is related to any gRPC impl. bugs. |
I'm not a Go guy, but possibly one of these error values causing it when attempting ReadRelationships before writing any schema. These are guesses, but maybe I am confident there is a memstore bug when reading before writing schema. Seems to be intermittent on my side, which hints at cache-related, or memory allocation related. I cannot consistently reproduce it locally, but can do it consistently on CircleCI on our prod stack, which I'm trying to reduce down to a minimal example. |
What platforms are affected?
macos
What architectures are affected?
amd64
What SpiceDB version are you using?
v1.34.0
Steps to Reproduce
Docker image
sha256:5f81b3ea0702907c847e11cb20a6a58d60921811628da6776336ce2da7c60d68
.I can provide a Docker image and code if you send me an Image registry I can push to. I stopped a SpiceDB Docker container, and then restarted it with
docker start -a <container-id>
and attempted toReadRelationships
for some non-existent schema. TheFailedPrecondition
seems to be the cause of the segfault.Expected Result
Spice should not segfault. ReadRelationships should return an error.
Actual Result
Segmentation Fault. Logs:
The text was updated successfully, but these errors were encountered: