Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 569257

Summary: openjdk swing's JPasswordField locked up when I using SCIM
Product: Red Hat Enterprise Linux 5 Reporter: Kazuo Moriwaka <kmoriwak>
Component: java-1.6.0-openjdkAssignee: Omair Majid <omajid>
Status: CLOSED WONTFIX QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: medium Docs Contact:
Priority: low    
Version: 5.4CC: dbhole, john.haxby
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-21 20:54:49 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:
Attachments:
Description Flags
Test Program none

Description Kazuo Moriwaka 2010-03-01 02:57:39 UTC
Description of problem:

Red Hat Directory Server's Administration Console's 
password field locked up when SCIM is enabled.


Version-Release number of selected component (if applicable):

I checked RHEL5.3 and RHEL5.4. x86 32bit 

How reproducible:

Always.

Steps to Reproduce:
1. Install RHEL5.4, RHDS 8.1, scim-anthy, 
2. Setup RHDS8.1, start 'redhat-idm-console'
3. Enter some text as UID.
4. Set focus password field, type some key. 

Actual results:

Nothing happen on password field, and Tab doesn't work for move focus.  Copy&paste by mouse middle button works.

Expected results:

As usual, password input works.

Additional info:

See this sun Java swing problem.
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6506617

Comment 1 man lung wong 2010-03-29 21:25:16 UTC
I tried to reproduce this bug on both rhel5.4 and 5.3 i386 machines, but I cannot reproduce it (i.e. I have everything set up as you mentioned above but the problem does not occur for me). 

Is the problem still occurring for you (even though it has only been a month since it was reported, but maybe there was an update that fixed it)?

Thanks,
Man Lung Wong

Comment 2 Kazuo Moriwaka 2010-03-30 04:17:42 UTC
Oh, I forgot enabling scim at reploducer.
Please add follwoing step:

1.1. install im-chooser 
1.2. execute "im-chooser". Select SCIM and re-login.

Thanks,
Kazuo Moriwaka

Comment 3 man lung wong 2010-03-30 14:49:39 UTC
Those step did not seem to have help. And from your reply it seems the problem still exists (am I correct).

Thanks,
Man Lung Wong

Comment 4 man lung wong 2010-03-30 15:51:42 UTC
Okay, I seem to be able to reproduce this problem. I was trying to reproduce it through VNC before, which I guess is the reason why the problem does not occur.

Man Lung Wong

Comment 5 Kazuo Moriwaka 2010-03-31 01:57:00 UTC
Thank you for your effort.  I see same problem at latest packages.

Comment 6 man lung wong 2010-04-01 21:38:43 UTC
If you are not using the deadkeys, then you can use the following workaround for now:

1.) Open ~/.scim/config with your favorite editor.
2.) Edit the line that reads "/FrontEnd/X11/Dynamic = blah", the blah should be 
    change to true, if it was false (which it should be if you never touched it).
3.) Logout and Login. Scim will still be enabled and working (except for the 
    deadkeys) and the keyboard lock up should not happen.

I tested it out on my RHEL5.4 system and the workaround works fine.

In case you are wondering where the workaround came from... here is the link https://bugs.launchpad.net/ubuntu/+source/scim/+bug/66104

The above bug, from what I understand is related to this bug, meaning this would be related to xorg and not openjdk. However, I still need to look into it more before I reassign it.

Thanks for your patient,
Man Lung Wong

Comment 7 Kazuo Moriwaka 2010-04-05 10:51:38 UTC
This workaround works well. 

Thank you!

For your info, I've noticed that RHDS8.1 with java-1.4.2-gcj-compat-1.4.2.0-40jpp.115 works without this workaround. I don't check other all functions.  RHDS isn't supported with gcj.

Best Regards,

Comment 8 man lung wong 2010-04-06 15:26:56 UTC
What do you mean by RHSD8.1 with java-1.4.2-gcj-compat-1.4.2.0-40jpp.115, because I have both installed. Sorry if it is something obvious.

Thanks for the info,
Man Lung Wong

Comment 9 Kazuo Moriwaka 2010-04-07 04:59:49 UTC
RHEL can choose 'java' command's backends by alternative.  /etc/alternative/java links to openjdk's 'java' or gcj's 'java'.
What I wanted to say by "RHDS 8.1 with java-1.4.2-gcj" is gcj's java is linked from /etc/alternative/java. 

redhat-idm-console script choose JVM by 'which java' is setuped by /etc/alternative/java link.


redhat-idm-console works with following set:
Set A:
- java-1.4.2-gcj-compat's JVM 
- SCIM enabled 
- "/FrontEnd/X11/Dynamic = false" config 

Set B:
- java-1.6.0-openjdk's JVM 
- SCIM enabled 
- "/FrontEnd/X11/Dynamic = true" config 

redhat-idm-console doesn't work with following set:
Set C:
- java-1.6.0-openjdk's JVM 
- SCIM enabled 
- "/FrontEnd/X11/Dynamic = false" config 

I feel that this situation imply something in OpenJDK has problem with X treatment.

Thank you,

Comment 10 man lung wong 2010-04-08 15:42:29 UTC
Can you post what you get with "ls -la /etc/alternative/java" and "ls -la "/etc/alternative/javac"?

Thanks,
Man Lung Wong

Comment 11 man lung wong 2010-04-09 14:10:11 UTC
When you link to gcj instead of openjdk?

Thanks,
Man Lung Wong

Comment 12 Kazuo Moriwaka 2010-04-12 02:07:14 UTC
When I link /etc/alternatives/java to /usr/lib/jvm/jre-1.6.0-openjdk/bin/java, this problem appear. 
When I link /etc/alternatives/java to /usr/lib/jvm/jre-1.4.2-gcj/bin/java, this problem doesn't appear.

Thanks,

Comment 13 man lung wong 2010-04-12 15:03:54 UTC
I was actually more curious at what javac is linked to because my /usr/lib/jvm/jre-1.4.2-gcj folder do not have javac.

Man Lung Wong

Comment 14 man lung wong 2010-04-12 18:12:58 UTC
Whoops... I meant the java-1.4.2-gcj folder.

Man Lung Wong

Comment 15 Kazuo Moriwaka 2010-04-13 02:10:30 UTC
I'm sorry I didn't make clear about javac. 

When I tried with java-1.4.2-gcj package, I didn't installed openjdk package, so any javac isn't installed.   And RHDS's admin console doesn't call javac. 

Thank you,

Comment 16 man lung wong 2010-04-13 15:00:09 UTC
That should not be possible because redhat-ds depends on openjdk. And I have tried redhat-idm-console with gcj installed and java set up as you mentioned above, without javac, however it still gives me:

Exception in thread "main" java.lang.ClassFormatError: com.netscape.management.client.console.Console (unrecognized class file version)
   at java.lang.VMClassLoader.defineClass(libgcj.so.7rh)
   at java.lang.ClassLoader.defineClass(libgcj.so.7rh)
   at java.security.SecureClassLoader.defineClass(libgcj.so.7rh)
   at java.net.URLClassLoader.findClass(libgcj.so.7rh)
   at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.7rh)
   at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
   at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
   at gnu.java.lang.MainThread.run(libgcj.so.7rh)

So can you give me the exact steps as to how you got it to work with gcj.

FYI: I tested with oracle's java and that has the same problem (i.e. password field lock up with scim enabled).

Thanks,
Man Lung Wong

Comment 17 Kazuo Moriwaka 2010-04-16 09:50:21 UTC
I found my test environment has RHDS 8.0.  
I'm sorry very much for I've confused you.
And I checked RHDS8.1's idm-console-framework package has dependency for java 1.6.0.

Comment 18 man lung wong 2010-04-19 16:07:47 UTC
So does that mean you can't run RHDS 8.1 with gcj?

Thanks,
Man Lung Wong

Comment 20 john.haxby@oracle.com 2010-10-19 13:49:42 UTC
This problem isn't specific to openjdk -- I get it with both jrockit and sun jdk as well.  I have a tiny java program that I can use to demonstrate the problem.

Comment 21 Omair Majid 2010-10-19 16:23:16 UTC
(In reply to comment #20)
> This problem isn't specific to openjdk -- I get it with both jrockit and sun
> jdk as well.  I have a tiny java program that I can use to demonstrate the
> problem.

Could please attach the reproducer? Thanks.

Comment 22 john.haxby@oracle.com 2010-10-20 13:30:59 UTC
Created attachment 454572 [details]
Test Program

javac PasswdTest.java
tar cfe test.tar PasswdTest PasswdTest*.class
java -jar test.jar

You don't need to wrap the test program up in a jar, I did it because it's just one file to copy around between machines.

With scim running (and without "/FrontEnd/X11/Dynamic = true" in ~/.scim/config) you'll find that you can merrily type in the text field, but nothing happens when you try to type in the passwd field.

If you click on "Show Values" then you'll see there was nothing in the passwd field (as expected) but now, interesting, when you dismiss that dialog you can type in the passwd field.

Running "kill $(pgrep scim)" gets rid of the scim processes (obviously) and the program works again.

The problem confused me for ages: you do need scim running and if you're in any environment where it's not present (eg ssh -X -Y localhost) then the program works.

Comment 23 john.haxby@oracle.com 2010-10-27 09:27:48 UTC
Interestingly, I can only reproduce the problem in a Xen guest and it shows up on both the console and a VNC server running in the guest.  The same VNC server running in a bare-metal installation doesn't show the same problem, at least not for me.   I'm beginning to think that this is something that scim is doing based on what it thinks is its environment.

Comment 24 Omair Majid 2010-10-27 13:25:13 UTC
(In reply to comment #23)
> Interestingly, I can only reproduce the problem in a Xen guest and it shows up
> on both the console and a VNC server running in the guest.  The same VNC server
> running in a bare-metal installation doesn't show the same problem, at least
> not for me.   I'm beginning to think that this is something that scim is doing
> based on what it thinks is its environment.

I think so too. Using fedora, I can reproduce the problem using scim, but not using ibus.