pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed[sqlsmith] OOM crash in plpgsql_extra_checks_check_hook
2+ messages / 2 participants
[nested] [flat]
* [sqlsmith] OOM crash in plpgsql_extra_checks_check_hook
@ 2016-06-20 19:06 Andreas Seltenreich <seltenreich@gmx.de>
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Seltenreich @ 2016-06-20 19:06 UTC (permalink / raw)
To: pgsql-hackers
Just had a parallel worker of a memory-starved instance of sqlsmith
crash. plpgsql_extra_checks_check_hook forgot to check the result of
its malloc call here:
Core was generated by `postgres: bgworker: parallel worker for PID 5905 '.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 plpgsql_extra_checks_check_hook (newvalue=<optimized out>, extra=0x7fff7fe31a58, source=<optimized out>) at pl_handler.c:113
113 *myextra = extrachecks;
(gdb) bt
#0 plpgsql_extra_checks_check_hook (newvalue=<optimized out>, extra=0x7fff7fe31a58, source=<optimized out>) at pl_handler.c:113
#1 0x000000000080173f in call_string_check_hook (newval=0x7fff7fe31a50, extra=<optimized out>, source=<optimized out>, elevel=15, conf=<optimized out>, conf=<optimized out>) at guc.c:9779
#2 0x00000000008029b8 in InitializeOneGUCOption (gconf=0x4) at guc.c:4546
#3 0x0000000000804dbc in define_custom_variable (variable=0x2cb6ef0) at guc.c:7466
#4 0x0000000000805862 in DefineCustomStringVariable (name=name@entry=0x7f803cbfe011 "plpgsql.extra_warnings", short_desc=short_desc@entry=0x7f803cbfe1f8 "List of programming constructs that should produce a warning.", long_desc=long_desc@entry=0x0, valueAddr=valueAddr@entry=0x7f803ce070d8 <plpgsql_extra_warnings_string>, bootValue=bootValue@entry=0x7f803cbfdf78 "none", context=context@entry=PGC_USERSET, flags=1, check_hook=0x7f803cbe9700 <plpgsql_extra_checks_check_hook>, assign_hook=0x7f803cbe96e0 <plpgsql_extra_warnings_assign_hook>, show_hook=0x0) at guc.c:7733
#5 0x00007f803cbe99ea in _PG_init () at pl_handler.c:173
#6 0x00000000007f1bcb in internal_load_library (libname=libname@entry=0x7f8040cee14d <error: Cannot access memory at address 0x7f8040cee14d>) at dfmgr.c:276
#7 0x00000000007f2738 in RestoreLibraryState (start_address=0x7f8040cee14d <error: Cannot access memory at address 0x7f8040cee14d>) at dfmgr.c:741
#8 0x00000000004e61c0 in ParallelWorkerMain (main_arg=<optimized out>) at parallel.c:985
#9 0x0000000000684072 in StartBackgroundWorker () at bgworker.c:726
#10 0x000000000068f142 in do_start_bgworker (rw=0x2cb5230) at postmaster.c:5535
#11 maybe_start_bgworker () at postmaster.c:5709
#12 0x000000000068fb96 in sigusr1_handler (postgres_signal_arg=<optimized out>) at postmaster.c:4971
#13 <signal handler called>
#14 0x00007f8040091ac3 in __select_nocancel () at ../sysdeps/unix/syscall-template.S:81
#15 0x000000000046c31f in ServerLoop () at postmaster.c:1657
#16 0x0000000000690fc7 in PostmasterMain (argc=argc@entry=4, argv=argv@entry=0x2c8c620) at postmaster.c:1301
#17 0x000000000046d96d in main (argc=4, argv=0x2c8c620) at main.c:228
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [sqlsmith] OOM crash in plpgsql_extra_checks_check_hook
@ 2016-06-20 19:22 Tom Lane <tgl@sss.pgh.pa.us>
parent: Andreas Seltenreich <seltenreich@gmx.de>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2016-06-20 19:22 UTC (permalink / raw)
To: Andreas Seltenreich <seltenreich@gmx.de>; +Cc: pgsql-hackers
Andreas Seltenreich <seltenreich@gmx.de> writes:
> Just had a parallel worker of a memory-starved instance of sqlsmith
> crash. plpgsql_extra_checks_check_hook forgot to check the result of
> its malloc call here:
Good catch, will fix. Thanks!
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2016-06-20 19:22 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-06-20 19:06 [sqlsmith] OOM crash in plpgsql_extra_checks_check_hook Andreas Seltenreich <seltenreich@gmx.de>
2016-06-20 19:22 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox