cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl: Hang/Crash due to CURLE_COULDNT_CONNECT ( probably in curl_easy_cleanup)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 6 Apr 2009 20:12:17 +0200 (CEST)

On Mon, 6 Apr 2009, Sandeep Kale wrote:

> We have developed a server which has libcurl at its heart. It processes all
> kind of http / soap requests. This server goes into a hang state once it
> receives a curl return code as "CURLE_COULDNT_CONNECT", the server process
> doesn't crash neither it generates any core file.

Does _your_ code hang/crash when libcurl returns CURLE_COULDNT_CONNECT?

If libcurl hangs/crashes, how can it return CURLE_COULDNT_CONNECT?

> So we tried to simulate the situation by intentionally setting the return
> code variable to "CURLE_COULDNT_CONNECT" and observed the behavior. This
> time the process crashed and generated a core showing the below stack,

How exactly did you "simulate" this?

> 850 SSL_SESSION_free(ptr);

Are you by any chancing using libcurl multi-threaded without having the
OpenSSL mutex callbacks setup?

-- 
  / daniel.haxx.se
Received on 2009-04-06