Thanks to visit codestin.com
Credit goes to github.com

Skip to content

typedb server crashs when comparing entity using == #7607

@max044

Description

@max044

Description

When comparing two entities using ==, TypeDB Rust engine panics with “entered unreachable code”, crashing the server. The query should be rejected gracefully, not cause an internal panic.

Environment

  1. TypeDB distribution: Core/Cloud
  2. TypeDB version: 3.5.4
  3. Environment: Mac/TypeDB Cloud
  4. Client and version: TypeDB Server / Studio (matching server)
  5. Other details: crash in Rust backend, in type_seeder.rs:1312

Reproducible Steps

  1. Set up minimal schema:
define
  attribute name, value string;

  entity obj1,
    owns name;
  entity obj2,
    owns name;
  1. Execute the following query:
match
  $o1 isa obj1;
  $o2 isa obj2;

  $o1 == $o2;
  1. The TypeDB server crashes / panics internally.

Expected result

A controlled error, such as TypeQL Error: invalid comparison between concepts or similar, rejecting the query without bringing down the server.

Additional information

Relevant logs:

thread 'tokio-runtime-worker' panicked at compiler/annotation/type_seeder.rs:1312:22:
internal error: entered unreachable code: Expected attribute type
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions