apache / apache/age

CREATE` followed by a bound-node path read causes a PostgreSQL backend segmentation fault

Open
#2,527 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
C
Stars
4.8k
Forks
523
Avg merge
1d 2h
Merged PRs (30d)
9

Description

Docker image `apache/age:release_PG18_1.7.0`

**Reproduction**

```sql
LOAD 'age';
SET search_path = ag_catalog, public;
SELECT ag_catalog.create_graph('age_issue_case4');

SELECT *
FROM ag_catalog.cypher('age_issue_case4', $$
CREATE p0 = (n0:l0 {id: 18, klist: [-1797530023, 38833916]})
WITH n0.klist AS alias0, last(n0.klist) AS alias1,
head(tail(keys(n0))) AS alias2, n0
WHERE ((((true AND false) OR ('61ov8bSZ' CONTAINS 'v8b'))
OR (toFloat(n0.id) > id(n0)))
AND (((true AND true) OR (false AND false))
AND ('3pZv' STARTS WITH '3p')))
MATCH p1 = (n0)
WHERE true
RETURN collect(toString(n0.id)) AS alias3
SKIP 0
$$) AS (alias3 agtype);
```

**Expected**

The query returns the collected node id and leaves PostgreSQL available.

**Actual**

```text
server closed the connection unexpectedly
client backend ... was terminated by signal 11: Segmentation fault
```

Contributor guide

Open the contributing guide

Research direction

Run the supplied SQL reproduction against Docker image apache/age:release_PG18_1.7.0 and capture the PostgreSQL backend stack at the signal 11 failure. Trace the CREATE, bound-node path read, and subsequent MATCH/RETURN execution until the fault is identified; done means the query returns the collected node id without terminating PostgreSQL.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, postgresql
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.