On Monday 08 October 2007 16:58:57 Andrew John Hughes wrote:
> On Thursday 27 September 2007 14:24:50 Ian Rogers wrote:
> > Hi,
> >
> > this patch removes a call to atexit from GtkToolkit. The comment didn't
> > give sufficient detail as to why the atexit call was necessary and the
> > failure I witnessed in the Jikes RVM was as follows:
> >
> > 1) VM runs some AWT code that causes the atexit routine in GtkToolkit to
> > be registered
> > 2) VM shuts down, stopping all of its services (GC...)
> > 3) VM calls exit that calls atexit routines
> > 4) gdk_threads_enter is called via atexit, this then calls JNI monitor
> > enter in the shutdown VM
> >
> > the shutdown VM can't handle the JNI call and locks up. There is an
> > assumption in the Jikes RVM that atexit routines won't exist that call
> > JNI functions.
> >
> > Thanks,
> > Ian
>
> Ping! Any replies?

Committed.

2007-10-12  Ian Rogers  <[EMAIL PROTECTED]>

        PR classpath/33746:
        * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c:
        Remove atexit call that makes JikesRVM deadlock.


-- 
Andrew :)

Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c
===================================================================
RCS file: /sources/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c,v
retrieving revision 1.38
diff -u -r1.38 gnu_java_awt_peer_gtk_GtkToolkit.c
--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c	11 Sep 2007 09:48:50 -0000	1.38
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c	12 Oct 2007 10:11:45 -0000
@@ -183,10 +183,6 @@
 
   gtk_widget_set_default_colormap (gdk_rgb_get_colormap ());
 
-  /* Make sure queued calls don't get sent to GTK/GDK while 
-     we're shutting down. */
-  atexit (gdk_threads_enter);
-
   if ((homedir = getenv ("HOME")))
     {
       rcpath = (char *) g_malloc (strlen (homedir) + strlen (RC_FILE) + 2);

Reply via email to