Bug 104689
Summary: | Crash in ld-linux.so test IBM Tivoli Access Manager WebSEAL | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 3 | Reporter: | Matt Rodkey <mrodkey> |
Component: | glibc | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED NOTABUG | QA Contact: | Brian Brock <bbrock> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 3.0 | CC: | bugproxy, tfinucan |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2003-09-26 17:19:30 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Matt Rodkey
2003-09-19 05:14:38 UTC
This is not a crash in ld-linux.so, it is std::terminate() aborting (the normal std::terminate() behaviour). From the backtrace, most likely because a thread was cancelled while it was PTHREAD_CANCEL_ENABLE and PTHREAD_CANCEL_ASYNCHRONOUS in some routine which was not expected to throw exceptions. That would most likely point to an application bug. As workaround, you can force Linuxthreads, which never use exceptions for cancellation (which means that destructors and cleanups are not run when cancelling a thread). Thanks for your quick feedback. Some additional information not available at the time the bug was opened: Sure enough, the SIG32 signal (or SIGABORT) comes some short time following calls to pthread_cancel(). When the thread leading to the SIGABORT is created, here are the attribute settings: LINUX_THREAD_STACK_SIZE = (256*1024) pthread_attr_t thread_attr; pthread_attr_init(&thread_attr); pthread_attr_setstacksize(&thread_attr, LINUX_THREAD_STACK_SIZE); rc = pthread_create(tp, &thread_attr, func, arg); We never call pthread_setcanceltype(). The default cancel type should be PTHREAD_CANCEL_DEFERRED. This is a blocking bug for the Tivoli Access Manager WebSEAL Team From Jakub: "As workaround, you can force Linuxthreads, which never use exceptions for cancellation (which means that destructors and cleanups are not run when cancelling a thread)." How would we do this? Link options? Thanks, Matt using LD_ASSUME_KERNEL=2.4.0 makes this problem go away. Looks like it is a problem in the NPTL FYI this does not happen on RH9 which also uses NTPL just RHEL 3 A thread can be PTHREAD_CANCEL_ASYNCHRONOUS either because you set it so using pthread_setcanceltype, or temporarily when executing a cancellable system call. All functions which call cancellable glibc functions (those without throw() on their prototype (maybe with the exception of functions which are without throw() just because they call user defined callbacks which might throw exceptions) must either allow exceptions (ie. avoid throw()) or must be compiled without exceptions (-fno-exceptions (the default for C code, unlike C++)). This is necessary so that thread cancellation can DTRT with C++ destructors and is new to post RHL9 NPTL. If it is too hard to change your application to this, you can either put small C wrappers around cancellable glibc functions (or C++ compiled without -fexceptions), in which way you'll get the old linuxthreads behaviour where during pthread_cancel no destructors are run for objects created in the thread, or use linuxthreads (LD_ASSUME_KERNEL=2.4.19 gives you faster linuxthreads implementation than 2.4.0). Is this explanation acceptable? We are happy with the LD_ASSUME_KERNEL solution, Closing this bug. |