mwrap (Perl version) user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <mwrap-perl@80x24.org>
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	[thread overview]
Message-ID: <20221228121622.20306-3-mwrap-perl@80x24.org> (raw)
In-Reply-To: <20221228121622.20306-1-mwrap-perl@80x24.org>

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)

      parent reply	other threads:[~2022-12-28 12:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-28 12:16 [PATCH 0/2] FreeBSD rproxy fixes Eric Wong
2022-12-28 12:16 ` [PATCH 1/2] rproxy: quiet down addr2line output on FreeBSD Eric Wong
2022-12-28 12:16 ` Eric Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221228121622.20306-3-mwrap-perl@80x24.org \
    --to=mwrap-perl@80x24.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mwrap-perl.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).