cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Resin self-restarts when invoking libcurl.dll from Java servlet

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 25 Apr 2002 18:00:00 +0200 (MET DST)

On Wed, 24 Apr 2002, Serge Kruppa wrote:

> I would like to know if anyone has had any experience of Resin (2.0.3)
> restarting spontaneously when using a Java servlet making JNI calls to
> libcurl.dll?

I have not heard any such reports before.

> This is happening to us under Windows 2000 running Resin under the Sun 1.3
> JVM. We have some reasons to believe that the most likely cause of Resin
> restarts is the curl_easy_cleanup() function since the problem occurs
> always at the end of our CURL session.

It makes it sound like some kind of memory problem, dangling pointer or
similar.

> Debugging this is very arduous and we have decided to remove
> curl_easy_cleanup () from our Java application even though this will likely
> cause a memory leak.

It will cause a pretty sever leak, as each CURL handle will use something
between 50 and 100 KB.

> Without the function call we have not observed any restarts of Resin.
> Strangely enough, the restarts become very frequent when pairing Resin with
> Apache (using mod_caucho). But the weirdest is that the problem occurs
> roughly once every five times CURL is invoked. We have lost hope to resolve
> the problem and would welcome any tips.

Would it be possible for you to just put printf()s all over the cleanup code
to see exactly where in the code the crash happens? Or even better, can you
do post-mortem debugging on the crash somehow?

I would like to help out here, but I need something little to grab onto
first!

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2002-04-25