From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 46A391FA27 for ; Wed, 28 Dec 2022 12:14:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1672229695; bh=45uwFgetxJsx09JdimN4J5a/1czxuNBBre6LUZHQ6xg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=W5AW1jO/3WlhEgRKqhhhyZMUZ2Eip0qTb7AejO7Tt03aaM4/nGYCMAiwKRAjP4el2 szy/CCrR2u+1pHjpL/wuUHNdCjRfTpE4JcKxxVI3IOpl4uM34DA0IhBz1HWqZPlCSM bYbsodRPLPD5PS7iMkcSyg0XdvdGijKa7e9vhTrg= From: Eric Wong To: mwrap-perl@80x24.org Subject: [PATCH 2/2] rproxy: disable MWRAP+LD_PRELOAD for addr2line Date: Wed, 28 Dec 2022 12:16:22 +0000 Message-Id: <20221228121622.20306-3-mwrap-perl@80x24.org> In-Reply-To: <20221228121622.20306-1-mwrap-perl@80x24.org> References: <20221228121622.20306-1-mwrap-perl@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: GNU addr2line seems impossibly slow with MWRAP=bt:10 on FreeBSD. In any case, it's impossible for a single-process rproxy to inspect it's own addr2line processes; so just disable it. --- lib/Devel/Mwrap/Rproxy.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/Devel/Mwrap/Rproxy.pm b/lib/Devel/Mwrap/Rproxy.pm index c831a36..e2b7097 100644 --- a/lib/Devel/Mwrap/Rproxy.pm +++ b/lib/Devel/Mwrap/Rproxy.pm @@ -139,6 +139,13 @@ sub call { # PSGI entry point undef %cache; $cache_exp = $now + $cache_time; } + + # GNU addr2line is slow with high bt:, and FreeBSD addr2line + # seems less capable. And we can't see addr2line in this + # anyways since we kill them at the end of this scope. + # So just disable MWRAP, here: + delete local $ENV{MWRAP}; + delete local $ENV{LD_PRELOAD}; eval { local %addr2line; # extract executable|library(address)