Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h8pK7-00080r-08 for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Mar 2019 16:53:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h8pK4-0005i3-Nu for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Mar 2019 16:53:12 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1h8pK4-0005hw-GK for pgsql-hackers@lists.postgresql.org; Tue, 26 Mar 2019 16:53:12 +0000 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h8pJz-0003xE-LO for pgsql-hackers@lists.postgresql.org; Tue, 26 Mar 2019 16:53:11 +0000 Received: by mail-qt1-x844.google.com with SMTP id w30so15385781qta.8 for ; Tue, 26 Mar 2019 09:53:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=8tpVl3yrpYe+kyrwqeN+lku2dJPDGZjGVqkbGXM9T/M=; b=w8DWydz3czIBTAGBbwn178OHuPyVBkJdm/gQnKeFW4v0YlbmfvF+fraI5i7zFUtUk5 qXqvDxbsd8Ru7DNuv0PkVgosgME/h6o1NUZMUdkyNeN8EcvR9sLfFCzqwLPSTh2MirLn Eog6A4jRRtzZuHasMgVcXsDWdih1rBw2l2xMDlew74aYTxrpxrs6uKccjW0kLUMd+Jwq YvxFiC9gBUhh5cBi6Eh1tpqbDnKiR92MZrGYDO1/aWh6Qrxt03bt2CVI9xVGXZccGJhX syrT3ZbdCRci2Z2FrG5jG8+Zf6BGurNLhCzwd9nQlPAoHD4pI7x15TCWT+mfcXHGnYn9 cHWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=8tpVl3yrpYe+kyrwqeN+lku2dJPDGZjGVqkbGXM9T/M=; b=Qp1J4N2JwqymhFU5U4WdcXYBg7rvVUvoWCeoXXOdb+BJ+U5ZZrIg6FOQkY3oC15fnH RzYkOIUeDMhU7PJEteNdu1xNWhDmAHBoH/5zdPtrJ70qIRb/lHgn9W9chO/9KYy9RJlb dxvCBHtGiFt+44E4uPyLRbfwZhsMKQ2gG16YZRpVsi3pvDGuwlA2U2IKoyoCQRdCpITE N3gPIqoavO67HdvSnqGIhOX0zfends1u9kJTQbPsCNPYGc4jIUN59Dl/Obl7PnLXz/qz QP63w+hVTHlxGy7eFOTiV4UEIObdOJ744bnvBCc3/t6iJMaWrvDL478OdXoDRJox5czE gdVA== X-Gm-Message-State: APjAAAXPZSjhOrwV4YzxDA7AyR7xe+zBf9QbEr8hPxdbGyE+Sm+R9mhF Ia/37eZVA4ZQkfeSYNPgP0SVtg== X-Google-Smtp-Source: APXvYqzFmiPs7Cgr5huHcLWiuUN9KqWXpDzTbxoM/XGdbkJqC1/u/sMwkqJkVNzfuGkLugjDQzG9wA== X-Received: by 2002:aed:39c1:: with SMTP id m59mr26395250qte.114.1553619186087; Tue, 26 Mar 2019 09:53:06 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id w8sm8331644qki.54.2019.03.26.09.53.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Mar 2019 09:53:05 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 9BC5E120A8C; Tue, 26 Mar 2019 13:53:02 -0300 (-03) Date: Tue, 26 Mar 2019 13:53:02 -0300 From: Alvaro Herrera To: Andrew Dunstan Cc: Alexander Korotkov , pgsql-hackers@lists.postgresql.org Subject: Re: pgsql: Get rid of backtracking in jsonpath_scan.l Message-ID: <20190326165302.GA31998@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="dDRMvlgZJXvWKvBx" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190326152209.GA16374@alvherre.pgsql> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --dDRMvlgZJXvWKvBx Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On 2019-Mar-26, Alvaro Herrera wrote: > > 2019-03-26 00:49:02.208 EDT [5c99ae9e.20cc:6] LOG: server process (PID 8368) was terminated by exception 0xC0000028 > > 0xC0000028 is STATUS_BAD_STACK, per > https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/596a1078-e883-4972-9bbc-49e60bebca55 > Not sure how credible/useful a stack trace is going to be. BTW I think we should update our message to use this URL instead of ambiguously pointing to "ntstatus.h". Also, all the URLs in win32_port.h (except the wine one) are dead. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services --dDRMvlgZJXvWKvBx Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="ntstatus.patch" diff --git a/src/backend/postmaster/pgarch.c b/src/backend/postmaster/pgarch.c index f84f882c4cb..549c82ea627 100644 --- a/src/backend/postmaster/pgarch.c +++ b/src/backend/postmaster/pgarch.c @@ -647,7 +647,8 @@ pgarch_archiveXlog(char *xlog) ereport(lev, (errmsg("archive command was terminated by exception 0x%X", WTERMSIG(rc)), - errhint("See C include file \"ntstatus.h\" for a description of the hexadecimal value."), + errhint("See \"%s\" for a description of the hexadecimal value.", + "https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/596a1078-e883-4972-9bbc-49e60bebca55"), errdetail("The failed archive command was: %s", xlogarchcmd))); #else diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index fe599632d3d..a540d51d79a 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -3630,7 +3630,8 @@ LogChildExit(int lev, const char *procname, int pid, int exitstatus) "server process" */ (errmsg("%s (PID %d) was terminated by exception 0x%X", procname, pid, WTERMSIG(exitstatus)), - errhint("See C include file \"ntstatus.h\" for a description of the hexadecimal value."), + errhint("See \"%s\" for a description of the hexadecimal value.", + "https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/596a1078-e883-4972-9bbc-49e60bebca55"), activity ? errdetail("Failed process was running: %s", activity) : 0)); #else ereport(lev, diff --git a/src/include/port/win32_port.h b/src/include/port/win32_port.h index f4841fb3975..12abd08cda4 100644 --- a/src/include/port/win32_port.h +++ b/src/include/port/win32_port.h @@ -107,7 +107,7 @@ * similar to a unix-style signal exit (think SIGSEGV == * STATUS_ACCESS_VIOLATION). Return values are broken up into groups: * - * http://msdn2.microsoft.com/en-gb/library/aa489609.aspx + * https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/87fba13e-bf06-450e-83b1-9241dc81e781 * * NT_SUCCESS 0 - 0x3FFFFFFF * NT_INFORMATION 0x40000000 - 0x7FFFFFFF @@ -119,24 +119,10 @@ * by the system, and it seems values >= 0x100 are system-generated. * See this URL for a list of WIN32 STATUS_* values: * - * Wine (URL used in our error messages) - + * https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/596a1078-e883-4972-9bbc-49e60bebca55 + * + * Wine - * http://source.winehq.org/source/include/ntstatus.h - * Descriptions - http://www.comp.nus.edu.sg/~wuyongzh/my_doc/ntstatus.txt - * MS SDK - http://www.nologs.com/ntstatus.html - * - * It seems the exception lists are in both ntstatus.h and winnt.h, but - * ntstatus.h has a more comprehensive list, and it only contains - * exception values, rather than winnt, which contains lots of other - * things: - * - * http://www.microsoft.com/msj/0197/exception/exception.aspx - * - * The ExceptionCode parameter is the number that the operating system - * assigned to the exception. You can see a list of various exception codes - * in WINNT.H by searching for #defines that start with "STATUS_". For - * example, the code for the all-too-familiar STATUS_ACCESS_VIOLATION is - * 0xC0000005. A more complete set of exception codes can be found in - * NTSTATUS.H from the Windows NT DDK. * * Some day we might want to print descriptions for the most common * exceptions, rather than printing an include file name. We could use --dDRMvlgZJXvWKvBx--