Date: Thu, 20 May 2010 17:41:13 GMT From: Ricky Morse <remorse@partners.org> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/146768: misc/amanda-server-2.6.1p2_1, 1 not compatible with devel/glib-2.24.1 Message-ID: <201005201741.o4KHfDru046621@www.freebsd.org> Resent-Message-ID: <201005201750.o4KHo2XX071339@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 146768 >Category: ports >Synopsis: misc/amanda-server-2.6.1p2_1,1 not compatible with devel/glib-2.24.1 >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu May 20 17:50:01 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Ricky Morse >Release: 8.0-RELEASE-p2/amd64 >Organization: MGH Biostatistics Center >Environment: FreeBSD hedwig.mgh.harvard.edu 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #0: Tue Jan 5 21:11:58 UTC 2010 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 >Description: glib 2.24 changed the way that threading was initialized from glib 2.22. This causes Amanda to dump core, with a failed assertion in glib-util.c at line 48 ("g_assert(!g_thread_supported());"). There is a fix for this in the 3_1 branch of Amanda, and I am trying to get it put into the 2.6.1 source, but until then, I'm hoping that this patch can be added to the port. >How-To-Repeat: with devel/glib20 updated to the latest version (2.24.1), install misc/amanda-server. Then try to run various amanda commands, and watch as they dump core. >Fix: A reorganization of common-src/glib-util.c to change the initialization order. I've attached the patch file. (I don't have the double-colon in the name because I wasn't sure it would upload properly.) Patch attached with submission follows: --- common-src/glib-util.c.orig 2010-05-20 13:19:58.000000000 -0400 +++ common-src/glib-util.c 2010-05-20 13:24:40.000000000 -0400 @@ -38,26 +38,15 @@ if (did_glib_init) return; did_glib_init = TRUE; - /* Initialize glib's type system */ - g_type_init(); - /* set up libcurl (this must happen before threading * is initialized) */ #ifdef HAVE_LIBCURL # ifdef G_THREADS_ENABLED - g_assert(!g_thread_supported()); + g_assert(!g_thread_supported()); /* assert threads aren't initialized yet */ # endif g_assert(curl_global_init(CURL_GLOBAL_ALL) == 0); #endif - /* And set up glib's threads */ -#if defined(G_THREADS_ENABLED) && !defined(G_THREADS_IMPL_NONE) - if (g_thread_supported()) { - return; - } - g_thread_init(NULL); -#endif - /* do a version check */ #if GLIB_CHECK_VERSION(2,6,0) { @@ -71,6 +60,17 @@ } } #endif + + /* Initialize glib's type system. On glib >= 2.24, this will initialize + * threads, so it must be done after curl is initialized. */ + g_type_init(); + + /* And set up glib's threads */ +#if defined(G_THREADS_ENABLED) && !defined(G_THREADS_IMPL_NONE) + if (!g_thread_supported()) + g_thread_init(NULL); +#endif + } typedef enum { >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005201741.o4KHfDru046621>