cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl in JNI context

From: Mohun Biswas <m_biswas_at_mailinator.com>
Date: Thu, 14 Jul 2005 15:57:43 -0400

1. Since the problem happens on Solaris, use truss instead of strace.
2. Is there a reason to use libcurl instead of the native HTTP client
support in Java, or even the Apache Commons HTTP client
(<http://jakarta.apache.org/commons/httpclient/>)? Libcurl is a great
piece of code but it's rarely smart to link JNI code into a JVM when the
same functionality is available as safe bytecodes. If bytecodes fail you
get a nice exception with a backtrace you can analyze; if JNI code fails
you have the problem you have now.

Lai, Andy wrote:

> OS is actually the most interesting part. The problem happens only on
> solaris so far. I was not able to reproduce it on windows, linux, and
> aix.
>
> And the same problem happens with libcurl 7.12.2, 7.13.1, and 7.14.0.
>
> I think strace is a good idea... only problem is that doing strace
> against java (tomcat) can be very tricky, as you said.
>
> If strace does not give me much info, I will debug libcurl.
>
> Thanks,
> Andy
>
>
> -----Original Message-----
> From: curl-library-bounces_at_cool.haxx.se
> [mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
> Sent: Wednesday, July 13, 2005 11:53 PM
> To: libcurl development
> Subject: Re: libcurl in JNI context
>
> On Wed, 13 Jul 2005, Lai, Andy wrote:
>
>
>>I ran purify and I did not see any memory corruption caused by
>
> libcurl. Yet
>
>>I do not understand why calling curl_easy_perform will cause JVM to go
>
> down
>
>>at a later point of time.
>>
>>Any help, suggestion, or advice is greatly appreciated.
>
>
> What OS? What libcurl version?
>
> I really think you should start figuring out the "goes down siliently"
> part.
> Why exactly does is stop. When you know that I think you have a better
> chance
> to understand or figure out what libcurl's part in that might be.
>
> Personally I like using 'strace' or similar to figure out such things,
> but in
> a server environment like this it might be tricky.
>
> And no, I don't have any sensisble ideas why this happens, but then JVMs
> are
> not within my area of expertise.
>
Received on 2005-07-14