Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qG3mR-0003V2-75 for pgsql-hackers@arkaria.postgresql.org; Sun, 02 Jul 2023 20:34:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qG3mP-0001Mb-Qw for pgsql-hackers@arkaria.postgresql.org; Sun, 02 Jul 2023 20:34:45 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qG3mP-0001MS-8P for pgsql-hackers@lists.postgresql.org; Sun, 02 Jul 2023 20:34:45 +0000 Received: from mail-yw1-x1136.google.com ([2607:f8b0:4864:20::1136]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qG3mM-001g7Z-Ib for pgsql-hackers@postgresql.org; Sun, 02 Jul 2023 20:34:43 +0000 Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-5701e8f2b79so44498327b3.0 for ; Sun, 02 Jul 2023 13:34:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joeconway.com; s=google; t=1688330082; x=1690922082; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=nLKLoR1ntexgUA7T045LvjWlLy05yZ4kq3jVZVehn8I=; b=gqvm0RsoCNHQcVhztCeCYgI46U2IDfFOGr/ekCZGL8nkxlt09EfW8Nku3hCSfzKEje wWVEEvsxdA0HNEq67HlvC9WXsGzCcabRz0uqnUWDKrC60useaR2WI7NCNknptmQulD1S kafBHu6KSRoyGyfaj1mBXjO4wW92SO5uc9e4fBu+c5UEo4ynwhnjAqS4973ynLa8X84Q MzzM2BlR9A7UoQf7x0H9M4KjVHo0e0zzFzVJkXH3QZdNkznYbX8TLvHn1bVa+I2b/rW3 H4p8SidSlrQrPHEjH5hCdjKFHzyD2H6NKrXNY4+itrK7kXCaZi4MkNDB+wZSjGAt1Cnc hFOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688330082; x=1690922082; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nLKLoR1ntexgUA7T045LvjWlLy05yZ4kq3jVZVehn8I=; b=XdaJ5uDwJK3iMBxejwW4Wa/AimPZkYD+faECWFGEw7PQ2zH1vOcgL8cHlNOKTPx6KI pn0/HGm5lx9Dz7tTirMB64/52ICOaE6+nibbWkelnUkWWlpmRm3eywEUpVCu3vCtOPh1 ENtyII9zpr7/NUqIWx3bD5fL8GRyNWmosVHbCFtd8yFcV+qLAe7HuZ/JHvMSwgVFxKjl QL8IbAnbT3QbERZRa2nvQR1JmWwgaHpYth/OGKDd3Gr79EKZ0haC20CyUoK9nlF3VrRr aHThazYe+XbymALl2cOEbK6nMb1WBR7P3X/zNVAkVq7JftJqopaIkG9hxu3hjx3qDPe0 VFeQ== X-Gm-Message-State: ABy/qLYCxymAw8V/ZKniUPxe00Wjw7cmYey3FJ70+b8XA4ePdCzMtVEg zsCzdyUnvEWGSswrxagPgvMosCer5UK99OSYodY= X-Google-Smtp-Source: APBJJlG6swSoMV555yqvlrt9vwywbJwuIc+i3lWhtdUFOusUPh/I8MMgSPvVgLIwA4Q6n/Abr2phLg== X-Received: by 2002:a81:4689:0:b0:55d:edf3:9e0a with SMTP id t131-20020a814689000000b0055dedf39e0amr8209498ywa.27.1688330081845; Sun, 02 Jul 2023 13:34:41 -0700 (PDT) Received: from [192.168.4.41] (162-239-31-113.lightspeed.dybhfl.sbcglobal.net. [162.239.31.113]) by smtp.gmail.com with ESMTPSA id z3-20020a0dd703000000b0055a07c7be39sm4710587ywd.31.2023.07.02.13.34.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 02 Jul 2023 13:34:41 -0700 (PDT) Message-ID: <9c4b5939-2db3-7441-a0f1-56e3953ba461@joeconway.com> Date: Sun, 2 Jul 2023 16:34:40 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: Optionally using a better backtrace library? To: Andres Freund , pgsql-hackers@postgresql.org References: <20230702183156.g67uibfniur4q3cn@awork3.anarazel.de> Content-Language: en-US From: Joe Conway In-Reply-To: <20230702183156.g67uibfniur4q3cn@awork3.anarazel.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 7/2/23 14:31, Andres Freund wrote: > Nice things about libbacktrace are that the generation of stack traces is > documented to be async signal safe on most platforms (with a #define to figure > that out, and a more minimal safe version always available) and that it > supports a wide range of platforms: > > https://github.com/ianlancetaylor/libbacktrace > As of October 2020, libbacktrace supports ELF, PE/COFF, Mach-O, and XCOFF > executables with DWARF debugging information. In other words, it supports > GNU/Linux, *BSD, macOS, Windows, and AIX. The library is written to make it > straightforward to add support for other object file and debugging formats. > > > The state I currently have is very hacky, but if there's interest in > upstreaming something like this, I could clean it up. +1 Seems useful! -- Joe Conway PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com