Bug 437790
Summary: | LTC37141-Application is hung up during key event handling | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Alan Matsuoka <alanm> | ||||||||||
Component: | libX11 | Assignee: | Peter Hutterer <peter.hutterer> | ||||||||||
Status: | CLOSED ERRATA | QA Contact: | |||||||||||
Severity: | medium | Docs Contact: | |||||||||||
Priority: | medium | ||||||||||||
Version: | 5.1 | CC: | cmeadors, cward, eng-i18n-bugs, ktakemur, llim, peter.hutterer, petersen, phuang, rlerch, rousseau, sandmann, sghosh, syeghiay, tagoh, tao, xgl-maint | ||||||||||
Target Milestone: | rc | Keywords: | Patch | ||||||||||
Target Release: | --- | ||||||||||||
Hardware: | All | ||||||||||||
OS: | Linux | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||||
Doc Text: |
Cause: A possible race condition between a client and the input method server.
Consequence: Applications using input methods may hang and not accept keyboard input.
Fix: Increase the number of available atoms for temporary storage of IM data.
Result: The frequency of the bug is significantly reduced but the bug may still be triggered under some circumstances.
|
Story Points: | --- | ||||||||||
Clone Of: | |||||||||||||
: | 510658 (view as bug list) | Environment: | |||||||||||
Last Closed: | 2009-09-02 10:13: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: | 510658 | ||||||||||||
Bug Blocks: | |||||||||||||
Attachments: |
|
Description
Alan Matsuoka
2008-03-17 14:10:42 UTC
Created attachment 298267 [details]
file attachment from LTC:LTC37141.patch
Created attachment 298268 [details]
test program
Note that motif programs has to be compiled like this: gcc app.c -lXm -lXt rather than gcc app.c -lXt -lXm Otherwise they fail with protocol errors. (I don't know what underlying brain damage is causing this). MODIFIED libX11-1.0.3-11 is available in brew I tested using the patch but still the problem happens. Please find here bellows information about the test I had. I will attach the screen snapshot. To produce this bug, I change keyboard-properites by gnome-keyboard-properties. $ gnome-keyboard-properties Keyboard tab - Repeat Keys - Tick 'Key presses repeat when key is held down - Delay is set to Shortest position. - Speed psi set to Fastest position. It took approximately from 10 to 20 minutes to produce the bug. # cat /etc/redhat-release Red Hat Enterprise Linux Server release 5 (Tikanga) # uname -a Linux unused-12-193.bne.redhat.com 2.6.18-8.el5 #1 SMP Fri Jan 26 14:15:21 EST 2007 i686 athlon i386 GNU/Linux # rpm -qa | grep X11 libX11-1.0.3-11.el5 libX11-devel-1.0.3-11.el5 libX11-debuginfo-1.0.3-11.el5 The backtrace was from gdb. To get the backtrace, I used gcore to get coredump after compiling the program with -g option. $ gcc -g motiftextf2.c -lXm -lXt $ gcore 8334 $ gdb ./a.out core.8334 The executable(a.out) and coredump will be also attached. (gdb) bt #0 0x00486402 in __kernel_vsyscall () #1 0x4e02793b in poll () from /lib/libc.so.6 #2 0x0038aaa9 in _XWaitForReadable (dpy=0x8e7d2f8) at XlibInt.c:498 #3 0x0038ae8f in _XRead (dpy=0x8e7d2f8, data=0xbff970b8 "\b\004����\2168D", size=32) at XlibInt.c:1087 #4 0x0038c6cb in _XReadEvents (dpy=0x8e7d2f8) at XlibInt.c:1003 #5 0x0036e032 in XIfEvent (dpy=0x8e7d2f8, event=0xbff97984, predicate=0x3afe80 <_CheckCMEvent>, arg=0x8e95b48 "8�D") at IfEvent.c:70 #6 0x003b046e in _XimXRead (im=0x8e95b48, recv_buf=0xbff97b10 "", buf_len=2048, ret_len=0xbff97a58) at imTrX.c:447 #7 0x003b3297 in _XimReadData (im=0x8e95b48, len=0xbff97a9a, buf=0xbff97b10 "", buf_size=2048) at imTransR.c:154 #8 0x003b3663 in _XimRead (im=0x8e95b48, len=0xbff98c1a, buf=0xbff97b10 "", buf_size=2048, predicate=0x3ae200 <_XimSetICValuesCheck>, arg=0x8e97788 "`�D") at imTransR.c:231 #9 0x003af25d in _XimProtoSetICValues (xic=0x8e97788, arg=0x0) at imDefIc.c:759 #10 0x00397a05 in XSetICValues (ic=0x8e97788) at ICWrap.c:339 #11 0x4e7ed65f in ?? () from /usr/lib/libXm.so.4 #12 0x4e7ee436 in XmImSetFocusValues () from /usr/lib/libXm.so.4 #13 0x4e7ee7e4 in XmImVaSetFocusValues () from /usr/lib/libXm.so.4 #14 0x4e7cbde5 in ?? () from /usr/lib/libXm.so.4 #15 0x4e1c9421 in ?? () from /usr/lib/libXt.so.6 #16 0x4e1c97fa in ?? () from /usr/lib/libXt.so.6 #17 0x4e1c9df4 in _XtTranslateEvent () from /usr/lib/libXt.so.6 #18 0x4e1a1690 in XtDispatchEventToWidget () from /usr/lib/libXt.so.6 #19 0x4e1a1a91 in _XtSendFocusEvent () from /usr/lib/libXt.so.6 #20 0x4e1aa3fd in ?? () from /usr/lib/libXt.so.6 #21 0x4e1aa6e9 in XtSetKeyboardFocus () from /usr/lib/libXt.so.6 #22 0x4e7ddff4 in _XmMgrTraversal () from /usr/lib/libXm.so.4 #23 0x4e7de1d9 in XmProcessTraversal () from /usr/lib/libXm.so.4 #24 0x080486ec in keyEH (w=0x8ea3fd8, client_data=0x8ea1580, xev=0xbff99658) at motiftextf2.c:20 #25 0x4e1a1405 in XtDispatchEventToWidget () from /usr/lib/libXt.so.6 #26 0x4e1a1eaa in ?? () from /usr/lib/libXt.so.6 #27 0x4e1a0d17 in XtDispatchEvent () from /usr/lib/libXt.so.6 #28 0x4e1a0ecc in XtAppMainLoop () from /usr/lib/libXt.so.6 #29 0x0804888a in main (argc=1, argv=0xbff99864) at motiftextf2.c:49 Created attachment 343708 [details]
test program and core file
Created attachment 343709 [details]
Snapshot
It seems that this bug is caused by a race condition in the XIM protocol. An example of how this race condition can be triggered is described in Comment 19 or Bug 452849. https://bugzilla.redhat.com/show_bug.cgi?id=452849#c19 I guess similar issue may happened as Peter said. i.e. the client is waiting for any responses synchronously as well as the server. given that the above patch makes it harder to appear this issue, it may be likely dropping any events at the server side, which contains multiple events in one atom. I'm wondering if this happens with SCIM applied a patch from Bug #466657 then. Release note added. If any revisions are required, please set the "requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause: A possible race condition between a client and the input method server. Consequence: Applications using input methods may hang and not accept keyboard input. Fix: Increase the number of available atoms for temporary storage of IM data. Result: The frequency of the bug is significantly reduced but the bug may still be triggered under some circumstances. Please see the release notes added. MODIFIED Ready for QA again. ~~ Attention - RHEL 5.4 Beta Released! ~~ RHEL 5.4 Beta has been released! There should be a fix present in the Beta release that addresses this particular request. Please test and report back results here, at your earliest convenience. RHEL 5.4 General Availability release is just around the corner! If you encounter any issues while testing Beta, please describe the issues you have encountered and set the bug into NEED_INFO. If you encounter new issues, please clone this bug to open a new issue and request it be reviewed for inclusion in RHEL 5.4 or a later update, if it is not of urgent severity. Please do not flip the bug status to VERIFIED. Only post your verification results, and if available, update Verified field with the appropriate value. Questions can be posted to this bug or your customer or partner representative. Verified the bug(Ensured the problem does not occur during a couple of hours operation). Red Hat Enterprise Linux Server release 5.4 (Tikanga) Linux 2.6.18-159.el5PAE #1 SMP Mon Jul 20 18:31:07 EDT 2009 i686 i686 i386 GNU/Linux An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2009-1332.html |