curl-library
libcurl in JNI context
Date: Wed, 13 Jul 2005 17:56:09 -0700
Hi,
My webapp running in tomcat calls a native function which eventually make a curl_easy_perform call that does an HTTP post.
Strangely, the JVM goes down siliently (no core dump and nothing shows up on console) after the curl call returns successfully, followed by a few mouse clicks on my webapp UI.
More strangely, it happens only when I click my mouse fast enough. If I client my link slowly, this does not happen. If I comment out the curl_easy_perform call, this does not happen.
The problem happens even if I only do the following:
m_curl = curl_easy_init();
curl_easy_setopt(m_curl, CURLOPT_URL, url);
curl_easy_setopt(m_curl, CURLOPT_POST, TRUE);
curl_easy_setopt(m_curl, CURLOPT_VERBOSE, 0);
curl_easy_setopt(m_curl, CURLOPT_POSTFIELDSIZE, 0);
CURLcode res = curl_easy_perform(m_curl);
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.
Thanks,
Andy
Received on 2005-07-14