* [PATCH] t/watch_filter_rubylang.t: DS->Reset to avoid segfault
@ 2023-09-06 0:08 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2023-09-06 0:08 UTC (permalink / raw)
To: meta
Object destruction order needs to be managed manually here to
avoid an occasional segfault at _rthread_mutex_timedlock() with
the following callstack:
XS_DBI_dispatch()
XS_DBD__SQLite__st_DESTROY()
sqlite_st_destroy()
sqlite3_finalize()
_rthread_mutex_timedlock()
...on OpenBSD 7.3 (Perl 5.36, DBD::SQLite 1.70v0, DBI 1.643p0,
sqlite 3.41.0). I'm not sure exactly where the bug is, but I
suspect it's something inherent in Perl's unpredictable
destruction order at process teardown (something I've had to
workaround in the past when dealing with XS extensions).
There's no downloadable debug-* OpenBSD packages to ease
debugging for these components, either.
---
t/watch_filter_rubylang.t | 3 +++
1 file changed, 3 insertions(+)
diff --git a/t/watch_filter_rubylang.t b/t/watch_filter_rubylang.t
index 004e794e..643dbb8a 100644
--- a/t/watch_filter_rubylang.t
+++ b/t/watch_filter_rubylang.t
@@ -99,6 +99,9 @@ EOF
}
$w->scan('full');
+ # ensure orderly destruction to avoid SQLite segfault:
+ PublicInbox::DS->Reset;
+
$cfg = PublicInbox::Config->new(\$orig);
$ibx = $cfg->lookup_name($v);
$ibx->{-no_fsync} = 1;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-09-06 0:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-06 0:08 [PATCH] t/watch_filter_rubylang.t: DS->Reset to avoid segfault Eric Wong
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).