You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by "saygoodbyye (via GitHub)" <gi...@apache.org> on 2023/10/26 04:53:23 UTC
[I] Server crashes when trying to execute SELECT * FROM cypher(...) [age]
saygoodbyye opened a new issue, #1302:
URL: https://github.com/apache/age/issues/1302
**Describe the bug**
Server crashes when executing the following SQL-script
**How are you accessing AGE (Command line, driver, etc.)?**
Accessing AGE through command line.
**What data setup do we need to do?**
Apache AGE (PG15 branch) with PostgreSQL (REL_15_STABLE).
**What is the command that caused the error?**
```pgsql
CREATE EXTENSION age;
SET search_path TO ag_catalog;
SELECT create_graph('cypher_unwind');
SELECT * FROM cypher('cypher_unwind', $$
CREATE (agtype {name: 'node1', a: [1, 2, 3]}),
(m {name: 'node2', a: [4, 5, 6]}),
(o {name: 'node3', a: [7, 8, 9]}),
(n)-[:KNOWS]->(m),
(m)-[:KNOWS]->(o)
$$) as (i agtype);
SELECT * FROM cypher('cypher_unwind', $$
MATCH (n)
WITH n.a AS a
UNWIND a AS i
RETURN *
$$) as (i agtype, j agtype);
```
backtrace:
```
#0 pg_detoast_datum (datum=0x0) at fmgr.c:1710
#1 0x00007f602f73878f in age_unnest (fcinfo=0x55c451aee4b0) at src/backend/utils/adt/agtype.c:10656
#2 0x000055c450a0893a in ExecMakeFunctionResultSet (fcache=0x55c451aed938, econtext=econtext@entry=0x55c451aecc58, argContext=0x55c451b392f0, isNull=0x55c451aed2f1,
isDone=isDone@entry=0x55c451aed35c) at execSRF.c:624
#3 0x000055c450a33e35 in ExecProjectSRF (node=node@entry=0x55c451aecb40, continuing=continuing@entry=false) at nodeProjectSet.c:175
#4 0x000055c450a33f4f in ExecProjectSet (pstate=<optimized out>) at nodeProjectSet.c:105
#5 0x000055c4509fd71a in ExecProcNode (node=node@entry=0x55c451aecb40) at ../../../src/include/executor/executor.h:262
#6 0x000055c4509fd7aa in ExecutePlan (estate=estate@entry=0x55c451aec8d0, planstate=0x55c451aecb40, use_parallel_mode=<optimized out>, operation=operation@entry=CMD_SELECT,
sendTuples=sendTuples@entry=true, numberTuples=numberTuples@entry=0, direction=ForwardScanDirection, dest=0x55c451b779e8, execute_once=true) at execMain.c:1636
#7 0x000055c4509fe569 in standard_ExecutorRun (queryDesc=0x55c451b4fc30, direction=ForwardScanDirection, count=0, execute_once=true) at execMain.c:363
#8 0x000055c4509fe699 in ExecutorRun (queryDesc=queryDesc@entry=0x55c451b4fc30, direction=direction@entry=ForwardScanDirection, count=count@entry=0, execute_once=<optimized out>)
at execMain.c:307
#9 0x000055c450ba5fdf in PortalRunSelect (portal=portal@entry=0x55c451a90380, forward=forward@entry=true, count=0, count@entry=9223372036854775807, dest=dest@entry=0x55c451b779e8)
at pquery.c:924
#10 0x000055c450ba7861 in PortalRun (portal=portal@entry=0x55c451a90380, count=count@entry=9223372036854775807, isTopLevel=isTopLevel@entry=true, run_once=run_once@entry=true,
dest=dest@entry=0x55c451b779e8, altdest=altdest@entry=0x55c451b779e8, qc=0x7ffe78a311d0) at pquery.c:768
#11 0x000055c450ba39ed in exec_simple_query (
query_string=query_string@entry=0x55c451a19970 "SELECT * FROM cypher('cypher_unwind', $$\n MATCH (n)\n WITH n.a AS a\n UNWIND a AS i\n RETURN *\n$$) as (i agtype, j agtype);") at postgres.c:1250
#12 0x000055c450ba5851 in PostgresMain (dbname=<optimized out>, username=<optimized out>) at postgres.c:4598
#13 0x000055c450b0a832 in BackendRun (port=port@entry=0x55c451a40bf0) at postmaster.c:4514
#14 0x000055c450b0c842 in BackendStartup (port=port@entry=0x55c451a40bf0) at postmaster.c:4242
#15 0x000055c450b0ca7b in ServerLoop () at postmaster.c:1809
#16 0x000055c450b0e050 in PostmasterMain (argc=argc@entry=3, argv=argv@entry=0x55c451a10df0) at postmaster.c:1481
#17 0x000055c450a5adb8 in main (argc=3, argv=0x55c451a10df0) at main.c:202
```
**Expected behavior**
Expected ERROR to be shown or sql query to be succesfully executed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Server crashes when trying to execute SELECT * FROM cypher(...) [age]
Posted by "MuhammadTahaNaveed (via GitHub)" <gi...@apache.org>.
MuhammadTahaNaveed commented on issue #1302:
URL: https://github.com/apache/age/issues/1302#issuecomment-1780828661
> The backtrace and description you provided indicate that there is a bug in the execution of a SQL script involving the AGE (ArangoDB Graph Engine) extension for PostgreSQL. Specifically, the crash occurs during the execution of a query that involves the cypher function. The relevant part of the backtrace suggests that the crash occurs when trying to process data using the age_unnest function in the agtype.c source file.
>
> To address this issue, you might consider the following steps:
>
> Check Configuration and Versions:
>
> Ensure that you are using compatible versions of AGE, PostgreSQL, and the AGE extension. Some crashes can occur due to version incompatibilities. Review the SQL Script:
>
> Carefully review the SQL script to identify any potential issues with the query or the data being processed. Pay attention to the specific usage of the cypher function and the age_unnest function. Check for Known Issues:
>
> Search for any known issues or bug reports related to AGE, PostgreSQL, or the AGE extension. Other users may have encountered and reported similar problems. Debugging:
>
> If you have access to the source code of AGE or the AGE extension, consider using debugging tools to trace the issue. The crash occurs during the execution of the age_unnest function, so that function might be a good place to start your debugging. Testing Environment:
>
> Ensure that you are testing in a clean and well-configured environment to rule out issues related to the development or testing setup. Database State:
>
> Examine the state of your database and ensure that it is consistent. Database corruption or other anomalies can lead to unexpected crashes. Engage the Community:
>
> If you are unable to resolve the issue on your own, consider engaging with the AGE or PostgreSQL community or support channels. They may be able to provide guidance or assistance. Update or Patch:
>
> Check if there are any updates, patches, or fixes available for the version of AGE and the AGE extension you are using. Applying updates can often address known issues. Regression Testing:
>
> If you have made any code changes or configuration modifications, perform regression testing to ensure that the issue is not introduced by your own changes.
@theaniketraj please don't use chatgpt and spam issues.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Server crashes when trying to execute SELECT * FROM cypher(...) [age]
Posted by "theaniketraj (via GitHub)" <gi...@apache.org>.
theaniketraj commented on issue #1302:
URL: https://github.com/apache/age/issues/1302#issuecomment-1780820284
The backtrace and description you provided indicate that there is a bug in the execution of a SQL script involving the AGE (ArangoDB Graph Engine) extension for PostgreSQL. Specifically, the crash occurs during the execution of a query that involves the cypher function. The relevant part of the backtrace suggests that the crash occurs when trying to process data using the age_unnest function in the agtype.c source file.
To address this issue, you might consider the following steps:
Check Configuration and Versions:
Ensure that you are using compatible versions of AGE, PostgreSQL, and the AGE extension. Some crashes can occur due to version incompatibilities.
Review the SQL Script:
Carefully review the SQL script to identify any potential issues with the query or the data being processed. Pay attention to the specific usage of the cypher function and the age_unnest function.
Check for Known Issues:
Search for any known issues or bug reports related to AGE, PostgreSQL, or the AGE extension. Other users may have encountered and reported similar problems.
Debugging:
If you have access to the source code of AGE or the AGE extension, consider using debugging tools to trace the issue. The crash occurs during the execution of the age_unnest function, so that function might be a good place to start your debugging.
Testing Environment:
Ensure that you are testing in a clean and well-configured environment to rule out issues related to the development or testing setup.
Database State:
Examine the state of your database and ensure that it is consistent. Database corruption or other anomalies can lead to unexpected crashes.
Engage the Community:
If you are unable to resolve the issue on your own, consider engaging with the AGE or PostgreSQL community or support channels. They may be able to provide guidance or assistance.
Update or Patch:
Check if there are any updates, patches, or fixes available for the version of AGE and the AGE extension you are using. Applying updates can often address known issues.
Regression Testing:
If you have made any code changes or configuration modifications, perform regression testing to ensure that the issue is not introduced by your own changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Server crashes when trying to execute SELECT * FROM cypher(...) [age]
Posted by "MuhammadTahaNaveed (via GitHub)" <gi...@apache.org>.
MuhammadTahaNaveed commented on issue #1302:
URL: https://github.com/apache/age/issues/1302#issuecomment-1780774695
PR #1304 resolves this issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Server crashes when trying to execute SELECT * FROM cypher(...) [age]
Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani closed issue #1302: Server crashes when trying to execute SELECT * FROM cypher(...)
URL: https://github.com/apache/age/issues/1302
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org