strace on compiz while the lockscreen is active shows the following system call being repeated:
futex(0xb32f7a9c, FUTEX_WAIT, -2147483648, {2948397076, 2}) = -1 EINVAL (Invalid argument)
Here is a backtrace of the affected thread in compiz when it is in that syscall:
#0 0xb7795be8 in __kernel_vsyscall ()
#1 0xb74485a7 in syscall () at ../sysdeps/unix/sysv/linux/i386/syscall.S:29
#2 0xb75d8336 in std::__atomic_futex_unsigned_base::_M_futex_wait_until (this=0xb32f7a9c, __addr=0xb32f7a9c, __val=2147483648, __has_timeout=false, __s=...,
__ns=...) at ../../../../../src/libstdc++-v3/src/c++11/futex.cc:55
#3 0xafa5c04f in std::__atomic_futex_unsigned<2147483648u>::_M_load_and_test_until (__ns=..., __s=..., __has_timeout=<optimized out>, __mo=<optimized out>,
__equal=<optimized out>, __operand=<optimized out>, __assumed=<optimized out>, this=<optimized out>) at /usr/include/c++/5/bits/atomic_futex.h:104
#4 std::__atomic_futex_unsigned<2147483648u>::_M_load_and_test (__mo=<optimized out>, __equal=<optimized out>, __operand=<optimized out>,
__assumed=<optimized out>, this=<optimized out>) at /usr/include/c++/5/bits/atomic_futex.h:122
#5 std::__atomic_futex_unsigned<2147483648u>::_M_load_when_equal (__mo=std::memory_order_acquire, __val=1, this=0xb32f7a9c)
at /usr/include/c++/5/bits/atomic_futex.h:162
#6 std::__future_base::_State_baseV2::wait (this=0xb32f7a94) at /usr/include/c++/5/future:322
#7 std::__basic_future<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::_M_get_result (this=<synthetic pointer>)
at /usr/include/c++/5/future:681
#8 std::future<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::get (this=<synthetic pointer>)
at /usr/include/c++/5/future:760
#9 unity::lockscreen::UserAuthenticatorPam::ConversationFunction (num_msg=1, msg=0xa7dba0a8, resp=0xa7dba0a4, appdata_ptr=0xa3c4174)
at /build/unity-G7ZJ7L/unity-7.3.2+15.10.20151016/lockscreen/UserAuthenticatorPam.cpp:151
#10 0xae996243 in pam_vprompt () from /lib/i386-linux-gnu/libpam.so.0
#11 0xae99640c in pam_prompt () from /lib/i386-linux-gnu/libpam.so.0
#12 0xabd24a7e in ?? () from /lib/i386-linux-gnu/security/pam_unix.so
#13 0xabd22093 in pam_sm_authenticate () from /lib/i386-linux-gnu/security/pam_unix.so
#14 0xae991450 in ?? () from /lib/i386-linux-gnu/libpam.so.0
#15 0xae990c7a in pam_authenticate () from /lib/i386-linux-gnu/libpam.so.0
#16 0xafa5a992 in unity::lockscreen::UserAuthenticatorPam::<lambda(GTask*, gpointer, gpointer, GCancellable*)>::operator() (__closure=0x0, task=0x96c56d0,
data=0xa3c4174) at /build/unity-G7ZJ7L/unity-7.3.2+15.10.20151016/lockscreen/UserAuthenticatorPam.cpp:55
#17 unity::lockscreen::UserAuthenticatorPam::<lambda(GTask*, gpointer, gpointer, GCancellable*)>::_FUN(GTask *, gpointer, gpointer, GCancellable *) ()
at /build/unity-G7ZJ7L/unity-7.3.2+15.10.20151016/lockscreen/UserAuthenticatorPam.cpp:62
#18 0xb461ec98 in ?? () from /usr/lib/i386-linux-gnu/libgio-2.0.so.0
#19 0xb708c864 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#20 0xb708be0a in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#21 0xb6ff51aa in start_thread (arg=0xa7dbab40) at pthread_create.c:333
#22 0xb744cfde in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:122
The PAM user authenticator in the unity lockscreen busy waits because of a bug in std::future in libstdc++6.
The libstdc++ bug is decribed here, including a patch for fixing it: /gcc.gnu. org/bugzilla/ show_bug. cgi?id= 68921
https:/
(GCC Bugzilla – Bug 68921 [5/6 Regression] std::future::wait() makes invalid futex calls and spins)
strace on compiz while the lockscreen is active shows the following system call being repeated:
futex(0xb32f7a9c, FUTEX_WAIT, -2147483648, {2948397076, 2}) = -1 EINVAL (Invalid argument)
Here is a backtrace of the affected thread in compiz when it is in that syscall: unix/sysv/ linux/i386/ syscall. S:29 atomic_ futex_unsigned_ base::_ M_futex_ wait_until (this=0xb32f7a9c, __addr=0xb32f7a9c, __val=2147483648, __has_timeout= false, __s=..., ./../.. /src/libstdc+ +-v3/src/ c++11/futex. cc:55 atomic_ futex_unsigned< 2147483648u> ::_M_load_ and_test_ until (__ns=..., __s=..., __has_timeout= <optimized out>, __mo=<optimized out>, <optimized out>, __operand= <optimized out>, __assumed= <optimized out>, this=<optimized out>) at /usr/include/ c++/5/bits/ atomic_ futex.h: 104 atomic_ futex_unsigned< 2147483648u> ::_M_load_ and_test (__mo=<optimized out>, __equal=<optimized out>, __operand= <optimized out>, <optimized out>, this=<optimized out>) at /usr/include/ c++/5/bits/ atomic_ futex.h: 122 atomic_ futex_unsigned< 2147483648u> ::_M_load_ when_equal (__mo=std: :memory_ order_acquire, __val=1, this=0xb32f7a9c) c++/5/bits/ atomic_ futex.h: 162 future_ base::_ State_baseV2: :wait (this=0xb32f7a94) at /usr/include/ c++/5/future: 322 basic_future< std::__ cxx11:: basic_string< char, std::char_ traits< char>, std::allocator< char> > >::_M_get_result (this=<synthetic pointer>) c++/5/future: 681 std::__ cxx11:: basic_string< char, std::char_ traits< char>, std::allocator< char> > >::get (this=<synthetic pointer>) c++/5/future: 760 lockscreen: :UserAuthentica torPam: :ConversationFu nction (num_msg=1, msg=0xa7dba0a8, resp=0xa7dba0a4, appdata_ ptr=0xa3c4174) unity-G7ZJ7L/ unity-7. 3.2+15. 10.20151016/ lockscreen/ UserAuthenticat orPam.cpp: 151 linux-gnu/ libpam. so.0 linux-gnu/ libpam. so.0 linux-gnu/ security/ pam_unix. so linux-gnu/ security/ pam_unix. so linux-gnu/ libpam. so.0 linux-gnu/ libpam. so.0 lockscreen: :UserAuthentica torPam: :<lambda( GTask*, gpointer, gpointer, GCancellable* )>::operator( ) (__closure=0x0, task=0x96c56d0, unity-G7ZJ7L/ unity-7. 3.2+15. 10.20151016/ lockscreen/ UserAuthenticat orPam.cpp: 55 lockscreen: :UserAuthentica torPam: :<lambda( GTask*, gpointer, gpointer, GCancellable* )>::_FUN( GTask *, gpointer, gpointer, GCancellable *) () unity-G7ZJ7L/ unity-7. 3.2+15. 10.20151016/ lockscreen/ UserAuthenticat orPam.cpp: 62 i386-linux- gnu/libgio- 2.0.so. 0 linux-gnu/ libglib- 2.0.so. 0 linux-gnu/ libglib- 2.0.so. 0 create. c:333 unix/sysv/ linux/i386/ clone.S: 122
#0 0xb7795be8 in __kernel_vsyscall ()
#1 0xb74485a7 in syscall () at ../sysdeps/
#2 0xb75d8336 in std::__
__ns=...) at ../../.
#3 0xafa5c04f in std::__
__equal=
#4 std::__
__assumed=
#5 std::__
at /usr/include/
#6 std::__
#7 std::__
at /usr/include/
#8 std::future<
at /usr/include/
#9 unity::
at /build/
#10 0xae996243 in pam_vprompt () from /lib/i386-
#11 0xae99640c in pam_prompt () from /lib/i386-
#12 0xabd24a7e in ?? () from /lib/i386-
#13 0xabd22093 in pam_sm_authenticate () from /lib/i386-
#14 0xae991450 in ?? () from /lib/i386-
#15 0xae990c7a in pam_authenticate () from /lib/i386-
#16 0xafa5a992 in unity::
data=0xa3c4174) at /build/
#17 unity::
at /build/
#18 0xb461ec98 in ?? () from /usr/lib/
#19 0xb708c864 in ?? () from /lib/i386-
#20 0xb708be0a in ?? () from /lib/i386-
#21 0xb6ff51aa in start_thread (arg=0xa7dbab40) at pthread_
#22 0xb744cfde in clone () at ../sysdeps/