Pivotal Knowledge Base

Follow

Namenode might crash because of JNI based mappings

Environment

  • PHD 2.x
  • PHD 3.x

Symptom

Namenode might crash with the following stack trace when jni based unix group mappings is enabled

# Problematic frame:
# C  [libnss_uxauth.so.2+0x4e2a0]  sqlite3ExprCodeTarget+0xcc3
.
.
Stack: [0x00007f5e146ad000,0x00007f5e147ae000],  sp=0x00007f5e147aa440,  free space=1013k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libnss_uxauth.so.2+0x4e2a0]  sqlite3ExprCodeTarget+0xcc3
C  [libnss_uxauth.so.2+0x4e9dc]  sqlite3ExprCodeExprList+0x5a
C  [libnss_uxauth.so.2+0x4de31]  sqlite3ExprCodeTarget+0x854
C  [libnss_uxauth.so.2+0x4e5d1]  sqlite3ExprCodeTemp+0x30
C  [libnss_uxauth.so.2+0x4eefc]  sqlite3ExprIfTrue+0x33f
C  [libnss_uxauth.so.2+0x4f077]  sqlite3ExprIfFalse+0x13d
C  [libnss_uxauth.so.2+0x7c6e9]  codeOneLoopStart+0x161d
C  [libnss_uxauth.so.2+0x7d663]  sqlite3WhereBegin+0xd67
C  [libnss_uxauth.so.2+0x6ecc6]  sqlite3Select+0x858
C  [libnss_uxauth.so.2+0x7ea58]  yy_reduce+0x86f
C  [libnss_uxauth.so.2+0x80f7c]  sqlite3Parser+0xc8
C  [libnss_uxauth.so.2+0x81d0d]  sqlite3RunParser+0x28b
C  [libnss_uxauth.so.2+0x677d2]  sqlite3Prepare+0x206
C  [libnss_uxauth.so.2+0x67ab1]  sqlite3LockAndPrepare+0x84
C  [libnss_uxauth.so.2+0x67c53]  sqlite3_prepare_v2+0x4d
C  [libnss_uxauth.so.2+0xad31]  init_usergroups+0x182
C  [libnss_uxauth.so.2+0x914c]  uxauth_initgroups+0x69
C  [libnss_uxauth.so.2+0xc9a0]  _nss_uxauth_initgroups_dyn+0x88
C  [libc.so.6+0xa979f]  __tls_get_addr@@GLIBC_2.3+0xa979f

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  org.apache.hadoop.security.JniBasedUnixGroupsMapping.getGroupsForUser(Ljava/lang/String;)[Ljava/lang/String;+0
j  org.apache.hadoop.security.JniBasedUnixGroupsMapping.getGroups(Ljava/lang/String;)Ljava/util/List;+6

Cause

Here are some known issues with jni based mappings which are all fixed in apache release 2.4.1 and above

Workaround

Change from JNI based mappings to shell based mapping by changing this param in core-site.xml on namenode server

<property>

  <name>hadoop.security.group.mapping</name>

  <value>org.apache.hadoop.security.ShellBasedUnixGroupsMapping</value>

</property>

fix

This will be fixed in a later version of PHD 3.x code. Please make sure to check the release notes to confirm if the version of PHD you have is based off of Apache 2.4.1 or higher

Comments

Powered by Zendesk