Glib on Syllable & g_thread_cleanup
- From: Kristian Van Der Vliet <vanders liqwyd com>
- To: gtk-devel-list gnome org
- Subject: Glib on Syllable & g_thread_cleanup
- Date: Mon, 24 Dec 2007 14:08:47 +0000
Hi all,
For the last few days I've been working to get Pidgin running on
Syllable[1] and have run into a few Glib related issues. Some of them
were obvious and have been fixed, but there are a couple of crash bugs
that have me stumped, so I'm hoping someone can shed some light on
what's happening in Glib.
During "make check" with Glib (Any: I'm currently testing with 2.12.10 &
2.14.4) five of the available tests fails: two are obvious failures that
I'm not concerned about, but two in particular are a worry: both
thread-test & threadpool-test fail.
Thread-test fails with:
** ERROR **: file /boot/home/root/Build/glib-2.14.4/tests/thread-test.c:
line 218 (test_g_static_priv
ate): assertion failed: (test_g_static_private_counter == 0)
aborting...
Aborted (core dumped)
and threadpool-test fails with:
** ERROR **:
file /boot/home/root/Build/glib-2.14.4/tests/threadpool-test.c: line 136
(test_thread_st
op_unused): assertion failed: (g_thread_pool_get_num_unused_threads ()
== test_count_threads ())
aborting...
Aborted (core dumped)
On Syllable we have our own PThreads library which wraps the native
threading API, and Glib is built to use PThreads.
I've debugged thread-test and got as far as working out that
g_thread_cleanup() is not being called when the threads exit, so
test_g_static_private_counter is at 20 when the assert fails (10
threads, each with two GStaticPrivate members each)
My problem is that I can't see how g_thread_cleanup() is expected to be
called: there are no TLS variables allocated with g_thread_cleanup() as
a destructor, g_thread_cleanup() is not added as a cleanup routine via.
pthread_push_cleanup() and as far as I can see, g_thread_cleanup() is
not called from g_thread_exit().
So by what mechanism is g_thread_cleanup() expected to be called when a
normal thread exits?
Any help or information would be appreciated so that I can debug and fix
whatever the problem is with Syllable!
[1]: Open Source desktop OS, own kernel but uses Glibc and GNU userland:
http://www.syllable.org
--
Vanders
http://www.syllable.org
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]