[Bug 1387594] Re: init: symbol lookup error: /lib/powerpc64le-linux-gnu/libnss_ldap.so.2: undefined symbol: __libc_lock_lock
Louis Bouchard
louis.bouchard at canonical.com
Thu Oct 30 10:14:25 UTC 2014
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
Foundations Bugs, 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
Status in “libnss-ldap” package in Ubuntu:
Confirmed
Status in “libnss-ldap” source package in Trusty:
New
Status in “libnss-ldap” source package in Utopic:
Confirmed
Bug description:
This bug is specific to the PPC64EL architecture. More details in the
analysis.
Many commands that require the use of libnss-ldap will fail with
Segmentation Fault. The boot procedure itself can be blocked with the
following message.
One potential workaround is to remove the use of ldap from the
/etc/nsswitch.conf file to at least provide a bootable system.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libnss-ldap/+bug/1387594/+subscriptions
More information about the foundations-bugs
mailing list