JDK-6972329 : user.home has value of "?" when using JDK 1.6 32 bit on a 64 bit Linux RedHat
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 6u10,6u21
  • Priority: P3
  • Status: Closed
  • Resolution: Not an Issue
  • OS: linux,solaris_8
  • CPU: x86
  • Submitted: 2010-07-27
  • Updated: 2010-09-25
  • Resolved: 2010-08-15
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
Java HotSpot(TM) Server VM (build 17.0-b16, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Linux dev02.terracotta.lan 2.6.9-78.0.13.ELsmp #1 SMP Wed Jan 7 17:45:52 EST 2009 x86_64 x86_64 x86_64 GNU/Linux

EXTRA RELEVANT SYSTEM CONFIGURATION :
see attachment (strace.txt)


A DESCRIPTION OF THE PROBLEM :
If I use JDK 6u21 32 bit, the user.home, user.name values are "?"

If I use the 64 bit version, it works correctly.

Also, I can only reproduce this behavior if I use a network account. Everything works fine with a local account, even with 32bit JDK

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
[hhuynh@dev02:~]$ /shares/terra/jdk/linux/hotspot1.6.0_21/bin/java -cp /shares/terra/tmp ShowSystemProps | grep "user"

user.country=US
user.dir=/home/hhuynh
user.home=?
user.timezone=
user.name=?
user.language=en

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Works fine  with 6u21 64 bit on the same machine

[hhuynh@dev02:~]$ /shares/terra/jdk/linux/hotspot1.6.0_21_x64/bin/java -cp /shares/terra/tmp ShowSystemProps | grep "user"
user.country=US
user.dir=/home/hhuynh
user.home=/export2/homes/hhuynh
user.timezone=
user.name=hhuynh
user.language=en
ACTUAL -
[hhuynh@dev02:~]$ /shares/terra/jdk/linux/hotspot1.6.0_21/bin/java -cp /shares/terra/tmp ShowSystemProps | grep "user"
user.country=US
user.dir=/home/hhuynh
user.home=?
user.timezone=
user.name=?
user.language=en

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
ShowSystemProps.java

import java.util.*;

public class ShowSystemProps {

    public static void main(String[] args) {
      Properties props = System.getProperties();
      props.list(System.out);
    }
}
---------- END SOURCE ----------

Comments
EVALUATION There hasn't been any update from the submitter in two weeks so I'm closing this bug. If there is any new information, and it suggests a JDK bug, then please re-open this bug.
15-08-2010

EVALUATION I think we need more information to diagnose this. I looked at the attached strace and it looks like the system is configued "passwd: files ldap". The user is not found in the passwd file so it falls back to LDAP but it looks like the 32-bit libnss_ldap is not installed. Is it possible that the system has the 64-bit libnss_ldap installed and not the 32-bit?
27-07-2010