cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Yet another libcurl Broken Pipe (Ubuntu 14)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 12 May 2014 22:58:08 +0200 (CEST)

On Mon, 12 May 2014, Wagner Patriota wrote:

> Is there anything in my code that I am missing that could cause this crash?

What is the crash exactly? What happens or what does it say? I suspected
SIGPIPE but you're using 7.36.0 that I believe will ignore SIGPIPE correctly
for this case.

> char contentLength[ 512 ];
> snprintf( contentLength, sizeof( contentLength ), "Content-Length:
> %zu", p_sizeOfChunk );

Don't do this. libcurl is much better doing Content-Length: by itself.

> - Curl 7.36.0

Very new!

> - OpenSSL 1.0.1f 6 Jan 2014

This version is vulnerable to Heartbleed, you should upgrade it.

> #0 0x00007ffff65ad35d in write () at ../sysdeps/unix/syscall-template.S:81
> #1 0x00007ffff73187a6 in ?? () from
> /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
> #2 0x00007ffff731684b in BIO_write () from
> /lib/x86_64-linux-gnu/libcrypto.so.1.0.0

If my initial questions don't take us all the way, one very good next step
could be to build OpenSSL from source or somehow otherwise get the debug
systems for it so that you'd get a full stack trace to the crash point.

Also, it'd be very useful if you could produce a repeatable (full) source code
that we can run in our ends to reproduce the problem.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-05-12