Bug 6329 - libcurl bug when compiled against gnutls
Summary: libcurl bug when compiled against gnutls
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.5.1
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.7
Assignee: Saul Wold
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-05-14 18:32 UTC by Volker
Modified: 2014-07-01 17:46 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
script that exposes the libcurl bug (6.53 KB, text/x-python)
2014-05-14 18:32 UTC, Volker
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volker 2014-05-14 18:32:14 UTC
Created attachment 1957 [details]
script that exposes the libcurl bug

There is a bug in libcurl that raises execeptions when compiled against gnutls. If libcurl is compiled against ssl it works without any problems.

How to reproduce:
   git clone -b dora git://git.yoctoproject.org/poky.git
   cd poky
   # get version for bugzilla
   git rev-parse HEAD
   0a6f0dbf9476dcb4a17a210af90e2dd1a43b61aa
   # initialize env
   source oe-init-build-env
   # Add packages to reproduce it. python-pycurl is a must
   # some of the others are needed for the test script
   # that exposes the bug, others might not be required.
   # installing all of them doesn't matter too much
   echo "IMAGE_INSTALL_append = ' python-pycurl python-ctypes python-datetime python-xmlrpc python-threading python-subprocess python-shell python-compression'" >> conf/local.conf
   # Parallel build
   echo 'BB_NUMBER_THREADS ?= "8"' >> conf/local.conf
   echo 'PARALLEL_MAKE ?= "-j 4"' >> conf/local.conf
   # build & wait
   bitbake core-image-minimal
   # start test environment
   runqemu qemux86

Get the attached script that exposes the bug into the image (e.g. via wget from another system you have access to) and execute it inside the qemu environment.


The attached script could also be used for ptest after some smaller modifications in the log output.


A workaround is creating a recipe with the following file and content
    filename: curl_7.32.0.bbappend
    content:
       # Workaround for libcurl bug when compiled against gnutls
       CURLGNUTLS = "--without-gnutls --with-ssl"
Comment 1 Saul Wold 2014-05-19 20:53:33 UTC
Have you tried to build/test curl upstream for this issue, ie is this an issue 
in the recipe configuration or in the actual code, in which case we should also 
report it to the upstream maintainer to get a proper fix.
Comment 2 Saul Wold 2014-05-19 21:01:20 UTC
Is this the issue you are seeing: 
http://curl.haxx.se/mail/lib-2014-04/0145.html?
Comment 3 Volker 2014-06-03 19:09:15 UTC
As requested I send an email to the libcurl mailing list: http://curl.haxx.se/mail/lib-2014-06/0028.html
Comment 4 Volker 2014-06-09 18:26:30 UTC
I am not in the mood to discuss with the libcurl developers the issue nor do I want to do a step by step explanation of the testing script one of my co-workers wrote and I can't explain well. I send the report to the libcurl mailinglist as requested. Find the entire thread on http://curl.haxx.se/mail/lib-2014-06/index.html (search for Yocto).

I would suggest changing the default GNUTLS settings as described in my first entry to
---
CURLGNUTLS = "--without-gnutls --with-ssl"
---
Comment 5 Saul Wold 2014-06-16 04:09:37 UTC
An update on this issue, I build and booted our current master which contains 
the new 7.36 version of curl and the newer version of GnuTLS.

root@qemux86-64:~# curl --version
curl 7.36.0 (x86_64-poky-linux-gnu) libcurl/7.36.0 GnuTLS/3.2.15 zlib/1.2.8
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smtp 
smtps telnet tftp 
Features: IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP 

I was able to run your script with no issue, I am doing a build with 1.5.1 HEAD 
to reproduce this with the older version of libcurl, maybe there is a patch 
that can be back ported.

I was also able to verify that Daisy (1.6) does NOT have your issue, so that 
limits it to a difference between libcurl 7.32 and 7.35, since with daisy 
GnuTLS did not change.

If you have time to test 7.33 and 7.34 that would help narrow this down also.  
I am not sure I have much more time, since this is fixed in the Upstream, this 
might help them narrow the issue down in 7.32.