Re: Parallel bitmap heap scan

From: tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>
To: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Cc: Amit Khandekar <amitdkhan(dot)pg(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parallel bitmap heap scan
Date: 2017-01-10 08:49:13
Message-ID: de81de09-3d8a-c5ef-c448-7761bb6bcd0a@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 01/10/2017 11:29 AM, tushar wrote:
> On 01/09/2017 07:22 PM, Dilip Kumar wrote:
>> Thanks, Tushar. I have fixed it. The defect was in 0002. I have also
>> observed another issue related to code refactoring, Actually, there
>> was some code present in 0001 which supposed to be in 0003.
> Thanks, I have checked at my end and it is fixed now.
>
We found a regression , earlier the testcase was working fine (against
the older patches of Parallel bitmap heap scan) but now getting a
server crash
against v8 patches.

Testcase - (one of the table of TPC-H )

postgres=#explain analyze verbose
SELECT SUM(l_extendedprice) FROM lineitem
WHERE (l_shipdate >= '1995-01-01'::date)
AND (l_shipdate <='1996-03-31'::date);
WARNING: terminating connection because of crash of another server process
DETAIL: The postmaster has commanded this server process to roll back
the current transaction and exit, because another server process exited
abnormally and possibly corrupted shared memory.
HINT: In a moment you should be able to reconnect to the database and
repeat your command.
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
connection to server was lost

Here is the stack trace - ( Two core dump file generated)

[centos(at)centos-cpula bin]$ gdb -q -c data/core.25434
/home/centos/PG10_10jan/postgresql/edbpsql/bin/postgres
Reading symbols from
/home/centos/PG10_10jan/postgresql/edbpsql/bin/postgres...done.
[New Thread 25434]
Missing separate debuginfo for
Try: yum --enablerepo='*-debug*' install
/usr/lib/debug/.build-id/7f/719af91ee951b4fcb6647e7868f95f766a616b
Reading symbols from /usr/lib64/libssl.so.10...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib64/libssl.so.10
Reading symbols from /usr/lib64/libcrypto.so.10...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib64/libcrypto.so.10
Reading symbols from /lib64/librt.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib64/librt.so.1
Reading symbols from /lib64/libdl.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libm.so.6
Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/libpthread.so.0...(no debugging symbols
found)...done.
[Thread debugging using libthread_db enabled]
Loaded symbols for /lib64/libpthread.so.0
Reading symbols from /lib64/libgssapi_krb5.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libgssapi_krb5.so.2
Reading symbols from /lib64/libkrb5.so.3...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libkrb5.so.3
Reading symbols from /lib64/libcom_err.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libcom_err.so.2
Reading symbols from /lib64/libk5crypto.so.3...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libk5crypto.so.3
Reading symbols from /lib64/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libz.so.1
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib64/libkrb5support.so.0...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libkrb5support.so.0
Reading symbols from /lib64/libkeyutils.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libkeyutils.so.1
Reading symbols from /lib64/libresolv.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libresolv.so.2
Reading symbols from /lib64/libselinux.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libselinux.so.1
Reading symbols from /lib64/libnss_files.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libnss_files.so.2
Core was generated by `postgres: bgworker: parallel worker for PID
25433 '.
Program terminated with signal 11, Segmentation fault.
#0 0x00000000006f2fa6 in pagetable_destroy (tb=0x2079bf0) at
../../../src/include/lib/simplehash.h:361
361 tb->alloc->HashFree(tb->data, tb->alloc->args);
Missing separate debuginfos, use: debuginfo-install
glibc-2.12-1.192.el6.x86_64 keyutils-libs-1.4-5.el6.x86_64
krb5-libs-1.10.3-57.el6.x86_64 libcom_err-1.41.12-22.el6.x86_64
libselinux-2.0.94-7.el6.x86_64 openssl-1.0.1e-48.el6_8.1.x86_64
zlib-1.2.3-29.el6.x86_64
(gdb) bt
#0 0x00000000006f2fa6 in pagetable_destroy (tb=0x2079bf0) at
../../../src/include/lib/simplehash.h:361
#1 0x00000000006f3b52 in tbm_free (tbm=0x2077fe0) at tidbitmap.c:296
#2 0x00000000006ab29b in ExecEndBitmapHeapScan (node=0x207e760) at
nodeBitmapHeapscan.c:717
#3 0x0000000000691701 in ExecEndNode (node=0x207e760) at execProcnode.c:689
#4 0x00000000006a8f86 in ExecEndAgg (node=0x207e878) at nodeAgg.c:3563
#5 0x0000000000691800 in ExecEndNode (node=0x207e878) at execProcnode.c:755
#6 0x000000000068cb0f in ExecEndPlan (planstate=0x207e878,
estate=0x207df58) at execMain.c:1469
#7 0x000000000068afb7 in standard_ExecutorEnd (queryDesc=0x20592e8) at
execMain.c:470
#8 0x000000000068aef6 in ExecutorEnd (queryDesc=0x20592e8) at
execMain.c:441
#9 0x0000000000690ba5 in ParallelQueryMain (seg=0x1fe1e58,
toc=0x7fcbc3677000) at execParallel.c:819
#10 0x0000000000518620 in ParallelWorkerMain (main_arg=300704707) at
parallel.c:1109
#11 0x0000000000793db2 in StartBackgroundWorker () at bgworker.c:747
#12 0x00000000007a6265 in do_start_bgworker (rw=0x20039f0) at
postmaster.c:5560
#13 0x00000000007a659f in maybe_start_bgworker () at postmaster.c:5744
#14 0x00000000007a5706 in sigusr1_handler (postgres_signal_arg=10) at
postmaster.c:4998
#15 <signal handler called>
#16 0x0000003746ee1503 in __select_nocancel () from /lib64/libc.so.6
#17 0x00000000007a10ca in ServerLoop () at postmaster.c:1676
#18 0x00000000007a08bf in PostmasterMain (argc=3, argv=0x1fdfd20) at
postmaster.c:1320
#19 0x00000000006e7816 in main (argc=3, argv=0x1fdfd20) at main.c:228
(gdb)

[centos(at)centos-cpula bin]$ gdb -q -c data/core.25435
/home/centos/PG10_10jan/postgresql/edbpsql/bin/postgres
Reading symbols from
/home/centos/PG10_10jan/postgresql/edbpsql/bin/postgres...done.
[New Thread 25435]
Missing separate debuginfo for
Try: yum --enablerepo='*-debug*' install
/usr/lib/debug/.build-id/7f/719af91ee951b4fcb6647e7868f95f766a616b
Reading symbols from /usr/lib64/libssl.so.10...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib64/libssl.so.10
Reading symbols from /usr/lib64/libcrypto.so.10...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib64/libcrypto.so.10
Reading symbols from /lib64/librt.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib64/librt.so.1
Reading symbols from /lib64/libdl.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libm.so.6
Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/libpthread.so.0...(no debugging symbols
found)...done.
[Thread debugging using libthread_db enabled]
Loaded symbols for /lib64/libpthread.so.0
Reading symbols from /lib64/libgssapi_krb5.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libgssapi_krb5.so.2
Reading symbols from /lib64/libkrb5.so.3...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libkrb5.so.3
Reading symbols from /lib64/libcom_err.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libcom_err.so.2
Reading symbols from /lib64/libk5crypto.so.3...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libk5crypto.so.3
Reading symbols from /lib64/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libz.so.1
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib64/libkrb5support.so.0...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libkrb5support.so.0
Reading symbols from /lib64/libkeyutils.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libkeyutils.so.1
Reading symbols from /lib64/libresolv.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libresolv.so.2
Reading symbols from /lib64/libselinux.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libselinux.so.1
Reading symbols from /lib64/libnss_files.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib64/libnss_files.so.2
Core was generated by `postgres: bgworker: parallel worker for PID
25433 '.
Program terminated with signal 11, Segmentation fault.
#0 0x00000000006f2fa6 in pagetable_destroy (tb=0x20775a0) at
../../../src/include/lib/simplehash.h:361
361 tb->alloc->HashFree(tb->data, tb->alloc->args);
Missing separate debuginfos, use: debuginfo-install
glibc-2.12-1.192.el6.x86_64 keyutils-libs-1.4-5.el6.x86_64
krb5-libs-1.10.3-57.el6.x86_64 libcom_err-1.41.12-22.el6.x86_64
libselinux-2.0.94-7.el6.x86_64 openssl-1.0.1e-48.el6_8.1.x86_64
zlib-1.2.3-29.el6.x86_64
(gdb) bt
#0 0x00000000006f2fa6 in pagetable_destroy (tb=0x20775a0) at
../../../src/include/lib/simplehash.h:361
#1 0x00000000006f3b52 in tbm_free (tbm=0x2075990) at tidbitmap.c:296
#2 0x00000000006ab29b in ExecEndBitmapHeapScan (node=0x207c110) at
nodeBitmapHeapscan.c:717
#3 0x0000000000691701 in ExecEndNode (node=0x207c110) at execProcnode.c:689
#4 0x00000000006a8f86 in ExecEndAgg (node=0x207c228) at nodeAgg.c:3563
#5 0x0000000000691800 in ExecEndNode (node=0x207c228) at execProcnode.c:755
#6 0x000000000068cb0f in ExecEndPlan (planstate=0x207c228,
estate=0x207b908) at execMain.c:1469
#7 0x000000000068afb7 in standard_ExecutorEnd (queryDesc=0x20594b8) at
execMain.c:470
#8 0x000000000068aef6 in ExecutorEnd (queryDesc=0x20594b8) at
execMain.c:441
#9 0x0000000000690ba5 in ParallelQueryMain (seg=0x1fe1e58,
toc=0x7fcbc3677000) at execParallel.c:819
#10 0x0000000000518620 in ParallelWorkerMain (main_arg=300704707) at
parallel.c:1109
#11 0x0000000000793db2 in StartBackgroundWorker () at bgworker.c:747
#12 0x00000000007a6265 in do_start_bgworker (rw=0x20064a0) at
postmaster.c:5560
#13 0x00000000007a659f in maybe_start_bgworker () at postmaster.c:5744
#14 0x00000000007a5706 in sigusr1_handler (postgres_signal_arg=10) at
postmaster.c:4998
#15 <signal handler called>
#16 0x0000003746ee1503 in __select_nocancel () from /lib64/libc.so.6
#17 0x00000000007a10ca in ServerLoop () at postmaster.c:1676
#18 0x00000000007a08bf in PostmasterMain (argc=3, argv=0x1fdfd20) at
postmaster.c:1320
#19 0x00000000006e7816 in main (argc=3, argv=0x1fdfd20) at main.c:228
(gdb)

--
regards,tushar
EnterpriseDB https://www.enterprisedb.com/
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2017-01-10 09:07:00 Re: Declarative partitioning - another take
Previous Message Michael Paquier 2017-01-10 08:03:08 Re: sequence data type