Bug 154215
Summary: | [OOo][gcj] GThread-ERROR **: GThread system may be only initialized once | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Caolan McNamara <caolanm> | ||||
Component: | gcc | Assignee: | Thomas Fitzsimmons <fitzsim> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | |||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | rawhide | CC: | dcbw, rousseau | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i386 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2005-05-04 09:51:26 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 136450 | ||||||
Attachments: |
|
Description
Caolan McNamara
2005-04-08 14:58:10 UTC
with libgcj from gcc-4.0.0-40. fitzsim: gcj should be using something like this to make sure that threading is only initialized once: if (!g_thread_supported()) g_thread_init (NULL); g_thread_supported() will indicate whether or not the thread system has been initialized already. Patch attached. Created attachment 112861 [details]
Don't call g_thread_init() when threading is already initialized.
Note that there are some potential problems here. For instance, when OOo has
already called g_thread_init() with NULL, I don't believe you can replace the
current glib threading implementation with portable_native_sync_jni_functions.
I'm fairly sure that g_thread_init() is one-shot. So you'll have to deal with
not being able to use portable_native_sync_jni_functions all the time.
(12:09:52) dcbw: owen: But there is one case where gcj wants to replace the default thread stuff with its own, which it would not be able to do if OOo already initialized threads with g_thread_init (NULL); (12:09:57) dcbw: owen: correct? (12:09:59) owen: dcbw: gcj should stop doing that (12:10:16) owen: We're likely to deprecate the functionality at some point (12:11:51) dcbw: owen: gcj seems to map the glib threading functions to its own JNI threading/mutex functions in that instance (12:12:11) owen: dcbw: Bad idea (12:12:33) dcbw: owen: What should they do instead? (12:12:47) owen: dcbw: gcj needs to be using threading/mutex functions that are cfompatible with the native system ones We don't use the portable native sync functions in libgcj. They were added to GNU Classpath to support VMs that don't use the platform's native threading model. I suppose the portable native sync functions will never be usable in GTK apps that embed a JVM in-process. I'll post your patch to the GNU Classpath list for discussion. In the meantime, I'll test it and send it to Jakub for inclusion in our libgcj RPMs. I can't reproduce this in openoffice.org-writer-1.9.92-2 openoffice.org-core-1.9.92-2. I enabled the gconf key: desktop->gnome->interface->accessibility and then ran "ooffice". What else do I need to do? Is there a workaround patch in the rpms that I need to disable? It's there with gcc-4.0.0-40 and now gone in gcc-4.0.0-42. I'm not certain if that is actually a "fixed with gcc-4.0.0-42" seeing as there are other problems with gcj in -42. Might be best to wait until > 42 and reconfirm that crash is begone. reproducable at runtime with 1.9.92 and gcc-4.0.0-1 (not 1.9.93 because that has had its java disabled due to problems with gcc-4.0.0-0.42 with which it was built) I've sent the patch here to Jakub for inclusion in the FC4 libgcj RPMs. I'll keep you posted as to when it's ready to be tested. That patch is in gcc-4.0.0-2. Please verify. OOo starts without error when accessibility flag enabled. Good enough for me. |