JDK-6894562 : Drag and drop in FreeMind (Java 1.6.0_15b03) hangs the X server in WaitForSomething()
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6u15
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: open_solaris
  • CPU: generic
  • Submitted: 2009-10-23
  • Updated: 2011-01-19
  • Resolved: 2010-11-08
Related Reports
Duplicate :  
Relates :  
Description
The FreeMind Java mind mapping application can hang the X server
during drag and drop.

The mouse still moves but all actions such as key presses and button
clicks are ignored. The solution is log in remotely and kill the JVM
(using SIGKILL, since SIGTERM isn't enough).

The problem is easily reproduced. Download and run FreeMind 0.9.0 RC3:

	<http://freemind.sourceforge.net/>

Then:

1. Create a simple mind map
2. Drag one of the nodes to another node
3. FreeMind and the X server hang

It's 100% reproducible for me running Java 1.6.0_15-b03 on both the
standard Gnome desktop and a 'failsafe' Xclient (running fvwm).

This is similar to CR 6237410 (MAWT: FreeMind on display :0.1 hangs
the X server during drag and drop (Java 1.5, Solaris 10)) except:

- It occurs on a single headed display
- It's not using the Motif AWT

Relevant Java stack trace from FreeMind:

> 0t25::findstack ! c++filt
stack pointer for thread 19: e56f4dc0
[ e56f4dc0 libc_hwcap1.so.1`__pollsys+0x15() ]
  e56f4e00 libc_hwcap1.so.1`poll+0x4c()
  e56f4e50 libX11.so.4`_XWaitForReadable+0xe8()
  e56f4e90 libX11.so.4`_XRead+0xa9()
  e56f5010 libX11.so.4`XOpenDisplay+0x686()
  e56f5028 libmawt.so`Java_sun_awt_X11_XlibWrapper_XOpenDisplay+0x1c()
  e56f506c 0xfb00a032()
  e56f50a4 0xfb002fab()
  e56f5114 0xfb002fab()
  e56f5174 0xfb00308d()
  e56f51bc 0xfb002f69()
  e56f5204 0xfb00308d()
  e56f5248 0xfb00308d()
  e56f52c4 0xfb00308d()
  e56f530c 0xfb003569()
  e56f535c 0xfb00308d()
  e56f5398 0xfb00308d()
  e56f53d0 0xfb00308d()
  e56f5418 0xfb003569()
  e56f5450 0xfb00308d()
  e56f5498 0xfb003569()
  e56f54c8 0xfb003569()
  e56f5500 0xfb00308d()
  e56f5534 0xfb00308d()
  e56f5564 0xfb00308d()
  e56f5594 0xfb00308d()
  e56f55dc 0xfb00308d()
  e56f5614 0xfb00308d()
  e56f5644 0xfb00308d()
  e56f568c 0xfb00308d()
  e56f56c4 0xfb002e61()
  e56f56fc 0xfb002e61()
  e56f5734 0xfb00308d()
  e56f5764 0xfb00308d()
  e56f5794 0xfb00308d()
  e56f57d0 0xfb00308d()
  e56f5820 0xfb002e61()
  e56f5858 0xfb00308d()
  e56f5890 0xfb00308d()
  e56f58c4 0xfb00308d()
  e56f58f4 0xfb00308d()
  e56f592c 0xfb000348()
  e56f59d4 libjvm.so`void JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*)+0x1c9()
  e56f59fc libjvm.so`void os::os_exception_wrapper(void(*)(JavaValue*,methodHandle*,JavaCallArguments*,Thread*),JavaValue*,methodHandle*,JavaCallArguments*,Thread*)+0x27()
  e56f5a2c libjvm.so`void JavaCalls::call(JavaValue*,methodHandle,JavaCallArguments*,Thread*)+0x2f()
  e56f5a9c libjvm.so`void JavaCalls::call_virtual(JavaValue*,KlassHandle,symbolHandle,symbolHandle,JavaCallArguments*,Thread*)+0xc1()
  e56f5b64 libjvm.so`void JavaCalls::call_virtual(JavaValue*,Handle,KlassHandle,symbolHandle,symbolHandle,Thread*)+0x7e()
  e56f5bd4 libjvm.so`void thread_entry(JavaThread*,Thread*)+0xd3()
  e56f5c38 libjvm.so`void JavaThread::thread_main_inner()+0x4c()
  e56f5c84 libjvm.so`void JavaThread::run()+0x182()
  e56f5fcc libjvm.so`java_start+0xf9()
  e56f5fec libc_hwcap1.so.1`_thrp_setup+0x7e()
  e56f5ff8 libc_hwcap1.so.1`_lwp_start()
> 

X server looks like this:

29660:	/opt/SUNWut/lib/Xnewt :46 -auth /var/lib/gdm/:46.Xauth +bs -terminate
 feda1ff5 pollsys  (8046c90, 6, 8047508, 0)
 fed4cf71 pselect  (ff, 85974e0, 0, 0, 8047508, 0) + 199
 fed4d346 select   (ff, 85974e0, 0, 0, 8047568, 0) + 78
 080f0bf1 WaitForSomething (80477b0, 2b, 164a, 9, 0, 8047c10) + 891
 08118192 Dispatch (2, 0, 8047da8, 812bd21, fec32a00, fee26100) + 242
 0812c1a1 main     (6, 8047da8, 8047dc4) + 491
 080a789a _start   (6, 8047e68, 8047e7e, 8047e82, 8047e88, 8047e9f) + 7a

Currently running OpenSolaris 2009.06 (snv_123) on x64, Sun Ray 4.2_49.

If the workaround is used and drag and drop can be made to work
without hanging the X server further invocations of FreeMind no longer
hang the X server in drag-n-drop.

Comments
EVALUATION I run the FreeMind application but one simple test case works fine in my environments: ubuntu 9.04, GNOME, latest 6u18 release Solaris 10. JDS, latest 6u18 release Could you please provide more info on this hang? 1. the description says: " 1. Create a simple mind map " Is it possible to provide an example of the map (.mm file) that can be used to reproduce the test? 2. could you please provide the thread dump of the hanged java process (jstack can be used to get the thread dump). 3. is the problem reproducible using jdk 1.6.0? Thanks.
23-10-2009

WORK AROUND Use Java 1.5, eg $ export JAVACMD=/foo/jdk1.5.0_14/bin/java $ "$FREEMIND/freemind.sh" Once drag-n-drop is working in a X session it's no longer necessary to use the workaround.
23-10-2009