Hello, since this bug is really impacting lots of packages, I'm NMUing right
now.
I spent lots of time trying to understand why cpprest and websocketpp were failing
testsuite after printing "test OK",
digged into openssl code, and after a while I got the issue on boost side.
Better avoid other people loosing that much time :)
diff attached, and big thanks to Hilko for opening this bug!
G.
On Fri, 1 Jul 2022 18:32:12 +0200 Gianfranco Costamagna
<[email protected]> wrote:
Hello Hilko
On Fri, 01 Jul 2022 18:03:10 +0200 Hilko Bengen <[email protected]> wrote:
> Source: boost1.74
> Version: 1.74.0-16
> Severity: grave
> Tags: patch, upstream
> X-Debbugs-Cc: Hilko Bengen <[email protected]>
>
> Dear Maintainer,
>
> I recently received #1013470 (nbdkit FTBFS because of segfaults when
> running test suite); this turned out to be caused by #1013931 (segfault
> in libtorrent-rasterbar cleanup code), I was able to track the root
> cause to an incomplete #ifdef condition in
> libs/asio/include//boost/asio/ssl/detail/impl/openssl_init.ipp as of
> 1.74.0-16 that caused CONF_modules_unload to crash after OpenSSL 3.0+
> had done its own cleanup which included calling that function.
>
> (See discussion in <https://github.com/arvidn/libtorrent/issues/6940>.)
>
> Please apply upstream's patch
>
<https://github.com/boostorg/asio/commit/74a94fe7f47b2e3f707cf4589fbb635a50f22ad2>.
>
> After applying this patch, and rebuilding boost1.74 +
> libtorrent-rasterbar, I am no longer able to reproduce the sagfaults.
I found the very same issue on cpprest and websocketpp but I couldn't go deeper
into asio code and find the patch.
I merged the other bugs to this one, but I don't know how many others are there.
We should NMU ASAP.
G.
diff -Nru boost1.74-1.74.0/debian/changelog boost1.74-1.74.0/debian/changelog
--- boost1.74-1.74.0/debian/changelog 2022-06-02 06:26:21.000000000 +0200
+++ boost1.74-1.74.0/debian/changelog 2022-07-04 09:34:02.000000000 +0200
@@ -1,3 +1,12 @@
+boost1.74 (1.74.0-16.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * debian/patches/74a94fe7f47b2e3f707cf4589fbb635a50f22ad2.patch:
+ - cherry-pick upstream asio change to fix exit failures with openssl 3.0.4
+ Closes: #1014180, #1013530, #1013472 and many others probably
+
+ -- Gianfranco Costamagna <[email protected]> Mon, 04 Jul 2022
09:34:02 +0200
+
boost1.74 (1.74.0-16) unstable; urgency=medium
[ Bernhard Übelacker ]
diff -Nru
boost1.74-1.74.0/debian/patches/74a94fe7f47b2e3f707cf4589fbb635a50f22ad2.patch
boost1.74-1.74.0/debian/patches/74a94fe7f47b2e3f707cf4589fbb635a50f22ad2.patch
---
boost1.74-1.74.0/debian/patches/74a94fe7f47b2e3f707cf4589fbb635a50f22ad2.patch
1970-01-01 01:00:00.000000000 +0100
+++
boost1.74-1.74.0/debian/patches/74a94fe7f47b2e3f707cf4589fbb635a50f22ad2.patch
2022-07-04 09:34:02.000000000 +0200
@@ -0,0 +1,29 @@
+From 74a94fe7f47b2e3f707cf4589fbb635a50f22ad2 Mon Sep 17 00:00:00 2001
+From: Christopher Kohlhoff <[email protected]>
+Date: Thu, 30 Jun 2022 00:29:55 +1000
+Subject: [PATCH] Fix compatibility with OpenSSL 3.0.4 and later.
+
+---
+ libs/asio/include/boost/asio/ssl/detail/impl/openssl_init.ipp | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/libs/asio/include/boost/asio/ssl/detail/impl/openssl_init.ipp
b/libs/asio/include/boost/asio/ssl/detail/impl/openssl_init.ipp
+index 3555caaab..8357146f9 100644
+--- a/libs/asio/include/boost/asio/ssl/detail/impl/openssl_init.ipp
++++ b/libs/asio/include/boost/asio/ssl/detail/impl/openssl_init.ipp
+@@ -86,9 +86,13 @@ public:
+ #endif // (OPENSSL_VERSION_NUMBER >= 0x10002000L)
+ // && (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ // && !defined(SSL_OP_NO_COMPRESSION)
+-#if !defined(OPENSSL_IS_BORINGSSL) && !defined(BOOST_ASIO_USE_WOLFSSL)
++#if !defined(OPENSSL_IS_BORINGSSL) \
++ && !defined(BOOST_ASIO_USE_WOLFSSL) \
++ && (OPENSSL_VERSION_NUMBER < 0x30000000L)
+ ::CONF_modules_unload(1);
+-#endif // !defined(OPENSSL_IS_BORINGSSL) && !defined(BOOST_ASIO_USE_WOLFSSL)
++#endif // !defined(OPENSSL_IS_BORINGSSL)
++ // && !defined(BOOST_ASIO_USE_WOLFSSL)
++ // && (OPENSSL_VERSION_NUMBER < 0x30000000L)
+ #if !defined(OPENSSL_NO_ENGINE) \
+ && (OPENSSL_VERSION_NUMBER < 0x10100000L)
+ ::ENGINE_cleanup();
diff -Nru boost1.74-1.74.0/debian/patches/series
boost1.74-1.74.0/debian/patches/series
--- boost1.74-1.74.0/debian/patches/series 2022-06-02 06:26:02.000000000
+0200
+++ boost1.74-1.74.0/debian/patches/series 2022-07-04 09:34:02.000000000
+0200
@@ -24,3 +24,4 @@
fix_b2_freebsd.patch
fix_utime_omit_freebsd.patch
fix-enum.patch
+74a94fe7f47b2e3f707cf4589fbb635a50f22ad2.patch