{"level":"debug","requestID":"
# spicedb
z
{"level":"debug","requestID":"cq37jb1q95bdvsq3db5g","pgx":{"args":[{},true,{},false,"document"],"commandTag":"SELECT 0","pid":14528,"sql":"SELECT serialized_config, created_xid FROM namespace_config WHERE pg_visible_in_snapshot(created_xid, $1) = $2 AND pg_visible_in_snapshot(deleted_xid, $3) = $4 AND namespace = $5","time":1.479396},"time":"2024-07-04T10:30:04Z","message":"Query"} {"level":"warn","protocol":"grpc","grpc.component":"server","grpc.service":"authzed.api.v1.PermissionsService","grpc.method":"ReadRelationships","grpc.method_type":"server_stream","requestID":"cq37jb1q95bdvsq3db5g","peer.address":"127.0.0.1:41068","grpc.start_time":"2024-07-04T10:30:04Z","grpc.code":"FailedPrecondition","grpc.error":"object definition
document
not found","grpc.time_ms":10,"time":"2024-07-04T10:30:04Z","message":"finished call"} {"level":"debug","requestID":"cq37jcpq95bdvsq3db60","now":"2024-07-04T10:30:11Z","time":"2024-07-04T10:30:11Z","message":"computing new revision"} {"level":"debug","requestID":"cq37jcpq95bdvsq3db60","pgx":{"args":[],"commandTag":"SELECT 1","pid":14528,"sql":"\n\tWITH selected AS (SELECT COALESCE(\n\t\t(SELECT xid FROM relation_tuple_transaction WHERE timestamp >= TO_TIMESTAMP(FLOOR(EXTRACT(EPOCH FROM NOW() AT TIME ZONE 'utc') * 1000000000 / 5000000000) * 5000000000 / 1000000000) AT TIME ZONE 'utc' ORDER BY timestamp ASC LIMIT 1),\n\t\tNULL\n\t) as xid)\n\tSELECT selected.xid,\n\tCOALESCE((SELECT snapshot FROM relati...","time":0.5303},"time":"2024-07-04T10:30:11Z","message":"Query"} {"level":"debug","requestID":"cq37jcpq95bdvsq3db60","now":"2024-07-04T10:30:11Z","valid":"2024-07-04T10:30:14Z","validFor":"3.749268s","time":"2024-07-04T10:30:11Z","message":"setting valid through"} panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x15b334d] Our docker down due to this parts of log
v
yikes, that looks bad, what API call are you doing? Can you help me reproduce this on our end?
I see it's ReadRelationships
can you share your API call? what does your database look like?
one thing you could do to help us reproduce this is to use
zed
command line tool, the official SpiceDB client CLI, which allows you to perform a backup of your SpiceDB instance and share it with us securely (you can create a backup with
zed backup create
and then "redact" all sensitive data using
zed backup redact
, which obfuscates the schema and relationships)
z
sorry, I have not installed zed yet, my colleague execute two apis: our schema is:
Copy code
{
  "schemaText": "definition user {\n\trelation manager: department\n\tpermission view = manager->view\n}\n\ndefinition department {\n\trelation child: department#child\n\trelation member: user\n\tpermission view = member + child->view\n}",
  "readAt": {
    "token": "GgYKBENQMEs="
  }
}
what he execute is:
/v1/permissions/resources
Copy code
{
  "consistency": {
    "minimizeLatency": true
  },
  "resourceObjectType": "document",
  "permission": "view",
  "subject": {
    "object": {
      "objectType": "user",
      "objectId": "alice"
    }
  }
}
v1/permissions/subjects
Copy code
{
  "consistency": {
    "minimizeLatency": true
  },
  "subjectObjectType": "user",
  "permission": "view",
  "resource": {
    "objectType": "document",
    "objectId": "topsecret1"
  }
}
not sure what really cause the error, I can't reproduce the error situation
v
is it happening deterministically or only sometimes?
z
deterministically , I only met once, may be need keep watching
v
it only once then it's not deterministic, is it?
z
yea
sorry, i missunderstand the words deterministically
v
no worries!
3 Views