Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDFkh-0004Ue-7H for pgsql-bugs@arkaria.postgresql.org; Wed, 15 Jun 2016 18:41:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bDFkg-0003VY-Qu for pgsql-bugs@arkaria.postgresql.org; Wed, 15 Jun 2016 18:41:22 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bDFk2-0002jN-PZ for pgsql-bugs@postgresql.org; Wed, 15 Jun 2016 18:40:42 +0000 Received: from mimolette.dalibo.net ([212.85.157.144] helo=mail.dalibo.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bDFk0-000326-1p for pgsql-bugs@postgresql.org; Wed, 15 Jun 2016 18:40:41 +0000 Received: from firost (glo44-1-82-67-129-175.fbx.proxad.net [82.67.129.175]) by mail.dalibo.com (Postfix) with ESMTPSA id 2BA182C2CA7 for ; Wed, 15 Jun 2016 20:40:38 +0200 (CEST) Date: Wed, 15 Jun 2016 20:40:36 +0200 From: Jehan-Guillaume de Rorthais To: pgsql-bugs@postgresql.org Subject: Segmentation fault with postgres -C external_pid_file Message-ID: <20160615204036.2d35d86a@firost> Organization: Dalibo X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Hello, I just found that the following command always produce a segmentation fault when external_pid_file is kept commented: $ postgres -C external_pid_file Segmentation fault (core dumped) Here is the full backtrace from the core file using 9.5.3: (gdb) bt full #0 strlen () at ../sysdeps/x86_64/strlen.S:106 No locals. #1 0x00007fe0f397e99c in _IO_puts (str=0x0) at ioputs.c:36 result = -1 len = #2 0x0000000000643dc6 in PostmasterMain (argc=argc@entry=3, argv=argv@entry=0x297c170) at postmaster.c:827 opt = status = userDoption = 0x0 listen_addr_saved = 0 '\000' i = output_config_variable = 0x2997c90 "external_pid_file" __func__ = "PostmasterMain" #3 0x000000000046a377 in main (argc=3, argv=0x297c170) at main.c:228 No locals. This has been tested only with 9.5 and 9.4. The following simple patch seems to fix this bug: diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index f249b390..0362555 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -3269,7 +3269,7 @@ static struct config_string ConfigureNamesString[] = GUC_SUPERUSER_ONLY }, &external_pid_file, - NULL, + "", check_canonical_path, NULL, NULL }, Regards, -- Jehan-Guillaume de Rorthais Dalibo -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs