Getting server crash after running sqlsmith

From: tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Getting server crash after running sqlsmith
Date: 2017-03-28 13:12:17
Message-ID: 05d970a7-9442-fc66-b8f9-5e4189f20b7c@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

After runinng sqlsmith against latest sources of PG v10 , able to see a
crash -

here is the standalone testcase -

Make sure 'logging_collector=on' in postgresql.conf file
Connect to psql terminal ,run this query
postgres=# select
80 as c0,
pg_catalog.pg_backend_pid() as c1,
68 as c2,
subq_1.c0 as c3,
subq_1.c0 as c4
from
(select
ref_0.specific_schema as c0
from
information_schema.role_routine_grants as ref_0,
lateral (select
ref_0.grantor as c0,
50 as c1
from
information_schema.routines as ref_1
where (63 = 86)
or (pg_catalog.pg_advisory_lock(
cast(ref_1.result_cast_datetime_precision as
integer),
cast(pg_catalog.bttidcmp(
cast(null as tid),
cast(null as tid)) as integer)) is NULL)
limit 143) as subq_0
where pg_catalog.pg_rotate_logfile() is NULL) as subq_1
where 50 <> 45;
c0 | c1 | c2 | c3 | c4
----+----+----+----+----
(0 rows)

postgres=# select 1;
FATAL: terminating connection due to unexpected postmaster exit
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!> \q

here is the stack trace -
[centos(at)tushar-centos bin]$ gdb -q -c mdata/core.4254
/home/centos/pg10_28march/postgresql/edbpsql/bin/postgres
Reading symbols from
/home/centos/pg10_28march/postgresql/edbpsql/bin/postgres...done.
[New Thread 4254]
Missing separate debuginfo for
Try: yum --disablerepo='*' --enablerepo='*-debug*' install
/usr/lib/debug/.build-id/5f/7d4ef6f6ba15505d3c42a7a09e2a7ca9ae5ba6
--
--
Loaded symbols for /lib/libkrb5support.so.0
Reading symbols from /lib/libkeyutils.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib/libkeyutils.so.1
Reading symbols from /lib/libselinux.so.1...(no debugging symbols
found)...done.
Loaded symbols for /lib/libselinux.so.1
Reading symbols from /lib/libnss_files.so.2...(no debugging symbols
found)...done.
Loaded symbols for /lib/libnss_files.so.2
Core was generated by
`/home/centos/pg10_28march/postgresql/edbpsql/bin/postgres -D mdata'.
Program terminated with signal 11, Segmentation fault.
#0 0x00a75424 in __kernel_vsyscall ()
Missing separate debuginfos, use: debuginfo-install
glibc-2.12-1.132.el6.i686 keyutils-libs-1.4-5.el6.i686
krb5-libs-1.10.3-57.el6.i686 libcom_err-1.41.12-22.el6.i686
libselinux-2.0.94-7.el6.i686 openssl-1.0.1e-48.el6_8.4.i686
zlib-1.2.3-29.el6.i686
(gdb) bt
#0 0x00a75424 in __kernel_vsyscall ()
#1 0x00aa1d7b in sigprocmask () from /lib/libc.so.6
#2 0x083d2d79 in sigusr1_handler (postgres_signal_arg=10) at
postmaster.c:5081
#3 <signal handler called>
#4 0x00a75424 in __kernel_vsyscall ()
#5 0x00aa1d7b in sigprocmask () from /lib/libc.so.6
#6 0x083d2d79 in sigusr1_handler (postgres_signal_arg=10) at
postmaster.c:5081
#7 <signal handler called>
#8 0x00a75424 in __kernel_vsyscall ()
#9 0x00aa1d7b in sigprocmask () from /lib/libc.so.6
#10 0x083d2d79 in sigusr1_handler (postgres_signal_arg=10) at
postmaster.c:5081
#11 <signal handler called>
#12 0x00a75424 in __kernel_vsyscall ()
--
--
#52380 0x00a75424 in __kernel_vsyscall ()
#52381 0x00aa1d7b in sigprocmask () from /lib/libc.so.6
#52382 0x083d2d79 in sigusr1_handler (postgres_signal_arg=10) at
postmaster.c:5081
#52383 <signal handler called>
#52384 0x00a75424 in __kernel_vsyscall ()
#52385 0x00b5208d in ___newselect_nocancel () from /lib/libc.so.6
#52386 0x083ce40e in ServerLoop () at postmaster.c:1693
#52387 0x083cdbcb in PostmasterMain (argc=3, argv=0x957ca10) at
postmaster.c:1337
#52388 0x083236fc in main (argc=3, argv=0x957ca10) at main.c:228

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Verite 2017-03-28 13:28:52 Re: PATCH: Batch/pipelining support for libpq
Previous Message Peter Eisentraut 2017-03-28 13:03:26 Re: [COMMITTERS] pgsql: Clean up Perl code according to perlcritic