From bedcdcc3f1c2a75ab4006eb816b30aed37babc15 Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Wed, 30 Apr 2025 14:33:17 -0500 Subject: [PATCH] Add patch to hopefully fix server-test timeouts Resolves: RHEL-65395 --- libsoup3.spec | 2 ++ server-test-timeout.patch | 43 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 server-test-timeout.patch diff --git a/libsoup3.spec b/libsoup3.spec index 28ef6fa..75ae93b 100644 --- a/libsoup3.spec +++ b/libsoup3.spec @@ -11,6 +11,8 @@ Source0: https://download.gnome.org/sources/libsoup/3.6/libsoup-%{version}.tar.x # https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/426 Patch: test-timeouts.patch +# https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/454 +Patch: server-test-timeout.patch # https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/450 Patch: CVE-2025-32914.patch diff --git a/server-test-timeout.patch b/server-test-timeout.patch new file mode 100644 index 0000000..9079523 --- /dev/null +++ b/server-test-timeout.patch @@ -0,0 +1,43 @@ +From 9ff306aa714efd06ceeafacee03298a3665055b1 Mon Sep 17 00:00:00 2001 +From: Michael Catanzaro +Date: Wed, 30 Apr 2025 14:13:41 -0500 +Subject: [PATCH] test-utils: fix deadlock in add_listener_in_thread() + +The mutex is locked in the wrong place here. + +Hopefully fixes #379 +--- + tests/test-utils.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/tests/test-utils.c b/tests/test-utils.c +index df4cee44..5c1e316c 100644 +--- a/tests/test-utils.c ++++ b/tests/test-utils.c +@@ -607,9 +607,11 @@ static gboolean + add_listener_in_thread (gpointer user_data) + { + AddListenerData *data = user_data; ++ GUri *uri; + +- data->uri = add_listener (data->server, data->scheme, data->host); ++ uri = add_listener (data->server, data->scheme, data->host); + g_mutex_lock (&data->mutex); ++ data->uri = uri; + g_cond_signal (&data->cond); + g_mutex_unlock (&data->mutex); + +@@ -641,9 +643,9 @@ soup_test_server_get_uri (SoupServer *server, + data.host = host; + data.uri = NULL; + +- g_mutex_lock (&data.mutex); + soup_add_completion (context, add_listener_in_thread, &data); + ++ g_mutex_lock (&data.mutex); + while (!data.uri) + g_cond_wait (&data.cond, &data.mutex); + +-- +GitLab +