Analysis
========

Upon boot of a ppc64el system configured to authenticate as an LDAP
client, the boot process is interrupted with :

 /sbin/init: symbol lookup error: /lib/powerpc64le-linux-
gnu/libnss_ldap.so.2: undefined symbol: __libc_lock_lock

Apparently __libc_lock_lock is missing from the libnss_ldap.so library.

Looking at the symbols exported by the library on PPC64el we see :

 - For libnss_ldap : 
$ nm -D /lib/powerpc64le-linux-gnu/libnss_ldap.so.2 | grep _lock
                 U __libc_lock_lock
                 U __libc_lock_unlock

• For libc :
$ nm -D /lib/powerpc64le-linux-gnu/libc-2.19.so | grep _lock
000000000008f4a0 T _IO_list_lock
0000000000088a70 T _IO_peekc_locked
00000000001313b0 T pthread_mutex_lock

The same command on AMD64 returns :
 - For libnss_ldap:
# nm -D /lib/x86_64-linux-gnu/libnss_ldap.so.2 | grep lock
                 w __pthread_mutex_lock
                 w __pthread_mutex_unlock
• For libc : 
# nm -D /lib/x86_64-linux-gnu/libc-2.19.so | grep _lock
...
0000000000108270 T pthread_mutex_lock

So the symbol is _not_ exported by the libc on ppc64el even though
libnss_ldap is expecting to find it.

This lock is only used once in libnss_ldap :

static int
ltf_mutex_lock (void *mutexp)
{
#if defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
  return __libc_lock_lock (*(pthread_mutex_t *) mutexp);
#elif defined(HPUX)
  return __thread_mutex_lock ((pthread_mutex_t *) mutexp);
#else
# ifdef _AIX
  if (__multi_threaded == 0)
    return 0;
# endif
  return pthread_mutex_lock ((pthread_mutex_t *) mutexp);
#endif /* HAVE_LIBC_LOCK_H || HAVE_BITS_LIBC_LOCK_H */
}


So apparently, the HAVE_LIBC_LOCK_H symbol is defined on ppc64el, or at least 
appear to be even if the libc does not export that libc_lock_lock symbol.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libnss-ldap in Ubuntu.
https://bugs.launchpad.net/bugs/1387594

Title:
  init: symbol lookup error: /lib/powerpc64le-linux-
  gnu/libnss_ldap.so.2: undefined symbol: __libc_lock_lock

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libnss-ldap/+bug/1387594/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to