[ 
https://issues.apache.org/jira/browse/HAWQ-218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ruilong Huo updated HAWQ-218:
-----------------------------
    Description: 
HAWQ core dumps while calling UDF with EXPLAIN statement in it.

Reproduction steps:

Step 1: prepare schema and data
{noformat}
create table foo(a int, b int, c int) partition by range (b) (start (1) end 
(101) every (10));

insert into foo select generate_series(1,5), generate_series(1,100), 
generate_series(1,10);

analyze foo;
{noformat}

Step 2: run query
{noformat}
select get_selected_parts('explain select * from foo where b = 150;');
 get_selected_parts
--------------------
 [0, 10]
(1 row)

select * from foo where b = 150;
psql:/data/gpadmin/pulse2-agent/agents/agent1/work/HAWQ-main-TINC-QUERY-LDAP/TINC/cdbunit/tincrepo/partitioning/staticselection/output/static_selection_6_orca.sql:18:
 server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
psql:/data/gpadmin/pulse2-agent/agents/agent1/work/HAWQ-main-TINC-QUERY-LDAP/TINC/cdbunit/tincrepo/partitioning/staticselection/output/static_selection_6_orca.sql:18:
 connection to server was lost
{noformat}

Step 3: call stack in core dump
{noformat}
Core was generated by `postgres: port 30000, gpadmin gptest [local] con410 cmd6 
SELECT [local]       '.
Program terminated with signal 11, Segmentation fault.
#0  0x0000003c1ec0f5db in raise () from /lib64/libpthread.so.0
Missing separate debuginfos, use: debuginfo-install 
hawq-2.0.0.0_beta-18756.x86_64
(gdb) bt
#0  0x0000003c1ec0f5db in raise () from /lib64/libpthread.so.0
#1  0x0000000000875e62 in SafeHandlerForSegvBusIll (processName=<value 
optimized out>, postgres_signal_arg=11) at elog.c:4497
#2  <signal handler called>
#3  initialize_dispatch_data (resource=0x0, dispatch_to_all_cached_executors=0 
'\000') at dispatcher.c:460
#4  0x000000000065e504 in ExecutorStart (queryDesc=<value optimized out>, 
eflags=<value optimized out>) at execMain.c:908
#5  0x00000000007bd5dd in PortalStart (portal=<value optimized out>, 
params=<value optimized out>, snapshot=<value optimized out>, 
seqServerHost=<value optimized out>, seqServerPort=<value optimized out>) at 
pquery.c:1222
#6  0x00000000007b7549 in exec_simple_query (query_string=<value optimized 
out>, seqServerHost=<value optimized out>, seqServerPort=<value optimized out>) 
at postgres.c:1683
#7  0x00000000007b8aa2 in PostgresMain (argc=<value optimized out>, 
argv=0x19af5a8, username=<value optimized out>) at postgres.c:4691
#8  0x000000000076a0e3 in BackendRun (port=0x1964c80) at postmaster.c:5844
#9  BackendStartup (port=0x1964c80) at postmaster.c:5437
#10 0x000000000076a84d in ServerLoop () at postmaster.c:2139
#11 0x000000000076c65e in PostmasterMain (argc=9, argv=0x19698e0) at 
postmaster.c:1431
#12 0x00000000006c742a in main (argc=9, argv=0x19698a0) at main.c:226
{noformat}

  was:


Reproduction steps:

Step 1: prepare schema and data
{noformat}
create table foo(a int, b int, c int) partition by range (b) (start (1) end 
(101) every (10));

insert into foo select generate_series(1,5), generate_series(1,100), 
generate_series(1,10);

analyze foo;
{noformat}

Step 2: run query
{noformat}
select get_selected_parts('explain select * from foo where b = 150;');
 get_selected_parts
--------------------
 [0, 10]
(1 row)

select * from foo where b = 150;
psql:/data/gpadmin/pulse2-agent/agents/agent1/work/HAWQ-main-TINC-QUERY-LDAP/TINC/cdbunit/tincrepo/partitioning/staticselection/output/static_selection_6_orca.sql:18:
 server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
psql:/data/gpadmin/pulse2-agent/agents/agent1/work/HAWQ-main-TINC-QUERY-LDAP/TINC/cdbunit/tincrepo/partitioning/staticselection/output/static_selection_6_orca.sql:18:
 connection to server was lost
{noformat}

Step 3: call stack in core dump
{noformat}
Core was generated by `postgres: port 30000, gpadmin gptest [local] con410 cmd6 
SELECT [local]       '.
Program terminated with signal 11, Segmentation fault.
#0  0x0000003c1ec0f5db in raise () from /lib64/libpthread.so.0
Missing separate debuginfos, use: debuginfo-install 
hawq-2.0.0.0_beta-18756.x86_64
(gdb) bt
#0  0x0000003c1ec0f5db in raise () from /lib64/libpthread.so.0
#1  0x0000000000875e62 in SafeHandlerForSegvBusIll (processName=<value 
optimized out>, postgres_signal_arg=11) at elog.c:4497
#2  <signal handler called>
#3  initialize_dispatch_data (resource=0x0, dispatch_to_all_cached_executors=0 
'\000') at dispatcher.c:460
#4  0x000000000065e504 in ExecutorStart (queryDesc=<value optimized out>, 
eflags=<value optimized out>) at execMain.c:908
#5  0x00000000007bd5dd in PortalStart (portal=<value optimized out>, 
params=<value optimized out>, snapshot=<value optimized out>, 
seqServerHost=<value optimized out>, seqServerPort=<value optimized out>) at 
pquery.c:1222
#6  0x00000000007b7549 in exec_simple_query (query_string=<value optimized 
out>, seqServerHost=<value optimized out>, seqServerPort=<value optimized out>) 
at postgres.c:1683
#7  0x00000000007b8aa2 in PostgresMain (argc=<value optimized out>, 
argv=0x19af5a8, username=<value optimized out>) at postgres.c:4691
#8  0x000000000076a0e3 in BackendRun (port=0x1964c80) at postmaster.c:5844
#9  BackendStartup (port=0x1964c80) at postmaster.c:5437
#10 0x000000000076a84d in ServerLoop () at postmaster.c:2139
#11 0x000000000076c65e in PostmasterMain (argc=9, argv=0x19698e0) at 
postmaster.c:1431
#12 0x00000000006c742a in main (argc=9, argv=0x19698a0) at main.c:226
{noformat}


> Core dump in UDF with EXPLAIN in it
> -----------------------------------
>
>                 Key: HAWQ-218
>                 URL: https://issues.apache.org/jira/browse/HAWQ-218
>             Project: Apache HAWQ
>          Issue Type: Bug
>            Reporter: Ruilong Huo
>            Assignee: Ruilong Huo
>
> HAWQ core dumps while calling UDF with EXPLAIN statement in it.
> Reproduction steps:
> Step 1: prepare schema and data
> {noformat}
> create table foo(a int, b int, c int) partition by range (b) (start (1) end 
> (101) every (10));
> insert into foo select generate_series(1,5), generate_series(1,100), 
> generate_series(1,10);
> analyze foo;
> {noformat}
> Step 2: run query
> {noformat}
> select get_selected_parts('explain select * from foo where b = 150;');
>  get_selected_parts
> --------------------
>  [0, 10]
> (1 row)
> select * from foo where b = 150;
> psql:/data/gpadmin/pulse2-agent/agents/agent1/work/HAWQ-main-TINC-QUERY-LDAP/TINC/cdbunit/tincrepo/partitioning/staticselection/output/static_selection_6_orca.sql:18:
>  server closed the connection unexpectedly
>         This probably means the server terminated abnormally
>         before or while processing the request.
> psql:/data/gpadmin/pulse2-agent/agents/agent1/work/HAWQ-main-TINC-QUERY-LDAP/TINC/cdbunit/tincrepo/partitioning/staticselection/output/static_selection_6_orca.sql:18:
>  connection to server was lost
> {noformat}
> Step 3: call stack in core dump
> {noformat}
> Core was generated by `postgres: port 30000, gpadmin gptest [local] con410 
> cmd6 SELECT [local]       '.
> Program terminated with signal 11, Segmentation fault.
> #0  0x0000003c1ec0f5db in raise () from /lib64/libpthread.so.0
> Missing separate debuginfos, use: debuginfo-install 
> hawq-2.0.0.0_beta-18756.x86_64
> (gdb) bt
> #0  0x0000003c1ec0f5db in raise () from /lib64/libpthread.so.0
> #1  0x0000000000875e62 in SafeHandlerForSegvBusIll (processName=<value 
> optimized out>, postgres_signal_arg=11) at elog.c:4497
> #2  <signal handler called>
> #3  initialize_dispatch_data (resource=0x0, 
> dispatch_to_all_cached_executors=0 '\000') at dispatcher.c:460
> #4  0x000000000065e504 in ExecutorStart (queryDesc=<value optimized out>, 
> eflags=<value optimized out>) at execMain.c:908
> #5  0x00000000007bd5dd in PortalStart (portal=<value optimized out>, 
> params=<value optimized out>, snapshot=<value optimized out>, 
> seqServerHost=<value optimized out>, seqServerPort=<value optimized out>) at 
> pquery.c:1222
> #6  0x00000000007b7549 in exec_simple_query (query_string=<value optimized 
> out>, seqServerHost=<value optimized out>, seqServerPort=<value optimized 
> out>) at postgres.c:1683
> #7  0x00000000007b8aa2 in PostgresMain (argc=<value optimized out>, 
> argv=0x19af5a8, username=<value optimized out>) at postgres.c:4691
> #8  0x000000000076a0e3 in BackendRun (port=0x1964c80) at postmaster.c:5844
> #9  BackendStartup (port=0x1964c80) at postmaster.c:5437
> #10 0x000000000076a84d in ServerLoop () at postmaster.c:2139
> #11 0x000000000076c65e in PostmasterMain (argc=9, argv=0x19698e0) at 
> postmaster.c:1431
> #12 0x00000000006c742a in main (argc=9, argv=0x19698a0) at main.c:226
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to