Skip to content
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

Segmentation fault when executing query #395

Closed
sep2 opened this issue Dec 16, 2022 · 6 comments · Fixed by #1039
Closed

Segmentation fault when executing query #395

sep2 opened this issue Dec 16, 2022 · 6 comments · Fixed by #1039
Assignees
Labels
bug Something isn't working

Comments

@sep2
Copy link

sep2 commented Dec 16, 2022

Describe the bug
A segmentation fault is occured when query.

How are you accessing AGE (Command line, driver, etc.)?
JDBC

What data setup do we need to do?

select create_graph('graph');

select *
from cypher('graph', $$
create (n:Project {name: 'Project A'}),
       (m:Project {name: 'Project B'}),
       (a:Task {name: 'Task A', size: 10}),
       (b:Task {name: 'Task B', size: 5}),
       (c:Task {name: 'Task C', size: 7}),
       (x:Person {name: 'John', age: 55}),
       (y:Person {name: 'Bob', age: 43}),
       (z:Person {name: 'Alice', age: 33}),
       (n)-[:Has]->(a),
       (n)-[:Has]->(b),
       (m)-[:Has]->(c),
       (a)-[:AssignedTo]->(x),
       (b)-[:AssignedTo]->(y),
       (c)-[:AssignedTo]->(y)
$$) as (n agtype);

What is the command that caused the error?

SELECT * FROM ag_catalog.cypher('graph', $$
match (p:Project)-[:Has]->(t:Task)-[:AssignedTo]->(u:Person)
with distinct t, {tn: t.name, user: collect(u)} as task
with distinct p, {pn: p.name, task: collect(task)} as project
return project
$$) as (p agtype);
LOG:  server process (PID 224) was terminated by signal 11: Segmentation fault

Expected behavior
Should not terminate the server.

Environment (please complete the following information):

  • Version: 1.1.0 inside docker

Additional context
None.

@sep2 sep2 added the bug Something isn't working label Dec 16, 2022
@sep2
Copy link
Author

sep2 commented Dec 16, 2022

This another query did not terminate the process:

SELECT * FROM ag_catalog.cypher('graph', $$
match (p:Project)-[:Has]->(t:Task)-[:AssignedTo]->(u:Person)
with p, t, collect(u) as users
with p, {tn: t.name, users: users} as task
with p, collect(task) as tasks
with {pn: p.name, tasks:tasks} as project
return project
$$) as (p agtype);

but return error message: ERROR: container is not an agtype array. The query runs fine in neo4j.

@jrgemignani
Copy link
Contributor

There may be an issue with the collect aggregate function. That is where it throws the error.

@jrgemignani
Copy link
Contributor

I found part of the issue and am looking at the best way to address it.

@jrgemignani
Copy link
Contributor

I am working on a PR to fix this now.

@jrgemignani
Copy link
Contributor

I have created PR #1039 to address this issue.

@jrgemignani
Copy link
Contributor

jrgemignani commented Jul 15, 2023

This issue is now resolved in the master (PostgreSQL version 13) branch.

@MuhammadTahaNaveed Thank you for bringing this one to our attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants