[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#360933: libc6: calling chroot breaks pthread_exit/pthread_cancel



Package: libc6
Version: 2.3.2.ds1-22
Severity: normal

When calling pthread_exit in a program which has called chroot, the
program exits with the error message

  libgcc_s.so.1 must be installed for pthread_cancel to work

The problem is that the nptl library needs the stack unwind code from
libgcc_s.so.1, and it uses dlopen to load this library.

I tried to install arlad, configured to use posix threads. This
program chroots to /usr/arla/cache at startup, before doing any
interesting thread operations.

Then the later dlopen by the nptl code naturally fails, and it
displays the above error message and calls _exit.

I'm not terribly familiar with the POSIX standard or with POSIX
threads, but it seems unintuitive and probably not standards compliant
that a threaded server program can't use chroot at startup.

A workaround seems to be to link the program with an explicit -lgcc_s
on the command line, in addition to -lpthread, but as far as I
understand, one should never need to link explicitly with libgcc_s.

Regards,
/Niels

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.16.1-nisse
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages libc6 depends on:
ii  libdb1-compat                 2.1.3-7    The Berkeley database routines [gl

-- no debconf information



Reply to: