Add patch to hopefully fix server-test timeouts
Resolves: RHEL-65395
This commit is contained in:
parent
51d6712b77
commit
bedcdcc3f1
@ -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
|
||||
|
43
server-test-timeout.patch
Normal file
43
server-test-timeout.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From 9ff306aa714efd06ceeafacee03298a3665055b1 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Catanzaro <mcatanzaro@redhat.com>
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user