Bug 1073984 - Java apps using GTK look and feel hangs in xcb_wait_for_reply
Summary: Java apps using GTK look and feel hangs in xcb_wait_for_reply
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: java-1.7.0-openjdk
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mario Torre
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-07 15:33 UTC by Thomas Meyer
Modified: 2015-06-29 19:20 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-29 19:20:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Thomas Meyer 2014-03-07 15:33:36 UTC
Description of problem:
jEdit and icedtea-web, when using the GTK look and feel, hangs in xcb while waiting for the _XReply message.

Version-Release number of selected component (if applicable):
java-1.7.0-openjdk.x86_64                           1:1.7.0.60-2.4.5.1.fc20

How reproducible:
Nearly always. jEdit sometime comes up with the GTK look&feel.

Steps to Reproduce:
1. change jEdit look and feel to GTK
2. start jEdit with "java -ea -jar /your-path-to-jedit/jedit.jar"
3. see jedit hang

Additional info:
xtrace (http://xtrace.alioth.debian.org/ which btw would be great if someone package this for Fedora...) reveals that java opens four connections to the X server:

1. connection:
#0  0x0000003623aea9dd in poll () from /lib64/libc.so.6
#1  0x000000362720b99a in poll (__timeout=-1, __nfds=1, __fds=0x7f1caac750d0)
    at /usr/include/bits/poll2.h:46
#2  read_block (len=8, buf=0x7f1ca41a4930, fd=8) at xcb_in.c:291
#3  _xcb_in_read_block (c=c@entry=0x7f1ca4191fb0, buf=<optimized out>, len=len@entry=8)
    at xcb_in.c:695
#4  0x0000003627209d93 in read_setup (c=0x7f1ca4191fb0) at xcb_conn.c:148
#5  xcb_connect_to_fd (fd=fd@entry=8, auth_info=auth_info@entry=0x7f1caac75200)
    at xcb_conn.c:297
#6  0x000000362720cd63 in xcb_connect_to_display_with_auth_info (
    displayname=displayname@entry=0x0, auth=auth@entry=0x0, screenp=screenp@entry=0x0)
    at xcb_util.c:463
#7  0x000000362720ce3a in xcb_connect (displayname=displayname@entry=0x0, 
    screenp=screenp@entry=0x0) at xcb_util.c:421
#8  0x0000003626e41dba in _XConnectXCB (dpy=dpy@entry=0x7f1ca41a8fc0, 
    display=display@entry=0x0, screenp=screenp@entry=0x7f1caac7534c) at xcb_disp.c:78
#9  0x0000003626e32c72 in XOpenDisplay (display=0x0) at OpenDis.c:129
#10 0x00007f1ca8b1c0ac in awt_init_Display ()
   from /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64/jre/lib/amd64/xawt/libmawt.so
#11 0x00007f1ca101304c in ?? ()
#12 0x00007f1cfffffffe in ?? ()
#13 0x00007f1caac75518 in ?? ()
#14 0x00000007f5ee4970 in ?? ()
#15 0x00007f1caac75578 in ?? ()
#16 0x00000007f5ee93c0 in ?? ()
#17 0x0000000000000000 in ?? ()

2. connection:
#0  0x0000003623aea9dd in poll () from /lib64/libc.so.6
#1  0x000000362720b99a in poll (__timeout=-1, __nfds=1, __fds=0x7fd32db8d940)
    at /usr/include/bits/poll2.h:46
#2  read_block (len=8, buf=0x7fd314001f70, fd=20) at xcb_in.c:291
#3  _xcb_in_read_block (c=c@entry=0x7fd314003f70, buf=<optimized out>, len=len@entry=8)
    at xcb_in.c:695
#4  0x0000003627209d93 in read_setup (c=0x7fd314003f70) at xcb_conn.c:148
#5  xcb_connect_to_fd (fd=fd@entry=20, auth_info=auth_info@entry=0x7fd32db8da70)
    at xcb_conn.c:297
#6  0x000000362720cd63 in xcb_connect_to_display_with_auth_info (
    displayname=displayname@entry=0x7fd314002a80 ":9", auth=auth@entry=0x0, 
    screenp=screenp@entry=0x0) at xcb_util.c:463
#7  0x000000362720ce3a in xcb_connect (displayname=displayname@entry=0x7fd314002a80 ":9", 
    screenp=screenp@entry=0x0) at xcb_util.c:421
#8  0x0000003626e41dba in _XConnectXCB (dpy=dpy@entry=0x7fd314002d20, 
    display=display@entry=0x7fd314002a80 ":9", screenp=screenp@entry=0x7fd32db8dbbc)
    at xcb_disp.c:78
#9  0x0000003626e32c72 in XOpenDisplay (display=0x7fd314002a80 ":9") at OpenDis.c:129
#10 0x0000003638a17b8d in atspi_get_a11y_bus () from /lib64/libatspi.so.0
#11 0x000000363760c434 in atk_bridge_adaptor_init () from /lib64/libatk-bridge-2.0.so.0
#12 0x00007fd32e5c899d in gnome_accessibility_module_init ()
   from /usr/lib64/gtk-2.0/modules/libatk-bridge.so
#13 0x00007fd32ea1ec21 in jaw_load_atk_bridge ()
   from /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64/jre/lib/amd64/libatk-wrapper.so
#14 0x00000036266492a6 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#15 0x0000003626649628 in g_main_context_iterate.isra.24 () from /lib64/libglib-2.0.so.0
#16 0x0000003626649a3a in g_main_loop_run () from /lib64/libglib-2.0.so.0
#17 0x00007fd32ea1dbb9 in jni_main_loop ()
   from /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64/jre/lib/amd64/libatk-wrapper.so
#18 0x000000362666ea45 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#19 0x0000003624607f33 in start_thread () from /lib64/libpthread.so.0
#20 0x0000003623af4ded in clone () from /lib64/libc.so.6

3. connection:
#0  0x0000003623aea9dd in poll () from /lib64/libc.so.6
#1  0x000000362720b99a in poll (__timeout=-1, __nfds=1, __fds=0x7fb94dad7940)
    at /usr/include/bits/poll2.h:46
#2  read_block (len=8, buf=0x7fb95c0024e0, fd=19) at xcb_in.c:291
#3  _xcb_in_read_block (c=c@entry=0x7fb95c003bf0, buf=<optimized out>, len=len@entry=8)
    at xcb_in.c:695
#4  0x0000003627209d93 in read_setup (c=0x7fb95c003bf0) at xcb_conn.c:148
#5  xcb_connect_to_fd (fd=fd@entry=19, auth_info=auth_info@entry=0x7fb94dad7a70)
    at xcb_conn.c:297
#6  0x000000362720cd63 in xcb_connect_to_display_with_auth_info (
    displayname=displayname@entry=0x7fb95c002700 ":9", auth=auth@entry=0x0, 
    screenp=screenp@entry=0x0) at xcb_util.c:463
#7  0x000000362720ce3a in xcb_connect (displayname=displayname@entry=0x7fb95c002700 ":9", 
    screenp=screenp@entry=0x0) at xcb_util.c:421
#8  0x0000003626e41dba in _XConnectXCB (dpy=dpy@entry=0x7fb95c0029a0, 
    display=display@entry=0x7fb95c002700 ":9", screenp=screenp@entry=0x7fb94dad7bbc)
    at xcb_disp.c:78
#9  0x0000003626e32c72 in XOpenDisplay (display=0x7fb95c002700 ":9") at OpenDis.c:129
#10 0x0000003638a17b8d in atspi_get_a11y_bus () from /lib64/libatspi.so.0
#11 0x000000363760c434 in atk_bridge_adaptor_init () from /lib64/libatk-bridge-2.0.so.0
#12 0x00007fb96821c99d in gnome_accessibility_module_init ()
   from /usr/lib64/gtk-2.0/modules/libatk-bridge.so
#13 0x00007fb968672c21 in jaw_load_atk_bridge ()
   from /usr/lib64/java-atk-wrapper/libatk-wrapper.so.0.0.18
#14 0x00000036266492a6 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#15 0x0000003626649628 in g_main_context_iterate.isra.24 () from /lib64/libglib-2.0.so.0
#16 0x0000003626649a3a in g_main_loop_run () from /lib64/libglib-2.0.so.0
#17 0x00007fb968671bb9 in jni_main_loop ()
   from /usr/lib64/java-atk-wrapper/libatk-wrapper.so.0.0.18
#18 0x000000362666ea45 in g_thread_proxy () from /lib64/libglib-2.0.so.0
#19 0x0000003624607f33 in start_thread () from /lib64/libpthread.so.0
#20 0x0000003623af4ded in clone () from /lib64/libc.so.6

4. connection:
#0  0x0000003623aea9dd in poll () from /lib64/libc.so.6
#1  0x000000362720b99a in poll (__timeout=-1, __nfds=1, __fds=0x7fb968219320)
    at /usr/include/bits/poll2.h:46
#2  read_block (len=8, buf=0x7fb94803bf60, fd=25) at xcb_in.c:291
#3  _xcb_in_read_block (c=c@entry=0x7fb948042ac0, buf=<optimized out>, len=len@entry=8)
    at xcb_in.c:695
#4  0x0000003627209d93 in read_setup (c=0x7fb948042ac0) at xcb_conn.c:148
#5  xcb_connect_to_fd (fd=fd@entry=25, auth_info=auth_info@entry=0x7fb968219450)
    at xcb_conn.c:297
#6  0x000000362720cd63 in xcb_connect_to_display_with_auth_info (
    displayname=displayname@entry=0x0, auth=auth@entry=0x0, screenp=screenp@entry=0x0)
    at xcb_util.c:463
#7  0x000000362720ce3a in xcb_connect (displayname=displayname@entry=0x0, 
    screenp=screenp@entry=0x0) at xcb_util.c:421
#8  0x0000003626e41dba in _XConnectXCB (dpy=dpy@entry=0x7fb94803cc00, 
    display=display@entry=0x0, screenp=screenp@entry=0x7fb96821959c) at xcb_disp.c:78
#9  0x0000003626e32c72 in XOpenDisplay (display=0x0) at OpenDis.c:129
#10 0x0000003061451239 in IA__gdk_display_open (display_name=<optimized out>)
    at gdkdisplay-x11.c:166
#11 0x000000306141f03d in IA__gdk_display_open_default_libgtk_only () at gdk.c:324
#12 0x0000003061945aa4 in IA__gtk_init_check (argc=<optimized out>, argv=<optimized out>)
    at gtkmain.c:995
#13 0x00007fb968b1e3c1 in gtk2_load ()
   from /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64/jre/lib/amd64/xawt/libmawt.so
#14 0x00007fb968b06c6b in Java_sun_awt_UNIXToolkit_load_1gtk ()
   from /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64/jre/lib/amd64/xawt/libmawt.so
#15 0x00007fb96101304c in ?? ()
#16 0x00007fb9682197f0 in ?? ()
#17 0x00000007f5e98a08 in ?? ()
#18 0x00007fb968219848 in ?? ()
#19 0x00000007f5ead128 in ?? ()
#20 0x0000000000000000 in ?? ()

The hang occurs in a thread like this:
#0  0x0000003623aea9dd in poll () from /lib64/libc.so.6
#1  0x0000003627209f72 in poll (__timeout=-1, __nfds=1, __fds=0x7f84481d4650)
    at /usr/include/bits/poll2.h:46
#2  _xcb_conn_wait (c=c@entry=0x7f844c390c30, cond=cond@entry=0x7f84481d46d0, 
    vector=vector@entry=0x0, count=count@entry=0x0) at xcb_conn.c:414
#3  0x000000362720b44f in wait_for_reply (c=c@entry=0x7f844c390c30, request=123, 
    e=e@entry=0x7f84481d4790) at xcb_in.c:399
#4  0x000000362720b562 in xcb_wait_for_reply (c=c@entry=0x7f844c390c30, request=123, 
    e=e@entry=0x7f84481d4790) at xcb_in.c:429
#5  0x0000003626e43017 in _XReply (dpy=dpy@entry=0x7f844c37e8a0, 
    rep=rep@entry=0x7f84481d4870, extra=extra@entry=0, discard=discard@entry=0)
    at xcb_io.c:602
#6  0x000000362d607049 in XRenderQueryFormats (dpy=dpy@entry=0x7f844c37e8a0) at Xrender.c:442
#7  0x000000362d60760f in XRenderQueryVersion (dpy=0x7f844c37e8a0, 
    major_versionp=0x7f84481d4920, minor_versionp=0x7f84481d4924) at Xrender.c:333
#8  0x000000362f60462b in _XcursorGetDisplayInfo () from /lib64/libXcursor.so.1
#9  0x000000362f604939 in XcursorGetTheme () from /lib64/libXcursor.so.1
#10 0x000000306145054f in IA__gdk_x11_display_set_cursor_theme (display=0x7f844c37e8a0, 
    theme=0x7f844c3b1250 "Adwaita", size=18) at gdkcursor-x11.c:648
#11 0x00000030619babbc in settings_update_cursor_theme (
    settings=settings@entry=0x7f844c219e80) at gtksettings.c:2256
#12 0x00000030619bbd78 in gtk_settings_notify (object=0x7f844c219e80, pspec=0x7f844c39c540)
    at gtksettings.c:1427
#13 0x0000003627e10298 in g_closure_invoke () from /lib64/libgobject-2.0.so.0
#14 0x0000003627e21b87 in signal_emit_unlocked_R () from /lib64/libgobject-2.0.so.0
#15 0x0000003627e2a0f2 in g_signal_emit_valist () from /lib64/libgobject-2.0.so.0
#16 0x0000003627e2a3af in g_signal_emit () from /lib64/libgobject-2.0.so.0
#17 0x0000003627e14945 in g_object_dispatch_properties_changed ()
   from /lib64/libgobject-2.0.so.0
#18 0x0000003627e17019 in g_object_notify () from /lib64/libgobject-2.0.so.0
#19 0x00000030619bc831 in apply_queued_setting (data=0x7f844c219e80, pspec=<optimized out>, 
    qvalue=0x7f844c3156d0) at gtksettings.c:1519
#20 0x000000306199a7cc in gtk_rc_parse_statement (scanner=0x7f844c3ad6f0, 
    context=0x7f844c3ae470) at gtkrc.c:2966
#21 gtk_rc_parse_any (context=context@entry=0x7f844c3ae470, 
    input_name=input_name@entry=0x7f844c37ba90 "/usr/share/gtk-2.0/gtkrc", 
    input_fd=input_fd@entry=26, input_string=input_string@entry=0x0) at gtkrc.c:2275
#22 0x000000306199bbb5 in gtk_rc_context_parse_one_file (
    context=context@entry=0x7f844c3ae470, 
    filename=filename@entry=0x7f844c37ba90 "/usr/share/gtk-2.0/gtkrc", 
    priority=priority@entry=12, reload=reload@entry=0) at gtkrc.c:1033
#23 0x000000306199bd6f in gtk_rc_context_parse_file (context=context@entry=0x7f844c3ae470, 
    filename=0x7f844c37ba90 "/usr/share/gtk-2.0/gtkrc", priority=priority@entry=12, 
    reload=reload@entry=0) at gtkrc.c:1099
#24 0x000000306199c60f in gtk_rc_parse_default_files (context=0x7f844c3ae470) at gtkrc.c:862
#25 IA__gtk_rc_reparse_all_for_settings (settings=settings@entry=0x7f844c219e80, 
    force_load=force_load@entry=1) at gtkrc.c:1809
#26 0x00000030619bbfa7 in IA__gtk_settings_get_for_screen (
    screen=screen@entry=0x7f844c39c9b0) at gtksettings.c:1254
#27 0x0000003061963201 in display_opened_cb (display_manager=<optimized out>, 
    display=0x7f844c39a030) at gtkmodules.c:498
#28 0x0000003627e1359b in g_cclosure_marshal_VOID__OBJECTv () from /lib64/libgobject-2.0.so.0
#29 0x0000003627e104c7 in _g_closure_invoke_va () from /lib64/libgobject-2.0.so.0
#30 0x0000003627e29749 in g_signal_emit_valist () from /lib64/libgobject-2.0.so.0
#31 0x0000003627e2a8f8 in g_signal_emit_by_name () from /lib64/libgobject-2.0.so.0
#32 0x000000306145173f in IA__gdk_display_open (display_name=<optimized out>)
    at gdkdisplay-x11.c:407
#33 0x000000306141f03d in IA__gdk_display_open_default_libgtk_only () at gdk.c:324
#34 0x0000003061945aa4 in IA__gtk_init_check (argc=<optimized out>, argv=<optimized out>)
    at gtkmain.c:995
#35 0x00007f8450d4e3c1 in gtk2_load ()
   from /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64/jre/lib/amd64/xawt/libmawt.so
#36 0x00007f8450d36c6b in Java_sun_awt_UNIXToolkit_load_1gtk ()
   from /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64/jre/lib/amd64/xawt/libmawt.so
#37 0x00007f844901304c in ?? ()
#38 0x00007f84481d57f0 in ?? ()
#39 0x00000007f5e98a08 in ?? ()
#40 0x00007f84481d5848 in ?? ()
#41 0x00000007f5ead128 in ?? ()
#42 0x0000000000000000 in ?? ()

xtrace show this:
003:<:0077:  8: XInputExtension-Request(131,3): OpenDevice device=0x0a
003:>:0077:40: Reply to OpenDevice: classes={class=button(0x01) event type base=0x45},{class=valuator(0x02) event type base=0x47},{class=feedback(0x03) event type base=0x00},{class=other(0x06) event type base=0x4c};
003:<:0078: 16: XFIXES-Request(137,2): SelectSelectionInput window=0x02e00001 selection=0x150("_NET_WM_CM_S0") eventMask=owner notify,destroy notify,client close notify
003:<:0079:  8: Request(23): GetSelectionOwner atom=0x150("_NET_WM_CM_S0")
003:>:0079:32: Reply to GetSelectionOwner: owner=0x0100000e
003:<:007a: 16: Request(98): QueryExtension name='RENDER'
003:>:007a:32: Reply to QueryExtension: present=true(0x01) major-opcode=138 first-event=0 first-error=140
003:<: Warning: Waiting for rest of package (yet got 8 of 16)!
003:<:007b: 16: Request(98): QueryExtension name='\212\000\003\000\000\000'
003:<: Warning: Waiting for rest of package (yet got 8 of 263720)!
003:>:007b:32: Reply to QueryExtension: present=false(0x00) major-opcode=0 first-event=0 first-error=0
003:<: Warning: Waiting for rest of package (yet got 24 of 263720)!

and the program waits here forever.

I guess some other thread is consuming the _XReply message in above scenario, but I'm not sure what the problem here.
Another oddity is the message "Waiting for rest of package (yet got 8 of 263720)!" but I'm no expert on X11 so I'm not sure what this means.

help greatly appreciated!

Comment 1 Thomas Meyer 2014-03-10 22:37:06 UTC
this happens reliable on my single core laptop (i915) system.
on my other quad core Fedora 20 (radeon) installation, this hang doesn't occur.

Comment 2 Omair Majid 2014-03-10 22:40:33 UTC
You wouldn't happen to have accessibility enabled on either one of those machines, would you?

Comment 3 Thomas Meyer 2014-03-10 22:45:26 UTC
where to check? I saw the atk (?) stuff in the stack traces?

Comment 4 Omair Majid 2014-03-10 22:48:16 UTC
Can you try your testcase with and without the java-1.7.0-openjdk-accessibility package?

Comment 5 Thomas Meyer 2014-03-10 22:55:08 UTC
Yes after removing this package gtk look and feel seems to work correctly now. Thanks.

Comment 6 Fedora End Of Life 2015-05-29 11:11:23 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 Fedora End Of Life 2015-06-29 19:20:40 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.