* [PATCH 0/2] FreeBSD rproxy fixes
@ 2022-12-28 12:16 Eric Wong
2022-12-28 12:16 ` [PATCH 1/2] rproxy: quiet down addr2line output on FreeBSD Eric Wong
2022-12-28 12:16 ` [PATCH 2/2] rproxy: disable MWRAP+LD_PRELOAD for addr2line Eric Wong
0 siblings, 2 replies; 3+ messages in thread
From: Eric Wong @ 2022-12-28 12:16 UTC (permalink / raw)
To: mwrap-perl
OK, GNU binutils 2.39 addr2line works on FreeBSD. It's slow
and doesn't work well with MWRAP=bt:10, so mwrap itself gets
disabled for addr2line.
Eric Wong (2):
rproxy: quiet down addr2line output on FreeBSD
rproxy: disable MWRAP+LD_PRELOAD for addr2line
lib/Devel/Mwrap/Rproxy.pm | 8 ++++++++
1 file changed, 8 insertions(+)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] rproxy: quiet down addr2line output on FreeBSD
2022-12-28 12:16 [PATCH 0/2] FreeBSD rproxy fixes Eric Wong
@ 2022-12-28 12:16 ` Eric Wong
2022-12-28 12:16 ` [PATCH 2/2] rproxy: disable MWRAP+LD_PRELOAD for addr2line Eric Wong
1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2022-12-28 12:16 UTC (permalink / raw)
To: mwrap-perl
No point in showing "?? at ??:0" to prefix everything.
---
lib/Devel/Mwrap/Rproxy.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/Devel/Mwrap/Rproxy.pm b/lib/Devel/Mwrap/Rproxy.pm
index 8dc78a2..c831a36 100644
--- a/lib/Devel/Mwrap/Rproxy.pm
+++ b/lib/Devel/Mwrap/Rproxy.pm
@@ -101,6 +101,7 @@ sub a2l {
$a2l ? do {
chomp(my $line = $a2l->lookup($addr));
+ $line =~ s/\Q?? at ??:0\E//; # FreeBSD
$line = Plack::Util::encode_html($line);
$line =~ /\?\?/ ? "$line $exe($addr)" :
($line =~ /\S/ ? $line : "$exe($addr)");
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] rproxy: disable MWRAP+LD_PRELOAD for addr2line
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
1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2022-12-28 12:16 UTC (permalink / raw)
To: mwrap-perl
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)
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-28 12:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 2/2] rproxy: disable MWRAP+LD_PRELOAD for addr2line Eric Wong
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).