[Bug 40285] Re: libgcc_s.so.1 must be installed for pthread_cancel to work
Juergen Perlinger
juergen.perlinger at t-online.de
Sun Oct 20 21:54:58 UTC 2013
I was probably wrong -- it seems this is not related to running as
restricted user per se.
Using ldd shows no reference to libgcc_s in the binary, even if I build
from source and explicitly add '-lgcc_s' to the linker command line.
strace shows no signs of using libgcc_s unless put into the preload
environment. And ntpd always comes to a grinding halt when not run as
root unless the preload environment is used. Running as root does not
crash just by lucky chance, I think.
I get the same results with gcc-4.7 and gcc-4.8 on a freshly installed
x64/amd64 Saucy.
As a workaround, I put libgcc_s.so.1 into /etc/ld.so.preload, since this
should help most applications that run into this problem. Though this
only cures the symptom: It's still not clear WHY there is no reference
to the SO in the binary... Could there be some toolchain trouble?
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-4.4 in Ubuntu.
https://bugs.launchpad.net/bugs/40285
Title:
libgcc_s.so.1 must be installed for pthread_cancel to work
Status in “gcc-3.3” package in Ubuntu:
Fix Released
Status in “gcc-4.4” package in Ubuntu:
Confirmed
Status in “gcc-4.6” package in Ubuntu:
Confirmed
Status in “pound” package in Ubuntu:
Invalid
Bug description:
the error:
libgcc_s.so.1 must be installed for pthread_cancel to work
is printed by applications using pthreads and calling:
set the thread to check or cancel:
thread_setcancelstate (PTHREAD_CANCEL_ENABLE, NULL);
pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, NULL);
and then in a tight loop try to lock a mutex and call test cancel like:
while (pthread_mutex_trylock (&progress_lock) ==
EBUSY)
pthread_testcancel ();
if the thread is exited because the parent thread sent a pthread_exit
(NULL); for instance, you will see that error.
gcc thinks that this file is in:
$> gcc --print-file-name=libgcc_s.so.1
/lib/../lib/libgcc_s.so.1
and not /lib/libgcc_s.so.1. though the path should really point to the
same file in the end.
This error is fixed by adding /lib to /etc/ld.so.conf and running
ldconfig
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-3.3/+bug/40285/+subscriptions
More information about the foundations-bugs
mailing list