cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: SIGPIPE from gnutls with NOSIGNAL?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 31 Oct 2006 08:54:31 +0100 (CET)

On Tue, 31 Oct 2006, Brendan Jurd wrote:

> Apologies in advance if this is a stupid question, but I'm getting a SIGPIPE
> in my application via libcurl, apparently originating in gnutls. I am using
> the option CURLOPT_NOSIGNAL, but this does appear to make any difference.
> I have included my backtrace below:

> #0 0xb7ac974c in send () from /lib/tls/libc.so.6
> #1 0xb79a5c5c in _gnutls_io_write_buffered () from /usr/lib/libgnutls.so.13

[...]

> My application makes the same small HTTPS request every 15 seconds. It
> will run fine for anywhere between a few minutes and several hours, with
> each request normally taking about one second, and then it will appear
> to get "stuck" on a particular request for several minutes, and then
> SIGPIPE out.
>
> The application is compiled against Debian package libcurl3-gnutls-dev
> version 7.15.5-1.

Oh. Yes I can see how this happens because gnutls doesn't seem to do anything
to avoid getting the signal. libcurl does take precautions for its own code,
but this is originating from gnutls internals... I don't see how we can do
anything about this right now, except possibly patch the
_gnutls_io_write_buffered() function to use MSG_NOSIGNAL in its fourth
argument.

I'll write the gnutls people to see what they have to say about this.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-10-31