multi-threading problems using libcurl on Solaris 10 - solaris
This is a discussion on multi-threading problems using libcurl on Solaris 10 - solaris ; Hi, Solaris gurus. I ran into a problem of incorrect multi-threading performance with libCURL. Here's an exceprt of the code: //////////////////////////////////////// // DEBUG only (getting desperate) //////////////////////////////////// curbrp->GetSCV()->Lock(); curbrp->GetSCV()->Unlock(); //////////////////////////////////////// CURLcode rv = curl_easy_perform(m_curlH); //////////////////////////////////////// // DEBUG only (getting desperate) ...
![]() |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| |||
| |||
| //////////////////////////////////////// // DEBUG only (getting desperate) //////////////////////////////////// curbrp->GetSCV()->Lock(); curbrp->GetSCV()->Unlock(); //////////////////////////////////////// CURLcode rv = curl_easy_perform(m_curlH); //////////////////////////////////////// // DEBUG only (getting desperate) - blows up after // curl_easy_perform(m_curlH), if the SCV is created // as a thread-specific data. Fine if SCV is on the stack //////////////////////////////////// curbrp->GetSCV()->Lock(); curbrp->GetSCV()->Unlock(); //////////////////////////////////////// The comments say it all; SCV is short for StatefulCondVar - a simple wrapper around a pthread condition variable, which keeps state of the application. The stack trace after SIGABRT looks like this: #0 0xfffffd7ffee142ea in _lwp_kill () from /usr/lib/64/libc.so.1 #1 0xfffffd7ffedff772 in Abort () from /usr/lib/64/libc.so.1 #2 0xfffffd7ffedff878 in thr_panic () from /usr/lib/64/libc.so.1 #3 0xfffffd7ffee07fbf in _ceil_prio_inherit () from /usr/lib/64/libc.so.1 #4 0xfffffd7ffee09a27 in mutex_lock_internal () from /usr/lib/64/libc.so.1 #5 0xfffffd7ffee09f2e in mutex_lock_impl () from /usr/lib/64/libc.so.1 #6 0xfffffd7ffee09fcb in pthread_mutex_lock () from /usr/lib/64/libc.so.1 #7 0x000000000046ef0f in clsMutex::Lock (this=0x4f7490) at ../../../erokar/common/clsMutex.h:27 #8 0xfffffd7ffe1af2a5 in CStatefulCondVar::Lock (this=0x4f7480) at StatefulCondVar.hh:35 #9 0xfffffd7ffe0f8c9e in CBCThread::main (this=0x2fe96b0, arg=0x0) at BudgetClientThread.cc:96 #10 0xfffffd7ffe0f8de0 in bcthread_main (arg=0x2fe96b0) at BudgetClientThread.cc:8 #11 0xfffffd7ffe0f8376 in BasicThread::startup (arg=0x2fe96b0) at ../../../adn/common/BasicThread.cc:48 #12 0xfffffd7ffee10edb in _thr_setup () from /usr/lib/64/libc.so.1 #13 0xfffffd7ffee11110 in ?? () from /usr/lib/64/libc.so.1 #14 0x0000000000000000 in ?? () As the comments say, when the SCV is not thread - specific, but allocated on the stack, the abort like this still happens, but after a couple of hours of load test. Any ideas? The OS is 64-bit Solaris on Intel: SunOS 5.10 Generic_120012-14 i86pc i386 i86pc Solaris Thanks a lot in advance, --Anatol |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
All times are GMT -4. The time now is 10:36 PM.




Linear Mode