cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: AIX multithreaded issue - CURLE_COULDNT_CONNECT

From: Alexander Krasnostavsky <ALEXANDERKR_at_Amdocs.com>
Date: Tue, 17 Aug 2004 11:45:04 +0300

Hi Daniel,
I encountered the same problem. In AIX errno variable is no thread safe.
To solve the problem, "-D_THREAD_SAFE" (or _THREAD_SAFE_ERRNO) flag
should be defined. I think that it should be handled by configure when
"--enable-thread" option is defined. I assume that -qthreaded also
defined.

-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Joseph Anto
Smith
Sent: Monday, June 07, 2004 14:17
To: libcurl development
Subject: Re: AIX multithreaded issue - CURLE_COULDNT_CONNECT

----- Original Message -----
On Sun, 6 Jun 2004, Joseph Anto Smith Stanley wrote:

> http://article.gmane.org/gmane.comp.web.curl.general/3040
>
> I am having exactly the same problem as described in that post. When
using libcurl with a multi threaded program, fetching http files
*always* returns CURLE_COULDNT_CONNECT.

... and it works when you're not doing it multi-threaded?

Yes, it works fine with non- multi-threaded programs.

> The OS version I am using is AIX 5.2 and libcurl version is 7.12.0

> In fact, I even tried with the multithread.c file present in the
docs/examples folder of curl distribution. Could I get some help here?

The last time I touched an AIX box, it used AIX v3! ;-) (in nostalgic
moments, I show people the little pin I got while being an IBM employee,
saying "/aix/wizard" !)

I can only suggest that you first track down what exact function call(s)
that fails (using strace-style, debugger or printf-style debugging).
Then
you check why it fails and if libcurl uses the proper threadsafe version
etc.

I should have included the details earlier... The exact funtion is
connect
in connect.c The funny thing is connect returns -1 indicating it failed
but the errno is not set. I suppose this has something to do with
threads
and I am stuck in how to proceed further with the debugging.

Thanks again,
Joseph

--
     Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
      Dedicated custom curl help for hire: http://haxx.se/curl.html
The information contained in this message is proprietary of Amdocs,
protected from disclosure, and may be privileged.
The information is intended to be conveyed only to the designated recipient(s)
of the message. If the reader of this message is not the intended recipient,
you are hereby notified that any dissemination, use, distribution or copying of
this communication is strictly prohibited and may be unlawful.
If you have received this communication in error, please notify us immediately
by replying to the message and deleting it from your computer.
Thank you.
Received on 2004-08-17