cURL cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[curl:bugs] #1442 intermittent segfault in mdns_query_callback

From: Daniel Stenberg <bagder_at_users.sf.net>
Date: Mon, 03 Nov 2014 09:05:15 +0000

- **status**: open --> pending-needsinfo

---
** [bugs:#1442] intermittent segfault in mdns_query_callback**
**Status:** pending-needsinfo
**Created:** Wed Oct 29, 2014 06:03 AM UTC by Puneet Singhal
**Last Updated:** Sat Nov 01, 2014 12:37 AM UTC
**Owner:** Daniel Stenberg
I use libcurl to download some files on the system but seems to be crashing intermittently.
Attaching system info and calling code in the ticket
Crash Stack:
libcurl Version: 7.18.2
OS Version:      Mac OS X 10.9.5 (13F34)
Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: EXC_I386_GPFLT
0   libsystem_info.dylib          	0x00007fff87e2c0eb _mdns_query_callback + 205
1   libsystem_dnssd.dylib         	0x00007fff8b05aec3 handle_query_response + 243
2   libsystem_dnssd.dylib         	0x00007fff8b0593f5 DNSServiceProcessResult + 740
3   libsystem_info.dylib          	0x00007fff87e2adaf _mdns_search + 1300
4   libsystem_info.dylib          	0x00007fff87e3175c mdns_addrinfo + 513
5   libsystem_info.dylib          	0x00007fff87e3152b search_addrinfo + 183
6   libsystem_info.dylib          	0x00007fff87e312c0 si_addrinfo + 1468
7   libsystem_info.dylib          	0x00007fff87e30c5f getaddrinfo + 171
8   libcurl                       	0x000000011099ee96 Curl_getaddrinfo_ex + 37
9   libcurl                       	0x0000000110999740 Curl_getaddrinfo + 264
10  libcurl                       	0x000000011096dcfb Curl_resolv + 309
11  libcurl                       	0x000000011096de02 Curl_resolv_timeout + 123
12  libcurl                       	0x000000011097d3b5 resolve_server + 226
13  libcurl                       	0x000000011097f11c create_conn + 5088
14  libcurl                       	0x0000000110982e8c Curl_connect + 41
15  libcurl                       	0x000000011098e2c3 Curl_do_perform + 137
Calling code:
	CURL *curl = curl_easy_init();
	long longinfo = 400; // BAD REQUEST if we have error on client side
	if(curl) {
		if(mProxy.length())
			curl_easy_setopt(curl,CURLOPT_PROXY, mProxy.c_str());
		StreamCallbackData callbackData;
		callbackData.outputStream = outstream;
		curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
		curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, DataStreamCallback);
#if Macintosh
		//Take care of timeouts as we are setting curl for no signal
		curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1L); 
		curl_easy_setopt(curl, CURLOPT_FTP_RESPONSE_TIMEOUT, 20L);
#endif
		// Setting 20 second network timeout
		curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 20L);
		
		// Download speed must not be less than 100b/sec for 10 seconds
		curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 100);
		curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 10);
		curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&callbackData);
		CURLcode res = curl_easy_perform(curl);
		if(res == 0)
		{
			curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &longinfo);
		}
		curl_easy_cleanup(curl);
		}
	return longinfo; 
---
Sent from sourceforge.net because curl-tracker@cool.haxx.se is subscribed to https://sourceforge.net/p/curl/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/curl/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
Received on 2014-11-03

These mail archives are generated by hypermail.