Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bF4X2-0007LK-Lp for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Jun 2016 19:06:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bF4X1-0002HV-JZ for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Jun 2016 19:06:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bF4X0-0002Go-HM for pgsql-hackers@postgresql.org; Mon, 20 Jun 2016 19:06:46 +0000 Received: from mout.kundenserver.de ([217.72.192.75]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.84_2) (envelope-from ) id 1bF4Wx-0003dv-8B for pgsql-hackers@postgresql.org; Mon, 20 Jun 2016 19:06:45 +0000 Received: from elite ([109.44.2.114]) by mrelayeu.kundenserver.de (mreue102) with ESMTPSA (Nemesis) id 0MA5Q9-1b4J0w0xc9-00BM2D for ; Mon, 20 Jun 2016 21:06:39 +0200 From: Andreas Seltenreich To: pgsql-hackers@postgresql.org Subject: [sqlsmith] OOM crash in plpgsql_extra_checks_check_hook User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.5 (gnu/linux) X-Now-Playing: Narcissistic Funeral (live) =?utf-8?Q?=E2=99=AA?= A Murderous Circus 2 =?utf-8?Q?=E2=99=AA?= Mourning Beloveth Date: Mon, 20 Jun 2016 21:06:36 +0200 Message-ID: <874m8nn0hv.fsf@elite.ansel.ydns.eu> MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:lu1hc8NsFOCSAOCUUSvze+G3A2iLE0acduOBA1HKa2F20KzUpb7 TBTgplNtoMDtVTcSlh2TMfjpcEg5avy3QurPaWkxgm/faVY6uW3pgSFtf6l7XhlYBALqGW8 UfY4KRbn7iawS3DsJydipmeNhS93/tj8J4JBkmqTYITwO4IAlSlg97+zr5ph+RwKlgTTwqd 4t3KonLxbhmGx1lh6ehIg== X-UI-Out-Filterresults: notjunk:1;V01:K0:NJHiYvw/K/o=:bmsdZaaOxATPdEy/GfXaOC MybDg3AoTkSQnGGYuoVR5G7/yIMGlLNUeTt4oBB+3nZ70TOoY3iWuUQIR0RgHM24XWEhUKDhU R1iBU5EejObT0BN4k7UgsOUXfAVWx710B9q2pdYMXG07nOza2hSKVi5DybKiiMaYhabFzp4qB KdLZAB6jY+Z4S2jhDU37dMKQbloZM+H0Yla6oHc7YJFNgu9Ua/uAM1LP5HJyjkenPir9jN+z7 KwvzZj94qTqTL8fFD5JEO0sOHsgelltIsqxIhNkapVVttih5e2fsUyBUk8ZSpbvrDQt1wK4KR hSto+nGbERGT8tg47jy9eVlD80mR8EaKdMyo7Nx6sPMVpo4khs4LfJJ3hCSvlwGOWx16eNh5a Y2+cw48kCkChbnjG5y6kqEPM1K2GCW2F4KA3GM05vMDUYE8uwyw2re1QNK8OpcTYaG4/Wayf5 YFdZVcSY02WPDQqU2TUIRZz/F4hZeMpM80L5iHjdy31T4rbdhQED+ZMAihNO5dFvgQc3X+Yxw DfDwU+fUWd2KAclROw+fl9/f5+4e+SvxjDLPR7MBnWvKFjVVQFLnWrbuOnjGycJISjhx2IUzs C5gv4N9FqC+NAesjoe8b2fYH2r3iuGYZ6ebCptGIFiOWsJsEW0bwKhhZObuxy/y7ty7DUHujy YEH2G3X4kNPxls8vlFBALUp2Vn7iPOpgzN9gaJnCVSku9UfUeBdVyIROduzG6WsFohTkZndzS tuN6F1uU11Lomt1F X-Pg-Spam-Score: -1.2 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org 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=, extra=0x7fff7fe31a58, source=) at pl_handler.c:113 113 *myextra = extrachecks; (gdb) bt #0 plpgsql_extra_checks_check_hook (newvalue=, extra=0x7fff7fe31a58, source=) at pl_handler.c:113 #1 0x000000000080173f in call_string_check_hook (newval=0x7fff7fe31a50, extra=, source=, elevel=15, conf=, conf=) 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 , bootValue=bootValue@entry=0x7f803cbfdf78 "none", context=context@entry=PGC_USERSET, flags=1, check_hook=0x7f803cbe9700 , assign_hook=0x7f803cbe96e0 , 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 ) at dfmgr.c:276 #7 0x00000000007f2738 in RestoreLibraryState (start_address=0x7f8040cee14d ) at dfmgr.c:741 #8 0x00000000004e61c0 in ParallelWorkerMain (main_arg=) 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=) at postmaster.c:4971 #13 #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